Agent skill

TDD Bug Fix

by gustavscirulis in gustavscirulis/snapgrid

Fix bugs using red-green-refactor — reproduce the bug as a failing test first, then fix it.

Custom licenceAuto-check: notesDevelopment

Install TDD Bug Fix

skills CLI
$ npx skills add gustavscirulis/snapgrid --skill tdd-bug-fix -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gustavscirulis/snapgrid tdd-bug-fix --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gustavscirulis/snapgrid.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/skills/testing/tdd-bug-fix .claude/skills/tdd-bug-fix && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tdd-bug-fix
GitHub stars
117
Used in
1 other repo
Token cost
~2k tokens
SKILL.md length
413 words
Files
1
Skills in repo
118
Repo updated
First seen
Licence
Custom licence

At a glance

Fix bugs using red-green-refactor — reproduce the bug as a failing test first, then fix it.

  • Works in 5 steps: Understand the Bug → RED — Write the Failing Test → GREEN — Fix the Bug → …
  • Fixing bugs to ensure they never regress
  • SKILL.md covers When This Skill Activates, Why TDD for Bug Fixes, Process and Multiple Related Bugs, plus 1 more section
  • Calls xcodebuild and make

What it does

TDD Bug Fix is an agent skill from gustavscirulis/snapgrid. Fix bugs using red-green-refactor — reproduce the bug as a failing test first, then fix it. Use when fixing bugs to ensure they never regress.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Test-driven development and Debugging. The repository describes itself as: SnapGrid is an open-source Mac app for collecting, organizing, and analyzing UI screenshots. It uses AI to automatically detect UI components and patterns, making it a powerful…

When your agent uses it

  • Fixing bugs to ensure they never regress
  • Tasks that involve Test-driven development
  • Tasks that involve Debugging

Example prompts

  • “/tdd-bug-fix”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Understand the Bug
  2. RED — Write the Failing Test
  3. GREEN — Fix the Bug
  4. REFACTOR (Optional)
  5. Verify Completeness

What it can do on your machine

Read from SKILL.md and the folder at commit eb7eaf4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Glob
    • Grep
    • Bash
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • xcodebuild
    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

TDD Bug Fix loads about 2k tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 413 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~39
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 413 words (~1,953 tokens).

“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.”

— opening of SKILL.md by gustavscirulis, Custom licence
name
tdd-bug-fix
allowed-tools
Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .claude/skills/skills/testing/tdd-bug-fix of gustavscirulis/snapgrid.

Open the folder on GitHubat commit eb7eaf4

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in gustavscirulis/snapgrid, which our catalogue first saw on October 7, 2026.

Compare with similar skills

TDD Bug Fix next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

TDD Bug Fix compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
TDD Bug Fix this skillgustavscirulis/snapgrid1171 repos~2kAutomated safety check: NotesCustom licence
Development Workflowrunceel/ReactiveProperty944—~1.4kAutomated safety check: PassMIT
Triage Issuesoftspark/ai-toolkit179—~1.3kAutomated safety check: NotesApache-2.0
Write Failing Test FirstArchive228/loopkit755—~197Automated safety check: PassMIT
Compound Engineering DebugEveryInc/compound-engineering-plugin25k—~4.2kAutomated safety check: PassMIT
Foreman DebugVisionForge-OU/foreman443—~1.1kAutomated safety check: PassCustom licence

Similar skills

  • Development Workflow

    runceel/ReactiveProperty

    ReactiveProperty repository development policy. An agent skill from runceel/ReactiveProperty.

    944 GitHub stars~1.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Triage Issue

    softspark/ai-toolkit

    Bug triage: explores codebase for root cause, files GitHub issue with TDD fix plan.

    179 GitHub stars~1.3k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Write Failing Test First

    Archive228/loopkit

    Before fixing any bug, write a test that reproduces it and watch it fail.

    755 GitHub stars~197 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Compound Engineering Debug

    EveryInc/compound-engineering-plugin

    Finds the root cause of failing or slow behavior with a hypothesis-driven loop, then fixes it test-first if you choose, or hands back a diagnosis only.

    25k GitHub stars~4.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Foreman Debug

    VisionForge-OU/foreman

    Headless root-cause debugging loop for a Foreman worker whose tests, build, or acceptance check are failing — especially on a retry.

    443 GitHub stars~1.1k tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Fix Bug

    tddworks/ClaudeBar

    Guide for fixing bugs in ClaudeBar following Chicago School TDD and rich domain design.

    1.5k GitHub stars~2.2k tokensUpdated today
    Testing & QAAuto-check passed

