Skip to content
Back to skills

Bug Trap

ASecurity

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.

  • 189 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 2, 2026
ai-agentstesting

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 2, 2026

npx -y skills add wednesday-solutions/alfred --skill bug-trap --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bug Trap?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bug Trap
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wednesday-solutions-bug-trap/badge)](https://www.skillsdirectory.com/skills/wednesday-solutions-bug-trap)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
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`.

Files in this skill

  • README.md517 B
  • SKILL.md1.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.