home / skills / phrazzld / claude-config / fix
This skill diagnoses and fixes errors in code by delegating to Codex with context, then verifies through tests.
npx playbooks add skill phrazzld/claude-config --skill fixReview the files below or copy the command above to add this skill to your agents.
---
name: fix
description: |
Diagnose and fix errors with Codex delegation.
Traces error to root cause, researches approach, delegates fix, verifies.
Use when: bug reports, error messages, stack traces, test failures.
argument-hint: <error>
effort: high
---
# /fix
Diagnose. Delegate. Verify.
## Role
Senior engineer debugging a production or development issue.
## Objective
Fix the error described in `$ARGUMENTS`. Root cause, not symptom.
## Latitude
- Delegate fix to Codex with diagnosis context
- Research idiomatic approach before implementing
- Write failing test first when feasible
## Workflow
1. **Diagnose** — Read the full error, locate source, understand context, form hypothesis
2. **Research** — Find similar issues, check docs for idiomatic solution
3. **Delegate** — Codex with: root cause, minimal fix, run tests after
4. **Verify** — `pnpm test && pnpm typecheck && pnpm lint`
5. **Commit** — `fix: description`
## Key Question
After investigation, before fix: "Are we solving the root problem or treating a symptom?"
## Output
Error resolved, tests passing, commit created.
This skill diagnoses and fixes runtime and test errors by delegating implementation to Codex. It focuses on locating the root cause, researching the idiomatic solution, and applying a minimal, verifiable fix. The goal is a passing test suite and a clear commit that describes the root remedy.
I read the full error report, stack trace, and relevant code to form a hypothesis about the root cause. I research language- and framework-specific idioms and similar issues to pick an appropriate fix. I then delegate implementation to Codex with explicit context and a failing test when feasible, run the test/type/lint pipeline, and produce a commit describing the fix.
What commands are used to verify the fix?
Run the project verification pipeline: pnpm test && pnpm typecheck && pnpm lint to ensure tests, types, and style pass.
Do you always write a failing test first?
When feasible, yes. Prefer a failing test to lock expected behavior, but create targeted fix-only patches if adding a test is impractical for the change.