More from gustavscirulis/snapgrid

All 118 skills in this repo
  • Interaction Design

    gustavscirulis/snapgrid

    Design and implement microinteractions, motion design, transitions, and user feedback patterns.

    117 GitHub starsUsed in 3 repos~2k tokens
    Auto-check passed
  • Account Deletion

    gustavscirulis/snapgrid

    Generates an Apple-compliant account deletion flow with multi-step confirmation UI, optional data export, configurable grace period, Keychain cleanup, and server-side deletion request.

    117 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check: notes
  • Alarmkit

    gustavscirulis/snapgrid

    AlarmKit integration for scheduling alarms and timers with custom UI, Live Activities, and snooze support.

    117 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Analytics Interpretation

    gustavscirulis/snapgrid

    Interpret app metrics and make data-driven decisions. An agent skill from gustavscirulis/snapgrid.

    117 GitHub starsUsed in 1 repo~4.1k tokens
    Auto-check passed
  • Analytics Setup

    gustavscirulis/snapgrid

    Generates protocol-based analytics infrastructure with swappable providers (TelemetryDeck, Firebase, Mixpanel).

    117 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check: notes
  • Announcement Banner

    gustavscirulis/snapgrid

    Generates an in-app announcement banner system with remote configuration, scheduling, deep link actions, and dismiss tracking.

    117 GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check: notes

Questions about TDD Bug Fix

What does TDD Bug Fix do?

Fix bugs using red-green-refactor — reproduce the bug as a failing test first, then fix it. TDD Bug Fix is an agent skill from gustavscirulis/snapgrid. Fix bugs using red-green-refactor — reproduce the bug as a failing test first, then fix it.

When should I use TDD Bug Fix?

TDD Bug Fix fits situations like: fixing bugs to ensure they never regress; tasks that involve Test-driven development; tasks that involve Debugging.

How do I install TDD Bug Fix in Claude Code?

Run `npx skills add gustavscirulis/snapgrid --skill tdd-bug-fix -a claude-code`. Or copy the skill folder (.claude/skills/skills/testing/tdd-bug-fix in gustavscirulis/snapgrid) into .claude/skills/tdd-bug-fix in your project. Claude Code loads it when a task matches its description.

How do I install TDD Bug Fix in Codex?

Run `npx skills add gustavscirulis/snapgrid --skill tdd-bug-fix -a codex`. Or copy the skill folder (.claude/skills/skills/testing/tdd-bug-fix in gustavscirulis/snapgrid) into .agents/skills/tdd-bug-fix in your project. Codex loads it when a task matches its description.

Can I use TDD Bug Fix in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gustavscirulis/snapgrid --skill tdd-bug-fix -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tdd-bug-fix, .gemini/skills/tdd-bug-fix, .github/skills/tdd-bug-fix and .opencode/skills/tdd-bug-fix in your project.

What does TDD Bug Fix need to run?

Going by SKILL.md and its folder, TDD Bug Fix needs the command-line tools its instructions call (xcodebuild and make). Its frontmatter pre-approves these tools: Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion.

Does TDD Bug Fix access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is TDD Bug Fix safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does TDD Bug Fix use?

TDD Bug Fix has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does TDD Bug Fix use?

About 2k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to TDD Bug Fix?

Skills that share tags, products or a category with TDD Bug Fix: Development Workflow (runceel/ReactiveProperty, 944 stars), Triage Issue (softspark/ai-toolkit, 179 stars), Write Failing Test First (Archive228/loopkit, 755 stars) and Compound Engineering Debug (EveryInc/compound-engineering-plugin, 25k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains TDD Bug Fix?

gustavscirulis (a GitHub user) maintains it in gustavscirulis/snapgrid, which has 117 GitHub stars. The repository holds 118 skills in this directory. The repository was last updated on April 30, 2026.

Source: gustavscirulis/snapgrid on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.