agentleFS
sakurablushsakurablush/zeroagent-studio/.cursor/skills/pre-commit-ci/SKILL.md

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
  1. Distinctive:

    Run before commit or merge-ready sign-off.

    line 14
  2. Very specific:

    Use npm ci (not npm install) when lockfile must match — CI and releases.

    line 22
  3. Very specific:

    After package.json deps: npm install once → commit lockfile → verify npm ci

    line 40
  4. Very specific:

    After src/ / tests/ edits: full npm run ci — not lint-only

    line 41

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Pre-Commit CI

Run before commit or merge-ready sign-off. Do not commit on red.

Install

npm ci

Use npm ci (not npm install) when lockfile must match — CI and releases.

Gate

npm run ci
StepPass criteria
audit0 vulnerabilities (moderate+)
lintESLint clean
typechecktsc --noEmit
test:coverage100% on included src/
buildVite production build

Workflow

  1. After package.json deps: npm install once → commit lockfile → verify npm ci
  2. After src/ / tests/ edits: full npm run ci — not lint-only
  3. Fix all failures; re-run until exit 0
  4. 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 build

Notes

  • Coverage excludes pure UI shells — see vite.config.ts coverage.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

Download now (ZIP)

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.