Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add rshankras/claude-code-apple-skills --skill tdd-bug-fixgit clone --depth 1 https://github.com/rshankras/claude-code-apple-skillsWrote 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/rshankras/claude-code-apple-skills/tdd-bug-fix)<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/tdd-bug-fix"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/tdd-bug-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/rshankras/claude-code-apple-skills/tdd-bug-fix"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/tdd-bug-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.00038 | $0.01796 |
| Opus 5.5 | $0.00015 | $0.00718 |
| Sonnet 5.5 | $0.00008 | $0.00359 |
| Haiku 4.5 | $0.00004 | $0.00180 |
Grade A, and why
tdd-bug-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 — 264 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TDD Bug Fix
Fix bugs the right way: reproduce first, fix second, verify always. Especially critical when using AI to generate fixes — the test ensures the AI actually solved the problem.
When This Skill Activates
Use this skill when the user:
- Reports a bug and wants it fixed
- Says "this is broken" or "this doesn't work"
- Asks to "fix and add a test" or "fix with TDD"
- Wants to ensure a bug doesn't come back
- Is skeptical of AI-generated fixes ("how do I know it's actually fixed?")
Why TDD for Bug Fixes
Without TDD: With TDD:
Bug reported Bug reported
→ AI generates fix → Write failing test (RED)
→ Deploy → AI generates fix (GREEN)
→ Hope it works → Test passes — confirmed fixed
→ Bug returns later → Test prevents regression forever
Process
Phase 1: Understand the Bug
Gather information:
- What's the expected behavior?
- What's the actual behavior?
- Steps to reproduce?
- Which code is involved?
Grep: "[relevant keyword]" to find the source
Read: the suspected file(s)
Identify:
- The function/method where the bug lives
- The input that triggers the bug
- The incorrect output/behavior
- The correct expected output/behavior
Phase 2: RED — Write the Failing Test
Write a test that fails because of the bug. This proves the bug exists.
Template: Logic Bug
import Testing
@testable import YourApp
@Suite("Bug Fix: [Brief description]")
struct BugFix_DescriptionTests {
@Test("should [expected behavior] — was [actual behavior]")
func reproduceBug() {
// Arrange — set up the conditions that trigger the bug
let calculator = PriceCalculator()
// Act — perform the operation that's broken
let result = calculator.applyDiscount(price: 100, percent: 50)
// Assert — what it SHOULD return (this will FAIL now)
#expect(result == 50.0) // Currently returns 0.5 (bug: divides by 100 twice)
}
}
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 · 264 lines · 38 tokens per session scan A 607b13c4fc0c
tdd-bug-fix is a skill published in the GitHub repository rshankras/claude-code-apple-skills (927 stars, last pushed 26d ago), licensed MIT. It adds 38 tokens to every session and 1,796 once invoked, about $0.0002 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-11-05.
tdd-bug-fix compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| tdd-bug-fixrshankras/claude-code-apple-skills | Skill | 927 | 26d ago | MIT | A | 38 | Claude Code |
| kotlin-testingaffaan-m/ECC | Skill | 317k | 3d ago | MIT | A | 38 | Claude Code, Kiro |
| cpp-testingaffaan-m/ECC | Skill | 317k | 3d ago | MIT | A | 34 | Claude Code, Kiro |
| image-crop-rotateinstavm/coderunner | Skill | 903 | yesterday | Apache-2.0 | A | 50 | Claude Code, Codex |
| triage-issuesoftspark/ai-toolkit | Skill | 180 | 2d ago | Apache-2.0 | A | 39 | Claude Code |
| tddsoftspark/ai-toolkit | Skill | 180 | 2d ago | Apache-2.0 | A | 33 | Claude Code |
| tdd-workflowFlorianBruniaux/claude-code-ultimate-guide | Skill | 7.6k | 2d ago | CC-BY-SA-4.0 | A | 44 | Claude Code |