Skip to content
AI & Agents
Skill

/bug-trap

Write and fix tests that catch real bugs, by testing behaviour, faking only the device boundary and seeding data the way the product writes it. Use when a bug needs a test that fails first, or a unit test is failing or flaky, or when the user says "add a test for this bug", "fix

From plugin
skills
18515 skills

Claude Code

$ npx -y skills add off-grid-ai/skills --skill bug-trap --agent claude-code

SKILL.md

bug-trap.SKILL.md
name: bug-trap
description: Write and fix tests that catch real bugs, by testing behaviour, faking only the device boundary and seeding data the way the product writes it. Use when a bug needs a test that fails first, or a unit test is failing or flaky, or when the user says "add a test for this bug", "fix this failing test" or "why is this test flaky". For the bar every test is held to, use test-like-a-user.

Tests

1. **Test behaviour, not layout.** Tests should survive a UI redesign. 2. **Below the UI first:** engine and service contract tests for what the feature does. 3. **Rendered tests** find elements by role, label or test id. Never by copy or position. 4. **Fake only the device boundary:** native modules, network, disk, clock, memory. No mocks of the project's own code. 5. **Seed through the product's own write paths.** Data enters the way the app writes it (capture, import, analysis), never by `INSERT` into its tables. A hand-seeded row tests your guess of the schema, not the product. 6. **A failing test is a finding.** Fix the cause. Never loosen the test or raise a timeout. 7. **Hard cases:** read `test-like-a-user/reference/test-doctrine.md`. For the full standard on journeys and review verdicts, see `test-like-a-user`.

@wednesday-solutions
Ships withskills

These are the skills I use every day. I built Off Grid AI on my own with them, and it reached 250,000+ downloads on 7 platforms without spending a dollar on ads. Install them and your AI works the way mine does.

Stars on GitHub

Momentum

stars in total
185
Star history of wednesday-solutions/ai-agent-skills on GitHub, a chart by star-history.com

Other skills on skills.

audit-a-module

audit-a-module

Health check one module or service and recommend what to do with it: leave it, clean it up, refactor it with care, or don't touch…

blast-radius

blast-radius

Before editing a file or symbol, find everything that depends on it, score how risky the change is, and stop for approval when…

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw4w393k
@openclaw@openclawInstall Skill

Questions about bug-trap.

Which coding agents can use bug-trap?
bug-trap installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.