# champion/guardrails

Turn review findings into rules that catch the whole bug class every time: a per-repo bug-class ledger, an eliminate-or-record decision for every finding (type or API wrapper, lint rule, CI check, test generator), risk-tiered review (none for low-risk changes, one combined code and security review at trust boundaries, no re-review of fix rounds), self-merge gates for agent PRs, model checking for state machines with safety promises, and metrics (reverts, fix-forwards, findings per review) to lower review over time. Tested recipes for Go, TypeScript, Python, GitHub Actions and semgrep. Use after any review finding or escaped bug, for "ban this API", "make sure this never happens again", "does this PR need review", "can the agent merge this", "set up a repo for agent PRs", "bug-class ledger", "revert rate", or "TLA+ for this flow".

- Author: Yashas (https://app.skillsync.com/champion)
- Price: Free
- Version: 1

## Files

- SKILL.md (12599 bytes)
- ledger-template.md (4411 bytes)
- recipes/README.md (4303 bytes)
- recipes/ci/check-doc-claims.ts (4696 bytes)
- recipes/github-actions/workflow-lint.yml (1357 bytes)
- recipes/go/differential/go.mod (40 bytes)
- recipes/go/differential/hostallow.go (833 bytes)
- recipes/go/differential/hostallow_fuzz_test.go (1545 bytes)
- recipes/go/identityheader/cmd/identityheader/main.go (338 bytes)
- recipes/go/identityheader/go.mod (170 bytes)
- recipes/go/identityheader/go.sum (632 bytes)
- recipes/go/identityheader/identityheader.go (3453 bytes)
- recipes/go/identityheader/identityheader_test.go (412 bytes)
- recipes/go/identityheader/testdata/src/a/a.go (726 bytes)
- recipes/go/identityheader/testdata/src/trustedproxy/p.go (309 bytes)
- recipes/python/ruff.toml (2180 bytes)
- recipes/semgrep/fail-open-allowlist.yml (1991 bytes)
- recipes/semgrep/plaintext-transit.yml (1393 bytes)
- recipes/semgrep/secret-in-output.yml (2726 bytes)
- recipes/semgrep/shared-resource-in-tests.yml (2085 bytes)
- recipes/semgrep/spoofable-identity.yml (2604 bytes)
- recipes/semgrep/untrusted-input-executed.yml (1969 bytes)
- recipes/tla/MergeGate.cfg (134 bytes)
- recipes/tla/MergeGate.tla (4724 bytes)
- recipes/tla/MergeGateBuggy.cfg (188 bytes)
- recipes/typescript/eslint.config.mjs (593 bytes)
- recipes/typescript/guardrails.rules.mjs (3190 bytes)
- references/human-steps.md (4397 bytes)
- references/model-checking.md (4167 bytes)
- scripts/review-metrics.ts (13625 bytes)

## How to use it

1. Connect the Skillsync MCP server: https://app.skillsync.com/mcp (OAuth sign-in).
2. Add it to your library: https://app.skillsync.com/champion/guardrails
3. Load it with the get_skill tool: `get_skill("champion/guardrails")`, then follow its instructions.
