From Darkroom Engineering
Automated bug-fixing workflow for errors, merge conflicts, and failing CI. Spawns specialized agents to explore, reproduce, diagnose, implement, and verify fixes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/darkroom:fixThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Before starting work, create a marker: `mkdir -p ~/.claude/tmp && echo "fix" > ~/.claude/tmp/heavy-skill-active && date -u +"%Y-%m-%dT%H:%M:%SZ" >> ~/.claude/tmp/heavy-skill-active`
Before starting work, create a marker: mkdir -p ~/.claude/tmp && echo "fix" > ~/.claude/tmp/heavy-skill-active && date -u +"%Y-%m-%dT%H:%M:%SZ" >> ~/.claude/tmp/heavy-skill-active
You are in Maestro orchestration mode. Delegate immediately to specialized agents.
git branch --show-current 2>/dev/null || echo "unknown"git log --oneline -5 2>/dev/null || echo "no commits"git status --porcelain 2>/dev/null | head -10explore agent to understand the affected codebase areatester agent to create a failing test if possibleimplementer agent to fix the issuetester agent to confirm the fix~/.claude/CLAUDE.md captures it; for team-wide gotchas use /share-learning to post to the team-knowledge repoFollow CLAUDE.md Guardrails (scope constraint, 2-iteration limit). Only modify files directly related to the bug.
Build after every fix: Run the build after each individual fix attempt. Never stack multiple untested fixes -- verify green before moving on. If the build breaks, fix that before continuing.
Autonomous fix-verify loop: once the reproducer exists, set
/goal the reproducer test passes and the full suite is green, or stop after 5 attempts
to keep iterating without re-prompting. Keep the 2-iteration scope rule in mind when
choosing the stop clause.
Spawn explore and tester first — these accept thin prompts because they discover what they need from the codebase:
Agent(explore, "Investigate the bug: $ARGUMENTS. Find relevant files, trace the issue.")
Agent(tester, "Create a failing test that reproduces: $ARGUMENTS")
Then assemble the implementer prompt from the actual outputs. Implementer runs in an isolated worktree with no access to prior agent results, so paste real content — not placeholders, not references:
$ARGUMENTS) verbatimexplore reported (copy them in)explore identified, quoted line-by-line — not "based on findings"Now spawn:
Agent(implementer, "<the assembled briefing above — all five items inline>")
Agent(reviewer, "Quick review of the fix for quality and edge cases")
Skip the implementer step if explore reports the bug is non-reproducible or
already fixed in current HEAD.
Return a concise summary:
If the failure is unresolved git merge conflicts (not a code bug), skip the explore/tester loop:
git diff --name-only --diff-filter=U lists conflicted paths.bun install, npm install, etc.) rather than hand-editing.Guardrails:
If the failure is on a pushed branch with an open PR (not a local bug), use gh pr checks as the source of truth — it covers all PR-attached checks, not just GitHub Actions:
gh pr view --json number,url,headRefName.gh pr checks --json name,bucket,state,workflow,link.gh run view RUN_ID --log-failed.link to the provider.gh pr checks after every push.Guardrails:
npx claudepluginhub darkroomengineering/cc-settings --plugin darkroomCoordinates diagnosis, test-driven reproduction, root-cause analysis, and targeted fixes for bugs with regression testing.
Enforces a structured bug-fix workflow: reproduce, isolate, apply smallest fix, and verify. Helps investigate errors, debug crashes, and make failing tests pass.