一键导入
build-fix
Run the build and intelligently fix errors with guardrails. Stops if fixes introduce more errors or the same error persists after 3 attempts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run the build and intelligently fix errors with guardrails. Stops if fixes introduce more errors or the same error persists after 3 attempts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Security and quality review of uncommitted changes. Checks for vulnerabilities, code smells, and best practice violations. Use before committing.
Context window conservation rules. Invoke when approaching context limits or before large tasks.
Create session learning logs that persist institutional memory across Claude Code sessions.
Deep reflection on the skill learning system itself. Analyzes what's working, what's stale, and proposes structural improvements. The meta-skill.
Deep security audit for web applications. Checks secrets, input validation, XSS, API security, and dependency vulnerabilities.
Pre-PR verification loop. Runs build, type check, lint, security audit, and debug statement scan. Use before creating PRs or merging.
| name | build-fix |
| updated | "2026-02-20T00:00:00.000Z" |
| description | Run the build and intelligently fix errors with guardrails. Stops if fixes introduce more errors or the same error persists after 3 attempts. |
| disable-model-invocation | true |
| allowed-tools | Bash, Read, Edit, Grep, Glob, TodoWrite |
Run the project build, parse errors, and fix them incrementally with smart guardrails.
Determine the build command from the project:
package.json with build script → npm run buildCargo.toml → cargo buildgo.mod → go build ./...pyproject.toml / setup.py → python -m build or pip install -e .Makefile with build target → make build<build-command> 2>&1
If build succeeds, report success and exit. Otherwise continue.
Parse errors from build output. Group by file and sort by dependency order:
Common error patterns:
Use TodoWrite to track each error group (by file):
- Fix 3 type errors in src/types/models.ts
- Fix 1 missing property in src/store/slice.ts
- Fix 2 import errors in src/pages/index.tsx
For each error, follow this cycle:
| Guardrail | Condition | Action |
|---|---|---|
| Error loop | Same error in same file after 3 fix attempts | STOP. Report the error and suggest manual review. |
| Error explosion | Re-build shows MORE errors than before | REVERT last edit. Report what happened. |
| Architectural change needed | Fix requires changing interfaces used by 5+ files | STOP. Report as architectural issue needing manual decision. |
| Missing dependency | Error requires installing a new package | STOP. Report the missing package, do not auto-install. |
| 20 error limit | More than 20 individual errors | Fix the first 20, then re-build to see if downstream errors resolve. |
After fixing all parsed errors (or hitting a guardrail), re-run the build.
BUILD FIX REPORT
═══════════════════════════
Result: [SUCCESS / PARTIAL / BLOCKED]
Errors fixed: X
Files modified: Y
Build cycles: Z
═══════════════════════════
Fixed:
- src/types/models.ts:42 — Added missing property 'name'
- src/components/Foo.tsx:18 — Added null check for optional data
Remaining (if any):
- src/store/slice.ts:100 — Architectural: interface change affects 8 files
- src/lib/bar.ts:5 — Missing dependency: some-package
Warnings (pre-existing):
- List any known warnings that existed before
// Before
const value = data.property;
// After
const value = data?.property;
Check if the type definition needs updating, not the usage.
Prefer widening the type to adding type casts.
Use the project's path alias convention (e.g., @/ for src/).
@ts-ignore, as any, # type: ignore, or similar suppressions as fixes