- Home
- Skills
- Testing & Debugging
- Bug Triage Spec
Works with the AI Agents you already use
Bug Triage Spec
Systematic bug triage that produces root-cause analysis, bug specs, and regression tests before fixing code.
$9
Bug Triage Spec
Example session with this skill installed
Triage this bug: login returns a 500 when the session token has expired. Find the root cause and write regression tests, don't fix it yet.
- Read your context and instructions
- Compiled the bug triage spec
I reproduced the bug, traced it to a missing null check, and wrote bug-spec.md with regression cases. I did not change any code.
Reproduction (observed)
GET /api/me with an expired token
TypeError: Cannot read properties of null (reading 'userId')
at requireUser (src/auth/middleware.ts:27)
Root cause (confirmed)
verifyToken() returns null for expired tokens (src/auth/middleware.ts:22) and requireUser dereferences the result without a check (:27).
| # | Hypothesis | Status | Evidence |
|---|---|---|---|
| 1 | Missing null check after verifyToken | confirmed | middleware.ts:22-27 |
| 2 | Clock skew between servers | rejected | reproduces locally |
Blast radius
- Also affected:
requireAdmin(src/auth/middleware.ts:41) has the same pattern. - Not affected: public routes, which do not use the middleware.
Proposed minimal fix
In requireUser and requireAdmin: if the payload is null, respond 401 with { "error": "token_expired" }.
Regression tests
| ID | GIVEN | WHEN | THEN |
|---|---|---|---|
| RT1 | expired token | GET /api/me | 401 token_expired |
| RT2 | token expiring in 1 second | GET /api/me | 200 |
| RT3 | valid token | GET /api/me | 200 with user |
| RT4 | expired token | GET /api/admin | 401 token_expired |
Follow-ups (out of scope)
- Make
verifyTokenthrow a typed error instead of returningnull.
Next steps
- Add RT1 to RT4; RT1 and RT4 should fail before the fix.
- Apply the two-line fix and confirm all four pass.
PASS
Connects securely to your tools. The creator never sees your data.
About this skill
Debugging by trial and error wastes time and leads to regressions. This skill enforces a rigorous triage pipeline that moves from reproduction and root-cause investigation to a formal bug specification and regression test plan before a single line of application code is changed.
What it does
- Smallest reproduction identifies the minimal set of steps or code needed to trigger the defect.
- Root-cause investigation traces symptoms to specific file and line locations using evidence-based hypotheses.
- Formal bug specification generates a
bug-spec.mddocument covering expected vs. actual behavior and blast radius. - Regression test design creates specific test cases for the repro, boundaries, and neighboring logic.
- Risk assessment provides a final verdict of PASS, GAP, or VETO based on fix safety and evidence quality.
How it works
- Report capture analyzes your logs, stack traces, and initial description to identify information gaps.
- Investigation searches the codebase to trace execution flow and verify or reject cause hypotheses.
- Specification drafts the bug-spec and minimal fix proposal following a structured template.
- Test drafting writes failing regression tests using your project's existing testing framework.
Frameworks & tools
This skill is language-agnostic and adapts to your project's specific testing framework and directory structure by reading the manifest and existing test files.
Why this beats prompting it yourself
Generic prompts often jump straight to a fix that only masks symptoms. This skill forces a diagnostic phase that separates observed facts from inferences, ensuring the root cause is actually addressed without breaking neighboring features.
Use cases
- Triage vague reports by identifying exactly what logs or steps are missing to achieve a reproduction.
- Audit legacy bugs where the original cause was never documented or understood.
- Pre-fix verification to ensure a proposed change has a corresponding failing test case.
Known limitations
Requires either logs, stack traces, or clear reproduction steps to begin. It will not attempt to fix the bug unless explicitly instructed, focusing instead on the specification.
Requires logs, stack traces, or repro steps. Does not apply fixes by default. Limited to available codebase context via grep/glob.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 19 days ago