build-fix · sangrokjung — Claude Code command: what it does, how to install
build-fix runs npm or pnpm builds, parses compiler errors, and fixes them incrementally. It verifies every edit with a fresh build run.
MIT ★ 880 updated 2026-09-03
.claude/commands/build-fix.mdWhat build-fix does
The command triggers npm run build or pnpm build, captures compiler output, and groups errors by file. For each issue, the assistant inspects surrounding code context and applies a targeted fix. Then it rebuilds immediately.
Edits happen one issue at a time. If a fix triggers new compiler errors or fails to resolve the same problem after 3 attempts, execution halts automatically. This prevents destructive modification loops. At the end, the assistant outputs a summary of resolved and remaining issues.
This skill runs inline without persisting data to agent memory. If you need learned memory across sessions, run the build-error-resolver agent directly instead. Execution requires tool permissions for file inspection and Bash commands for npm, pnpm, or npx.
What it helps with
- resolve TypeScript compilation errors one by one
- verify code edits automatically with fresh build runs
- group compiler diagnostics by affected file
- halt automated fixes when an error persists after 3 attempts
Example prompts for the agent
- /build-fix
- Run /build-fix to clean up TypeScript errors in this package
- Check the pnpm build output and fix the remaining type failures step by step
How to install build-fix
Manually: put the files in place
.claude/commands/build-fix.mdCall it with /build-fix. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/build-fix.mdCall it with /prompts:build-fix. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/build-fix.prompt.mdManually: put the files in place
.gemini/commands/build-fix.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about build-fix
How to install build-fix in Claude Code?
Add the command file to .claude/commands/build-fix.md in your project repository.
What does the build-fix command do?
It runs your build script using npm or pnpm, reviews error output, and applies fixes one error at a time. A fresh build runs after each change to verify the fix.
When does build-fix stop automatically?
It halts if a change creates new errors, if the same issue persists after 3 attempts, or when paused manually.
Source text
build-fix.md · MIT
--- description: 빌드 에러를 자동으로 분석하고 수정합니다. allowed-tools: Read, Edit, Glob, Grep, Bash(npm:*), Bash(pnpm:*), Bash(npx:*) --- > 참고: 이 스킬은 build-error-resolver 에이전트를 호출하지 않고 인라인 실행됩니다. 에이전트의 memory 학습이 필요하면 Agent 도구로 build-error-resolver를 직접 호출하세요. # Build and Fix Incrementally fix TypeScript and build errors: 1. Run build: npm run build or pnpm build 2. Parse error output: - Group by file - Sort by severity 3. For each error: - Show error context (5 lines before/after) - Explain the issue - Propose fix - Apply fix - Re-run build - Verify error resolved 4. Stop if: - Fix introduces new errors - Same error persists after 3 attempts - User requests pause 5. Show summary: - Errors fixed - Errors remaining - New errors introduced Fix one error at a time for safety!
© sangrokjung · MIT · sangrokjung/claude-forge
Similar slash commands
All slash commands for Programming languages →build-fix by other authors comes first.