gap-trap skill
A skill that reads a repository once and installs checks: code rules become gates that fail a commit or a CI run.
- 180 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The skill reads the whole repository and adds checks and CI jobs that block commits and builds.
- Wrongly chosen contracts break the pipeline for every later session, so they must be reviewed.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/gap-trapDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The skill reads the whole repository and adds checks and CI jobs that block commits and builds.
- Wrongly chosen contracts break the pipeline for every later session, so they must be reviewed.
This is third-party code. Review the repository files before installing.
What it does
gap-trap runs once in a repository. It studies the code, writes rules that fit that specific project and adds a gate for each rule: a check that fails the commit or the CI run when the rule is broken. The agent cannot skip it. The skill sets up four things. Contracts describe parts of the code with one right way to do things, such as HTTP, logging, settings or auth: what to use, what to avoid and which check catches bypasses. Proven red is a CI job that runs each new test against old code and fails if the test passes there. Ratchets count known problems, for example the lint backlog or files over 400 lines, and allow only decreases. Playbooks record what the project learned the hard way. For Node and Python the gates live inside the test suite, and other languages get shell versions that need git, grep and awk. The skill also installs the sibling slop-mop so documents and commits read as written by a person.
Who it is for. Teams where an agent writes most of the code, nobody reads every diff and quality must still not drift.
Good fit when
- The agent duplicates helpers that already exist and crosses layer boundaries for a shortcut.
- Tests assert that the code ran, not that it did the right thing.
- Rules sit in CLAUDE.md but the agent forgets them after a week.
- Lint debt keeps piling up in a repository and needs a ratchet.
Not a fit when
- The project is small and one instructions file is enough.
- There is no time to review the generated contracts, which is mandatory.
- Only a weak model is available: the skill stops on anything below the top coding model.
Example request
Run gap-trap in this repository, propose contracts for HTTP, logging and settings and add gates to CI.Limitations
The skill runs on the top coding model of the host: Opus or better in Claude Code, the frontier coding model at high reasoning in Codex. It stops on smaller models because a wrong contract choice costs every later session. A human must review the generated rules and contracts before committing. Every push to `main` is a new version, and updates go through `npx skills update gap-trap` or by replacing the directory by hand. The sibling slop-mop applies only from the session after the one that installs it.
How to disable. Delete the `gap-trap` directory from `~/.claude/skills/` (for Codex from `~/.agents/skills/`). Remove the gates and CI jobs it added to the repository by hand.
FAQ
How do I install gap-trap?
Run `npx skills add pliablepixels/gap-trap` or clone the repository and copy the `gap-trap` directory into `~/.claude/skills/` (`~/.agents/skills/` for Codex).
What is a gate?
A check that fails the commit or CI run when a rule is broken. Unlike a text instruction, the agent cannot skip it.
Which languages are supported?
Any. Node and Python get gates inside the test suite, while Go, Rust, Java, Ruby, .NET, PHP, Swift and C++ get shell versions using git, grep, awk and your test command.
What is proven red?
A CI job runs each new test against the old code and fails when the test passes there. A test that cannot fail proves nothing.
How do I update the skill?
Use `npx skills update gap-trap`. For a hand install, pull the clone and replace the copy entirely so files removed upstream do not linger.
Discussion
No questions or reviews yet.
Related
SkillsAn adversarial code-audit skill: Hunter finds bugs, Skeptic challenges them, Referee rules, and no source edit happens without your permission
The evidence-code-review skill for Codex and Claude Code: evidence-based change review with MUST, SHOULD, BETTER and NITS levels
A CLI and MCP for testing agent skills: repeatable YAML evals, report comparison, regression detection and skilled-improve
A Claude Code plugin that makes an agent check the code around a change and prove the work with a test and independent review
A skill that guides Claude Code and Codex through writing and fixing pytest API tests with a real-run verification loop.
33 engineering-discipline skills for Claude Code, Codex and Gemini CLI plus vibe-cli for CI: review, tests, coverage, deploy, rollback
README in short
The project covers quality drift in a repository with agent-written code and solves it with checks instead of text rules. It lists four artifacts, the model requirement and the update flow. Reference files on discovery, framework, gates and refinement and AGENTS.md and CLAUDE.md templates sit alongside.
README badge
Original SKILL.md
--- name: gap-trap description: Use when asked to set up, install, or refine an agent quality framework in a repository (rules with gates, architecture contracts, proven-red tests, ratchets, playbooks), or when the user says "gap-trap", "gap-trap setup", "gap-trap refine", "gate the rules", or "make the agents' code match the rules". --- # gap-trap Sets up a quality framework for repositories where agents write most of the code. Every rule the agents follow has a gate that fails a commit, a push, or a CI run when the rule breaks. A rule a script could check but that names no gate is a defect. The framework is the one described in `reference/framework.md`; read it before either mode. Two modes: `setup` builds the framework in a repo that has none. `refine` audits a repo that has it and proposes the next rules and gates from what broke. Bare `gap-trap` with no keyword means `setup` when the repo has no `AGENTS.project.md`, otherwise `refine`. A hand-written `AGENTS.md` or `CLAUDE.md` on its own is input to setup, not a sign the framework exists. ## Model gate This skill runs on the top coding model of your harness: in Claude Code, Opus or a more capable model (Opus 4.8 or newer, Opus 5, Fable, Mythos); in Codex, the frontier coding model at high or xhigh reasoning effort. Discovery decides which parts of a codebase get a contract, and a wrong contract costs every later session. Your system prompt names your model. If it is a cheaper or faster tier (Sonnet, Haiku, a mini model, or low reasoning effort), stop. Read nothing, write nothing. Say exactly this and end the turn: > gap-trap runs on the top coding model of this harness. You are on > <model name>. Switch with `/model`, then run gap-trap again. Do not dispatch stronger subagents from a weaker orchestrator, start "the easy parts", or offer a lighter version. ## setup