# Fix

> Analyze Linear issues, validate them against the codebase, then implement fixes and create draft PRs.

- Skill: `aztecprotocol/fix` (Agent Skill)
- Install (CLI): `npx skillmds@latest add aztecprotocol/fix`
- Raw SKILL.md: https://api.skillmd.com/api/skills/aztecprotocol/fix/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: aztecprotocol (https://skillmd.com/u/aztecprotocol)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/aztecprotocol/fix

---


# Fix Issues

Given a list of Linear issue numbers, analyze each one against the codebase, then implement fixes and create draft PRs.

## Phase 1: Triage (main context)

For each issue number provided:

1. Fetch the full issue description using `mcp__linear-server__get_issue`.
2. Investigate the codebase to determine if the issue is valid:
   - Find the files/functions mentioned in the issue description.
   - Read the relevant code and assess whether the described bug or problem actually exists.
3. Produce a summary table for the user:

| Issue | Title | Verdict | Reasoning |
|-------|-------|---------|-----------|
| A-XXX | ...   | Valid / Invalid / Unclear | One-line explanation |

4. Ask the user which issues to proceed with. Default is all valid issues.
5. For each confirmed issue, set its Linear status to "In Progress" using `mcp__linear-server__save_issue`.

## Phase 2: Implementation

Work through each confirmed issue **sequentially** in the main checkout:

1. **Stash & branch**: Stash any uncommitted changes, then create a branch from `next` using the issue's `gitBranchName` from Linear (or the component's merge train, see CLAUDE.md). For a fix scoped to the v5 release line, branch from `v5-next` instead.
   ```
   git stash
   git checkout -B <gitBranchName> origin/next
   ```

2. **Implement the fix**: Edit the relevant files.

3. **Build**: Run `yarn build` from `yarn-project` to verify the fix compiles.

4. **Commit**: Stage only the changed files and commit with a descriptive message.
   - Message format: `fix: <short description> (A-XXX)`
   - Include `Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>`

5. **Push & PR**: Push the branch and create a draft PR. Use `--base v5-next` for v5-scoped fixes.
   ```
   git push -u origin <gitBranchName>
   gh pr create --draft --base next --title "fix: ..." --body "..."
   ```
   - The PR body should reference the Linear issue (e.g. `Fixes A-XXX`).

6. **Return to original branch**: Switch back and restore stashed changes before moving to the next issue.
   ```
   git checkout <original-branch>
   git stash pop
   ```

Repeat for each issue.

## After all issues are done

Report a summary table with the PR URL for each issue, or what went wrong if any failed.

| Issue | Title | PR |
|-------|-------|----|
| A-XXX | ...   | URL or error |

