Borrowing it
Nothing to install: this file belongs to abdullah1854/MCPGateway. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/abdullah1854/MCPGateway/main/.agents/skills/test-driven-fix/SKILL.mdgit clone --depth 1 https://github.com/abdullah1854/MCPGatewayWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/abdullah1854/mcpgateway/test-driven-fix)<a href="https://agentmods.dev/skills/abdullah1854/mcpgateway/test-driven-fix"><img src="https://agentmods.dev/badge/skills/abdullah1854/mcpgateway/test-driven-fix/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/abdullah1854/mcpgateway/test-driven-fix"><img src="https://agentmods.dev/badge/skills/abdullah1854/mcpgateway/test-driven-fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00065 | $0.01610 |
| Opus 5.5 | $0.00026 | $0.00644 |
| Sonnet 5.5 | $0.00013 | $0.00322 |
| Haiku 4.5 | $0.00006 | $0.00161 |
Grade A, and why
test-driven-fix scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 188 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test-Driven Fix Protocol
When This Skill Activates
- "Write a test first", "fix with TDD", "test-driven fix"
- "Reproduce with a test", "make the tests pass"
- Bug fixes where a test suite already exists
- Iterative fix cycles where verification is automated
- After 2+ failed fix attempts on the same bug (escalation)
Anti-Hallucination Rules (NEVER violate)
| Rule | Description |
|---|---|
| TEST MUST FAIL FIRST | Never skip the "reproduce" step. The test MUST fail before you fix anything, proving it captures the bug |
| MINIMAL FIX ONLY | Fix the bug, not the neighborhood. Don't refactor, don't add features, don't "improve" surrounding code |
| NO BLIND RETRIES | If a fix doesn't work, DIAGNOSE why before trying again. Never retry the same approach |
| EVIDENCE AT EVERY STEP | Show test output at each phase. User should see: failing test → diagnosis → fix → passing test |
| FULL SUITE AFTER FIX | After your fix passes the targeted test, run the FULL test suite. No regressions allowed |
| 3-ATTEMPT LIMIT | If 3 fix attempts fail, STOP and escalate to the user with findings so far |
The Loop: REPRODUCE → DIAGNOSE → FIX → VALIDATE
Phase 1: REPRODUCE (Write or Identify Failing Test)
If tests already exist:
# Run existing tests to identify failures
npm test # or: bun test, pytest, cargo test, etc.
# Isolate the specific failing test
npm test -- --grep "test name"
If no test captures the bug, write one:
// The test MUST:
// 1. Set up the exact conditions that trigger the bug
// 2. Assert the EXPECTED behavior (what should happen)
// 3. FAIL with the current code (proving it catches the bug)
describe('BugDescription', () => {
it('should [expected behavior] when [condition]', () => {
// Arrange: set up the bug conditions
const input = /* exact input that triggers the bug */;
// Act: run the code
const result = functionUnderTest(input);
// Assert: what SHOULD happen (this will fail now)
expect(result).toBe(expectedValue);
});
});
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 188 lines · 65 tokens per session scan A c189debf2611
test-driven-fix is a skill published in the GitHub repository abdullah1854/MCPGateway (17 stars, last pushed 3mo ago), licensed MIT. It adds 65 tokens to every session and 1,610 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.
resolve-author-fix
Find the root cause, implement a focused fix, and prove behavior with targeted tests and recordings.
rpa-bugfix
Run when the user invokes /rpa-bugfix together with a clear bug description (expected vs actual, reproduction). Reproduction test first, then fix, full test suite, short report. Will not work correctly without the bug details.
代码调试
A debugging workflow that reproduces a problem with a failing test, collects evidence, finds the underlying cause, applies a fix, and runs regression checks. Regression checks verify that the fix does not break behavior that already worked.
rpi-remediate
Validate and resolve every actionable pre-launch finding in ordered local waves with TDD, finding disposition and preservation of strategic exceptions.
pn-systematic-debugging
Root cause analysis with triage mode — Phase 0 feedback loop, investigate first, one question max, then isolate, hypothesize, confirm. Outputs TDD fix plan with RED-GREEN cycles; optional GitHub issue via GitHub MCP. Use when debugging a failure or bug.