Gap Trap
Turns vibe coding into high quality code. Sets up rules and gates in your repo so AI-written code stays correct without you reviewing every line.
Install
npx skills add pliablepixels/gap-trapclaude mcp add gap-trap -- npx skills add pliablepixels/gap-trap{
"mcpServers": {
"gap-trap": {
"command": "npx",
"args": [
"skills",
"add",
"pliablepixels/gap-trap"
]
}
}
}Install command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →gap-trap
Turns vibe coding into high quality code. Complements SDD if you are using it (think of it as the inner loop within)
The problem
An agent writes most of your code. It is fast, so you stop reading every diff. Quality drifts, and you find out when something breaks.
The drift looks the same in every codebase. The agent writes a helper that already exists. It crosses a layer boundary because the shortcut compiled. It writes a test that asserts the code ran, not that it did the right thing. It follows a rule in your instructions file for a week and then forgets it.
Nothing stops any of this. The rules are text, and the only thing that reads them is the agent that breaks them.
What gap-trap does
Run it once in a repository. It reads the code, writes the rules that fit that codebase, and adds a gate for each rule. A gate is a check that fails the commit or the CI run when the rule is broken. The agent cannot skip a gate.
It sets up four things:
| What it is | |
|---|---|
| Contracts | One entry per part of the code that has one right way to do things (HTTP, logging, settings, auth). Each says what to use, what never to use, and which check finds bypasses. |
| Proven red | A CI job that runs every new test against the old code and fails when the test passes there. A test that cannot fail proves nothing. |
| Ratchets | Counts of known problems, such as the lint backlog or files over 400 lines. They may go down, never up. |
| Playbooks | The facts the project learned the hard way, written down so the next session does not learn them again. |
It also installs slop-mop, a sibling skill, so the agent's docs, commit messages, and PR bodies read like a person wrote them. A harness loads its skills when the session starts, so slop-mop applies from the session after the one that installs it.
Works with any language. Node and Python repos get gates inside their test suite; everything else (Go, Rust, Java, Ruby, .NET, PHP, Swift, C++) gets shell versions that need only git, grep, awk, and your test command.
IMPORTANT: Validate the rules/contracts that are generated. This is where it is important to review thoroughly so you start with a strong foundation.
Install
With the skills CLI:
npx skills add pliablepixels/gap-trap
Or by hand. Claude Code reads ~/.claude/skills, Codex reads
~/.agents/skills:
git clone https://github.com/pliablepixels/gap-trap.git
mkdir -p ~/.claude/skills # Codex: mkdir -p ~/.agents/skills
cp -r gap-trap/gap-trap ~/.claude/skills/
The skill runs on the top coding model of the harness (Opus or better in Claude Code, the frontier coding model at high reasoning in Codex) and stops on anything smaller. Choosing the wrong contracts costs every later session.
Update
Every push to main is a new version. With the skills CLI:
npx skills update gap-trap
For a hand install, pull the clone and replace the copy, so files removed upstream do not linger:
git -C gap-trap pull
rm -rf ~/.claude/skills/gap-trap # Codex: ~/.agents/skills/gap-trap
cp -r gap-trap/gap-trap ~/.claude/skills/
A repository you already set up keeps the files setup wrote. Updating
the skill changes what the next setup or refine run does.
Run
In the repository you want to set up:
/gap-trap setup
Codex invokes the same skill as $gap-trap setup.
Similar plugs
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…
Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
Production-grade engineering skills for AI coding agents.
The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create prototypes, websites, apps, dashboards, presentations, images, and videos with your team…