Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

precommit

/precommit

Wyszukuje i uruchamia w monorepo wszystkie kontrole jakości przed commitem, np. lintery i typy, poprawia błędy i raportuje wyniki.

Licencja
MIT
Ostatnia zmiana repozytorium
26.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 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Wyszukuje i uruchamia w monorepo wszystkie kontrole jakości przed commitem, np. lintery i typy, poprawia błędy i raportuje wyniki.

Oryginalny opis (EN)

Discover and run all pre-commit code quality checks (linters, type checks, i18n extraction) in a monorepo, auto-fix failures, and report results. Use when the user asks to run pre-commit checks, validate code before committing, or ensure CI checks pass locally.

Jak działa

  1. Objective
  2. Process
  3. Output Format
  4. Guidelines
Sekcje z nagłówków SKILL.md, w oryginale · 89 linii, 586 słów
Podgląd SKILL.md
---
name: precommit
description: Discover and run all pre-commit code quality checks (linters, type checks, i18n extraction) in a monorepo, auto-fix failures, and report results. Use when the user asks to run pre-commit checks, validate code before committing, or ensure CI checks pass locally.
---

You are a Pre-Commit Expert agent responsible for identifying, running, and resolving all code quality checks in a monorepo before code is committed.

## Objective

Ensure all CI checks pass locally by discovering what checks exist, running them systematically, and fixing any issues found. If a fix is not possible, report the issue clearly for manual resolution.

## Process

Execute the following phases in order:

### Phase 1: Discovery

Identify all relevant checks by examining:

1. `.github/workflows/*.yml` or `.github/workflows/*.yaml` files — extract check/lint steps (ignore test steps)
2. Root and package-level config files: `package.json` (scripts), `Makefile`, `pyproject.toml`, `setup.cfg`, etc.
3. Directory structure to understand monorepo layout (e.g., `apps/`, `packages/`, `server/`, `webapp/`, `services/`)

For each discovered location, look for:
- **Linters**: `make check-style`, `make lint`, `npm run lint`, `eslint`, `prettier --check`, `ruff`, `black --check`, `flake8`, etc.
- **i18n extraction**: `i18n-extract`, `formatjs extract`, `babel-extract`, or similar commands in both server and webapp directories
- **TypeScript type checks**: `tsc --noEmit`, `npm run typecheck`, `yarn typecheck`, or equivalent

### Phase 2: Plan

Produce a numbered checklist of every check you identified, grouped by package/directory. Format:
```
## Pre-Commit Checklist

1. [ ] [root] npm run lint
2. [ ] [webapp] npm run typecheck
3. [ ] [webapp] npm run i18n-extract
4. [ ] [server] make check-style
5. [ ] [server] i18n-extract
...
```

### Phase 3: Execute

For each item in the checklist, delegate the execution and fixing to a sub agent, where each takes on one of the items and does the following:

1. **Run** the check command
2. **Evaluate** the output:
   - If it passes → mark complete, move on
   - If it fails → attempt to fix automatically
3. **Fix** using the appropriate method:
   - Linters: run the auto-fix variant (e.g., `npm run lint --fix`, `make fix-style`, `prettier --write`, `black .`, `ruff --fix`)
   - i18n: run the extraction command to regenerate translation files, then stage the changes
   - TypeScript: analyze the type errors and correct the source code
4. **Re-run** the check to verify the fix worked
5. **Report** if the fix failed or manual intervention is required

These sub agents can be run in parallel to improve execution speed.

## Output Format

After completing all checks, provide a summary:
```
## Pre-Commit Summary

Passed: 4
Fixed: 2
Requires Manual Fix: 1

### Details

| Check | Location | Status | Notes |
|-------|----------|--------|-------|
| lint | root | Passed | — |
| typecheck | webapp | Fixed | Corrected 3 type errors in `UserService.ts` |
| i18n-extract | server | Manual | Missing translation key requires human decision |

### Manual Action Required

1. **[server] i18n-extract**
   - File: `server/src/messages.py`
   - Issue: Ambiguous translation key `error.generic` — clarify intended message
```

## Guidelines

- **Monorepo awareness**: Check for workspaces config (`pnpm-workspace.yaml`, `lerna.json`, `package.json` workspaces field) to understand package boundaries. Run checks from the correct working directory.
- **CI parity**: The goal is to replicate CI checks locally. Use the exact commands from CI workflows when possible.
- **Minimal changes**: When fixing, change only what is necessary to pass the check. Do not refactor unrelated code.
- **Staged files awareness**: If the repository uses lint-staged or similar, be aware that some checks may only apply to staged files.
- **Fail fast on blockers**: If a check fails in a way that blocks subsequent checks (e.g., syntax error preventing TypeScript from running), prioritize fixing it first.
- **Preserve intent**: When fixing i18n or type errors, ensure fixes maintain the original code intent. If uncertain, report rather than guess.

Wersje

W bazie nie ma innych skilli o nazwie precommit.

Migawka bazy z 13.11.2026 · wersja paczki 861e49138dae (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

  • 100validating-pre-commit
    Uruchamia bramki jakości przed commitem lub pushem, odtwarza lokalnie błędy z CI i sprawdza, czy zmiany przechodzą wszystkie kontrole.
  • 100pre-commit
    Przeprowadza pełną bramkę walidacji przed commitem: kontrole jakości, testy, pokrycie, skan bezpieczeństwa, changelog i przegląd towarzyszący.
  • 100precommit-setup
    Konfiguruje hooki pre-commit dla lintingu, sprawdzania typów, formatowania i testów przy zakładaniu projektu lub dodawaniu bramek jakości do istniejącego.
  • 100trace-mcp-pre-commit
    Uruchamia kontrole bezpieczeństwa, bramek jakości i antywzorców trace-mcp przed commitem lub otwarciem pull requestu.
  • 100linter-setup
    Konfiguruje lintery, formattery, kontrolę typów i analizę statyczną w bramkach pre-commit oraz CI.
  • 100linter-setup
    Konfiguruje lintery, formattery, kontrolę typów i analizę statyczną w bramkach pre-commit oraz CI.

Uwagi i zgłoszenia

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