Skip to content

Latest commit

 

History

History
77 lines (52 loc) · 2.77 KB

recipes.md

File metadata and controls

77 lines (52 loc) · 2.77 KB

Recipes — wiring skillgate into the finish line

Every recipe enforces the same .skillgate/done.yaml, so you define "done" once and reuse it everywhere. Ready-to-copy adapters live in contrib/.

Claude Code (PreToolUse hook)

Make Claude Code unable to git commit / git push / npm publish until the gates pass. The hook denies the finish-line command and feeds the failing gates back into the same session, so Claude fixes the work instead of shipping it.

pre-commit

Block local commits until gates pass.

# .pre-commit-config.yaml
- repo: local
  hooks:
    - id: skillgate
      name: skillgate check
      entry: npx @reneza/skillgate@latest check
      language: system
      pass_filenames: false
      always_run: true

CI (GitHub Actions)

Gate every push and pull request.

- run: npx @reneza/skillgate@latest check

skillgate gates its own repo this way — see .github/workflows/ci.yml.

Loop + gate (retry until really done)

A retry loop's natural stop condition is the model saying it finished — the exact signal you cannot trust. loop-until-done.sh makes skillgate check the stop condition instead: the loop keeps going until a script, not the model, agrees.

Agent definition of done

Use this when a coding agent can edit a repo, run tools, and claim completion. The model still proposes the work, but the finish line is owned by deterministic checks:

Copy the example to .skillgate/done.yaml, replace the command gates with the repo's real test/build/generation commands, and keep public-facing or irreversible changes behind an evidence file that a human reviewer fills in.

Self-hosted git server (pre-receive)

Enforce the gate server-side on a VPS, so a push is rejected at the remote if the work is not done — no client cooperation required.

Anywhere else

The CLI is the contract: skillgate check exits 0 when done, 1 when a gate fails, 2 on a usage error. Anything that can read an exit code can gate on it.