gap-trap — Gated Quality Framework for Agent-Written Code
Installs and refines a repo quality framework where every agent rule names a gate that fails a commit, push, or CI run.
Dev & CodingAdvanced★ 181⑂ 9AI score 9/10Last updated: Oct 2, 2026
What it does
- Discovers the repo (stack, test/lint commands, CI provider, contract candidates using real symbol names), shows a single plan for confirmation, then executes.
- Writes the instruction layer (
AGENTS.md,AGENTS.project.md,CLAUDE.md,agents/) from templates and migrates existing rules from.cursorrules,copilot-instructions.md, andCONTRIBUTING.mdrow by row — nothing is dropped silently. - Builds the actual gates in your test runner and CI: instruction-file gate, proven-red tests, PR body check, ratchet counters, and a mutation smoke for risky modules; each gate is proven red with a scratch violation, then committed as one logical change at a time.
refinemode audits rules without gates, contracts pointing at symbols that no longer exist, and recent history, proposing the next rules and gates as a single PR — and deletes rules with no incident behind them.
Who it's for
- Teams and solo devs whose coding agents (Claude Code, Codex) write most of the code
- Anyone tired of written-but-ignored project rules and wanting mechanical enforcement
- Users who can edit pre-commit hooks and CI, and who run a top-tier model (Opus-class)
Examples
gap-trap setup— bootstrap contracts, gates, hooks, and CI in a repo that has none.gap-trap refine— after the first incident, derive the next rule and gate from what actually broke.- "gate the rules" / "make the agents' code match the rules" — convert prose rules in an existing
AGENTS.mdinto ID'd rules with named gates.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/pliablepixels/gap-trap/HEAD/gap-trap/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the gap-trap folder from the GitHub repo pliablepixels/gap-trap into my ~/.claude/skills/gap-trap/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/pliablepixels/gap-trap.git /tmp/gap-trap && cp -r /tmp/gap-trap/gap-trap ~/.claude/skills/ && rm -rf /tmp/gap-trap⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo to a temp folder:
git clone https://github.com/pliablepixels/gap-trap.git /tmp/gap-trap - Create the skills folder if needed:
mkdir -p ~/.claude/skills - Copy the skill in:
cp -r /tmp/gap-trap/gap-trap ~/.claude/skills/ - Clean up:
rm -rf /tmp/gap-trap - Restart Claude Code — skill lists are loaded at session start.
- Switch to a top coding model with
/model(Opus-class); on cheaper tiers the skill refuses to run by design. - In your target repo, ask for
gap-trap setuporgap-trap refine. Work on a branch: the skill commits changes and edits hooks and CI config.
View source on GitHub ↗License: MIT