pre-commit-ci
Skill4 starsChanged 4 months agoMITView on GitHub
Run ZeroAgent Studio quality gate (audit, lint, typecheck, coverage, build) before commit or merge. Use when committing, fixing CI, or finishing implementation.
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Run before commit or merge-ready sign-off.
- Very specific: line 22
Use npm ci (not npm install) when lockfile must match — CI and releases.
- Very specific: line 40
After package.json deps: npm install once → commit lockfile → verify npm ci
- Very specific: line 41
After src/ / tests/ edits: full npm run ci — not lint-only
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pre-Commit CI
Run before commit or merge-ready sign-off. Do not commit on red.
Install
npm ciUse npm ci (not npm install) when lockfile must match — CI and releases.
Gate
npm run ci| Step | Pass criteria |
| audit | 0 vulnerabilities (moderate+) |
| lint | ESLint clean |
| typecheck | tsc --noEmit |
| test:coverage | 100% on included src/ |
| build | Vite production build |
Workflow
- After
package.jsondeps:npm installonce → commit lockfile → verifynpm ci - After
src//tests/edits: fullnpm run ci— not lint-only - Fix all failures; re-run until exit 0
- Report briefly: command + pass/fail (token-efficient)
Fallback (if ci script broken)
npm audit --audit-level=moderate && npm run lint && npm run typecheck && npm run test:coverage && npm run buildNotes
- Coverage excludes pure UI shells — see
vite.config.tscoverage.exclude - Chunk size warnings on build are OK if exit 0
- Windows: run in repo root; no special CRLF handling for this repo
Rule: .cursor/rules/pre-commit-quality-gate.mdc
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/pre-commit-quality-gate.mdcCursor rule
- .cursor/rules/release-versioning.mdcCursor rule
- .cursor/rules/zeroagent-advisor.mdcCursor rule
- .cursor/rules/zeroagent-debugger.mdcCursor rule
- .cursor/rules/zeroagent-engineer.mdcCursor rule
- .cursor/rules/zeroagent-planner.mdcCursor rule
- .cursor/rules/zeroagent-reviewer.mdcCursor rule
- .cursor/rules/zeroagent-security-auditor.mdcCursor rule
- .cursor/rules/zeroagent-test-engineer.mdcCursor rule
- add-brain-providerSkill
- add-browser-toolSkill
- release-versioningSkill
- review-before-mergeSkill
- ship-patchSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

