precommit-audit
/precommit-audit
Pre-commit audit of uncommitted changes — an independent subagent reviews the diff, every finding is verified against the real code, only confirmed fixes are applied, and the run ends with an honest COMMIT-READY YES/NO verdict. Use whenever the user wants changes checked before committing — "pre-commit audit", "check my uncommitted changes", "review my diff", "ready to commit?", «проверь перед коммитом», «аудит uncommitted», «готов ли код к коммиту» — even when the word "audit" is not used.
- Author
- CrimsonCod-dev ↗
- Repository
- precommit-audit ↗
- Licence
- MIT
- Last repository change
- 29.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 29.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Pre-commit audit of uncommitted changes — an independent subagent reviews the diff, every finding is verified against the real code, only confirmed fixes are applied, and the run ends with an honest COMMIT-READY YES/NO verdict. Use whenever the user wants changes checked before committing — "pre-commit audit", "check my uncommitted changes", "review my diff", "ready to commit?", «проверь перед коммитом», «аудит uncommitted», «готов ли код к коммиту» — even when the word "audit" is not used.
Triggers from the description
Original author description
Pre-commit audit of uncommitted changes — an independent subagent reviews the diff, every finding is verified against the real code, only confirmed fixes are applied, and the run ends with an honest COMMIT-READY YES/NO verdict. Use whenever the user wants changes checked before committing — "pre-commit audit", "check my uncommitted changes", "review my diff", "ready to commit?", «проверь перед коммитом», «аудит uncommitted», «готов ли код к коммиту» — even when the word "audit" is not used.
How it works
- 1. Collect the diff
- 2. Independent subagent review
- 3. Verify every finding yourself
- 4. Fix confirmed findings, run the checks
- 5. Verdict
- Report format
SKILL.md preview
--- name: precommit-audit description: Pre-commit audit of uncommitted changes — an independent subagent reviews the diff, every finding is verified against the real code, only confirmed fixes are applied, and the run ends with an honest COMMIT-READY YES/NO verdict. Use whenever the user wants changes checked before committing — "pre-commit audit", "check my uncommitted changes", "review my diff", "ready to commit?", «проверь перед коммитом», «аудит uncommitted», «готов ли код к коммиту» — even when the word "audit" is not used. license: MIT --- # Pre-Commit Audit Pipeline: collect diff → independent subagent review → verify findings → fix only what is confirmed → honest verdict. Do not commit: the verdict is the deliverable; the user decides. Rule for the whole run: **evidence only**. Every claim — finding, fix, verdict reason — is backed by `file:line` you checked yourself in the real code. No "seems like", no invented test results. ## 1. Collect the diff - `git status --porcelain` plus `git diff HEAD` (covers staged and unstaged tracked files). - No commits yet? `git diff HEAD` fails with `ambiguous argument 'HEAD'` — use `git diff --cached` plus `git diff` instead. - Gotcha: untracked files do not appear in `git diff HEAD` — read them in full, or the audit is incomplete. - Nothing to audit → say so and stop. ## 2. Independent subagent review Dispatch one general-purpose subagent with your agent's subagent/task tool (Claude Code: Agent/Task; OpenCode: `subagent`), explicitly read-only. The prompt gives it: - Role: independent expert reviewer with fresh eyes; nothing from the main conversation is input. - Task: run the diff commands from step 1 itself, read untracked files, skim README/CLAUDE.md/SPEC for project conventions. - Review targets: logic errors and regressions; security (secrets, injection, path traversal, unsafe defaults); incomplete work (stubs, TODOs, doc drift); tests covering changed behavior; project style. - Output per finding: severity (critical | major | minor), `file:line`, code quote, why it is a problem. "No findings" is a valid result. Why fresh eyes: the subagent has no stake in the changes and no conversation bias — but its report is still untrusted input (step 3). ## 3. Verify every finding yourself Subagents fabricate and misquote. For each finding, open `file:line` in the real code and classify: - **CONFIRMED** — reproducible in the code → goes to fixes. - **REJECTED** — not reproducible or the quote does not match → drop it and state why in the report. - **UNVERIFIED** — cannot decide → do not fix, do not claim; list as an open question. If it could break production, it forces NO. Never accept a finding on the subagent's quote alone. ## 4. Fix confirmed findings, run the checks - Fixes are minimal, in the surrounding code style, with no drive-by refactoring. - Then run the project's own checks — discover the real commands from README/CLAUDE.md/Makefile (tests, linters). If the project has none, say so plainly; never invent results. Failing checks count as confirmed findings: fix them, or they force NO. - No confirmed findings → change nothing and write: "No confirmed findings; no changes made." ## 5. Verdict Calibration: the goal is risk reduction, not perfect code — style nits do not force NO; broken logic, secrets in the diff, failing checks, or incomplete work do. The last line of the reply is exactly one of: - `COMMIT-READY: YES` - `COMMIT-READY: NO — <reasons>` Write the rest of the report in the user's language. ## Report format 1. **Scope** — files reviewed, diff size. 2. **Findings** — table: finding → CONFIRMED / REJECTED / UNVERIFIED (+ why) → action taken. 3. **Changes** — fixes applied, or "no changes made". 4. **Checks** — real commands run and their results. 5. **Verdict** — the `COMMIT-READY:` line.
Versions
The database has no other skills named precommit-audit.
Database snapshot: 13.11.2026 · package version 25ae2d5d5ba3 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100pre-commit-review
Review staged and unstaged changes before committing. Use when asked for a pre-commit review, a code-quality review of the current diff, or when a solve workflow requests an independent review. - 100review
Independent code review of changes (uncommitted work, a branch, a commit range, a GitHub PR or given files) by the code-reviewer subagent, plus security-auditor for sensitive code; findings are verified and ranked by severity, with fixes. Use when the user asks for a review… - 90review
Review uncommitted changes against the project rules before committing. Use when the user asks for a review of their working tree, asks whether changes are ready to commit, or says they are about to commit. - 100precommit
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. - 100commit
Commit uncommitted changes with clear commit messages. Use when the user asks to commit changes, save work, or create a commit. - 90code-review
Reviews code changes and provides actionable feedback. Use when the user asks to review a PR, diff, commit, or code changes. Triggers on "/review", "review this PR", "review my changes", "code review".