---
name: fix
description: "Fix bugs with engine-powered root-cause analysis — precise file targeting"
category: workflow
tags: [debug, bugfix, root-cause]
depends-on: [init]
input: "bug description or error message"
output: "fixed code with minimal token usage"
token-estimate: 2000
parallel-safe: false
argument-hint: "[bug description or error]"
user-invocable: true
allowed-tools: Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion
model: claude-sonnet-4-6
context: inline
agent: general-purpose
---

# Fix — Engine-Powered Bug Fixing

Fix the described bug. The engine provides precise context for root-cause analysis.

## Precise Context (auto-generated by engine)

!`ccs context "$ARGUMENTS" 2>/dev/null || node $HOME/.claude/skills/_ccs/engine/cli.js context "$ARGUMENTS" 2>/dev/null`

## Steps

### 1. Analyze
Using the context above, identify the root cause:
- Which file and function contains the bug?
- What is the dependency chain?
- Are there related tests?

### 2. Fix
- Read the specific file(s) identified
- Apply the minimal fix
- Preserve existing patterns and conventions

### 3. Verify
- Run related tests if they exist
- The index auto-updates after your edits

## Rules
- NEVER explore beyond what the engine provided
- For errors not found in context, Grep for the exact error string
- Fix the root cause, not symptoms
- After fix → suggest `/ccs-test` to verify

---
*10x-Code v2.0.2*
