Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

pre-commit

/pre-commit

Sprawdza zmiany poleceniem check narzędzia OSPREY: linting, formatowanie i testy, zanim trafią do push lub PR-a.

Repozytorium
osprey ↗
Licencja
BSD-3-Clause
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

BSD-3-Clause, otwarta.

Co robi i kiedy

Sprawdza zmiany poleceniem check narzędzia OSPREY: linting, formatowanie i testy, zanim trafią do push lub PR-a.

Oryginalny opis (EN)

Validates code before committing using OSPREY's check command and its tiers. Runs linting, formatting, and tests to catch issues early. Use when ready to commit, before pushing, before opening a PR, or when the user asks to run checks, validate, or verify their changes. For the full contribution journey (branching, commits, push, PR, merge), use `/osprey:contribute` instead — this skill is the focused validation step.

Jak działa

  1. The Tiers
  2. When a check fails
  3. Composition with other skills
Sekcje z nagłówków SKILL.md, w oryginale · 99 linii, 580 słów
Podgląd SKILL.md
---
name: pre-commit
description: >
  Validates code before committing using OSPREY's check command and its tiers.
  Runs linting, formatting, and tests to catch issues early. Use when ready
  to commit, before pushing, before opening a PR, or when the user asks to
  run checks, validate, or verify their changes. For the full contribution
  journey (branching, commits, push, PR, merge), use `/osprey:contribute`
  instead — this skill is the focused validation step.
allowed-tools: Read, Glob, Grep, Bash, Edit
---

# Pre-Commit Validation

This skill runs OSPREY's check command at the right moment in the journey. It
is a focused validation tool — not a full contribution workflow. For the
end-to-end journey (branching, committing, pushing, opening a PR, merging) use
the `/osprey:contribute` skill, which invokes these checks at each gate.

## The Tiers

Every check is declared once, by the code that owns it, in a `repo_checks.py`
module beside that code: `scripts/repo_checks.py` for the framework and the
repository as a whole, and one in each package that brings checks of its own
(`packages/osprey-connectors/repo_checks.py`). `scripts/check.py` collects every
such module, and a laptop, an automated gate and each CI step run a check
through it.

| Tier | Command | Use Before |
| --- | --- | --- |
| Quick | `uv run python scripts/check.py quick` | every commit |
| Full | `uv run python scripts/check.py full` | every push |
| Quick, scoped | `uv run python scripts/check.py quick --changed origin/main` | every PR |

Each tier expands the surface area of what is verified. Running them in
order saves time: catch the cheap things cheaply, escalate only when the
cheap checks pass.

To see what a tier runs:

```bash
uv run python scripts/check.py list --tier quick
```

### Quick (before commits)

Runs the checks a commit needs, with the fast unit tests. Catches most
accidents that would clutter `git log`.

```bash
uv run python scripts/check.py quick
```

Add `--fix` to apply ruff first: it runs `uv run ruff check . --fix` and
`uv run ruff format .`, then the checks.

### Full (before pushing)

Adds the slow tests, the serial suites and the builds. Pushing only what
would have passed CI respects shared CI minutes and keeps PR dashboards clean.
Needs `uv sync --extra dev --extra docs`.

```bash
uv run python scripts/check.py full
```

### Quick, scoped (before opening a PR)

Compares the branch against the PR target (`origin/main`). It runs the checks the
diff touches and the tests it maps to, adds the checks that judge a range (the
changelog fragment and the plugin version), and
names the CI lanes the diff touched.

```bash
uv run python scripts/check.py quick --changed origin/main
```

Add `--worktree` to judge uncommitted and untracked files as well.

### Reading the verdict

The last line is the verdict: `clean`, or `not clean` with the checks that
failed. It also names what did not run here. Exit status 2 is a refusal: the
command could not judge, and the message says what to install or fetch.

## When a check fails

Read the output, fix the smallest thing that would make it pass, and re-run
the same command. Don't escalate to a higher tier until the lower tier is
green — escalating early just hides the cheaper failure under a slower one.

If the failure is in `ruff`, `quick --fix` usually resolves it.
If the failure is in tests, the most useful next step is to run that single
test verbosely:

```bash
pytest tests/path/to/test_file.py::test_function_name -v
```

## Composition with other skills

- **`/osprey:contribute`** — the full journey. Calls these checks at each
  gate (commit, push, PR). If you find yourself running these checks while
  also juggling branching, committing, and PR creation, switch to
  `/osprey:contribute` instead.
- **`commit-organize`** (optional, external) — when a working tree spans
  unrelated concerns, split it into atomic commits before running the checks.
- **`/osprey:release`** — release-cutting flow that includes a clean-venv
  pre-release test pass on top of these tiers.

Wersje

RepozytoriumWynikLicencja
Ta strona · als-apg/osprey100BSD-3-Clause
julianobarbosa/claude-code-skills100MIT
matteocervelli/llms100MIT

Migawka bazy z 13.11.2026 · wersja paczki 1c6442909f68 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100contribute
    Prowadzi przez wkład w OSPREY według GitHub Flow, od zmian w katalogu roboczym po scalony PR, w tym push, rebase i naprawę nieprzechodzącego CI.
  • 95release
    Prowadzi opiekuna przez wydanie OSPREY: kontrole dryfu, testy w czystym środowisku, tag i publikację na PyPI.
  • 90check
    Waliduje jakość kodu: automatycznie poprawia formatowanie i lint, weryfikuje typy i uruchamia testy, także przy samym lintowaniu.
  • 100code-quality-tools
    Konfiguruje narzędzia jakości kodu ruff, mypy i pre-commit w projektach naukowych w Pythonie: reguły lintera, sprawdzanie typów, formatowanie i integrację z CI.
  • 90git-commit-push
    Zapisuje commit i wypycha bieżące zmiany do repozytorium, sprawdzając wcześniej, co trafi do historii.
  • 100ci-readiness-check
    Sprawdza gotowość do CI przed wypchnięciem gałęzi: formatowanie, nieaktualne raporty API, brakujące changesety i naruszenia polityk.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.