build-fix
Skill14 starsChanged 37 days agoMITView on GitHub
Expert skill for resolving build errors with minimal change principle. Use for build failures, type errors, compile errors. Keywords: build, fix, error, compile, typescript, type, resolve.
13 other projects use a version of this.
Adopted by
Most recently taken up by
- codewithmukesh/dotnet-claude-kittheir own version, first seen Nov 8, 2026
- woosikkim/oh-my-claudecode-slimtheir own version, first seen Nov 8, 2026
- majay123/my-embedded-skillstheir own version, first seen Nov 8, 2026
- lza6/claw-code-tingfengtheir own version, first seen Nov 1, 2026
- jh941213/my-cc-harnesstheir own version, first seen Nov 1, 2026
- jh941213/ADLC-harnesstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use docs-ci, docs-interfaces and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
jh941213Skilldocs-ci
문서 CI(링크·OpenAPI lint·breaking 게이트·mermaid 검증)나 문서 드리프트 감지(docs.yaml 신선도 검사)를 설치하거나 돌릴 때 사용. 문서 내용 작성은 docs-architecture·docs-interfaces·docs-manuals.
Also in 3 projects that use this
jh941213Skilldocs-interfaces
API·이벤트 인터페이스 문서(OpenAPI·swagger·AsyncAPI 명세, 엔드포인트 레퍼런스, API 구성도·시퀀스, API CHANGELOG)를 만들거나 코드와 맞출 때 사용. 시스템 구성도는 docs-architecture, API 설계 원칙은 api-design-principles.
Also in 3 projects that use this
TheKREATORSSkillinstinct-export
Export instincts from project/global scope to a file
Also in 3 projects that use this
TheKREATORSSkillinstinct-import
Import instincts from file or URL into project/global scope
Also in 3 projects that use this
RachaelQuiselSkillclient-docs
Client documentation. Use when a build needs documentation updates or missing project documents need to be identified.
Also in 3 projects that use this
planailabsSkilldocs-architecture
Layout, build pipeline, and structural gotchas for this dual-Astro repo. Read before changing structure, routing, or adding content. Operational/dev-server questions → dev-build skill.
Also in 3 projects that use this
- +4 more from jh941213
- +1 more from TheKREATORS
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- codewithmukesh/dotnet-claude-kit★ 808same name
- jh941213/ADLC-harness★ 125same name
- jh941213/my-cc-harness★ 125same name
- jh941213/my-claude-code-asset★ 125same name
- jmylchreest/aide★ 19same name
- bis-code/claude-toolkit★ 8same name
- majay123/my-embedded-skills★ 8same name
- lza6/claw-code-tingfeng★ 5same name
- PatriotAgenticLLC/better_claude_skillz★ 3same name
- peopleforrester/claude-dotfiles★ 3same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository44 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adaptSkill
- animateSkill
- auditSkill
- bolderSkill
- brainstormSkill
- business-panelSkill
- checkpointSkill
- clarifySkill
- colorizeSkill
- composition-patternsSkill
- confidence-checkSkill
- config-doctorSkill
- critiqueSkill
- delightSkill
- design-auditSkill
- devils-advocateSkill
- distillSkill
- eval-harnessSkill
- feature-plannerSkill
- fix-prSkill
- frontend-designSkill
- gap-analysisSkill
- grill-with-docsSkill
- hardenSkill
- impeccableSkill
- layoutSkill
- learnSkill
- optimizeSkill
- overdriveSkill
- polishSkill
- pytest-runnerSkill
- python-best-practicesSkill
- quieterSkill
- react-best-practicesSkill
- sc-helpSkill
- security-auditSkill
- shapeSkill
- tddSkill
- typesetSkill
- ui-ux-pro-maxSkill
- uv-packageSkill
- verifySkill
- web-design-guidelinesSkill
The file
Files
Dynamic Context
Last build output:
!cat .claude/state/last-build-error.log 2>/dev/null | tail -20 || echo "No cached build error"
Build Fix Skill
Purpose
Resolve build/compile errors with minimal changes. Target only build passing - no architecture changes, refactoring, or feature additions.
Core Principle: Minimal change → Build passes → Done. Nothing more.
Activation Triggers
- Build failure (
npm run buildfails) - TypeScript compilation error (
tsc --noEmitfails) - Multiple type errors occurring
- CI/CD pipeline build failure
- User explicit request:
/build-fix,fix build,compile error
Scope Definition
✅ DO Fix (Targets for fixing)
| Category | Examples |
| Type annotations | Missing types, incorrect types |
| Null/Undefined handling | Optional chaining, nullish coalescing |
| Import/Export | Missing imports, incorrect paths |
| Type definitions | Add/modify interface, type |
| Dependency issues | Missing packages, version conflicts |
| Config files | tsconfig, eslint configuration errors |
❌ DON'T Change (Don't touch)
| Category | Reason |
| Unrelated code | Out of scope |
| Architecture | Requires separate work |
| Variable/function names | Refactoring area |
| Logic flow | Risk of functionality change |
| Performance optimization | Separate optimization work |
| Test code | Test fixes are separate |
Workflow
Step 1: Collect Errors
# TypeScript
npx tsc --noEmit 2>&1 | head -100
# Build
npm run build 2>&1
# ESLint (errors only)
npx eslint src/ --quietStep 2: Classify Errors
/build-fix
🔍 Analyzing errors...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Error Summary
┌──────────────────────┬───────┐
│ Category │ Count │
├──────────────────────┼───────┤
│ Type Inference │ 5 │
│ Missing Types │ 3 │
│ Import Errors │ 2 │
│ Null/Undefined │ 4 │
│ Config Issues │ 1 │
└──────────────────────┴───────┘
Total: 15 errors
🎯 Resolution Order:
1. Config Issues (blocks others)
2. Import Errors (dependency chain)
3. Missing Types (foundation)
4. Type Inference (detail)
5. Null/Undefined (safety)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Step 3: Apply Minimal Fixes
🔧 Fixing errors...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1/15] src/api/user.ts:45
Error: Property 'id' does not exist on type '{}'
Fix: Add type annotation
- const user = {}
+ const user: User = {} as User
[2/15] src/utils/format.ts:12
Error: Parameter 'date' implicitly has 'any' type
Fix: Add parameter type
- function formatDate(date) {
+ function formatDate(date: Date): string {
... (continued)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Step 4: Verify
✅ Verification
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Build: ✅ PASS
TypeCheck: ✅ PASS (0 errors)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Changes Summary:
- Files modified: 8
- Lines changed: +23, -15
- No architectural changes
- No logic changes
🎯 Build fixed with minimal changes!Common Error Patterns
1. Type Inference Failures
// ❌ Error: Type 'string' is not assignable to type 'number'
const count = "5"; // inferred as string
// ✅ Fix: Explicit type or conversion
const count: number = 5;
// or
const count = Number("5");2. Null/Undefined Handling
// ❌ Error: Object is possibly 'undefined'
const name = user.profile.name;
// ✅ Fix: Optional chaining
const name = user?.profile?.name;
// ✅ Fix: Nullish coalescing
const name = user?.profile?.name ?? "Unknown";3. Missing Properties
// ❌ Error: Property 'email' is missing
const user: User = { name: "John" };
// ✅ Fix: Add missing property
const user: User = { name: "John", email: "" };
// ✅ Fix: Make optional in type
interface User {
name: string;
email?: string; // optional
}4. Import Errors
// ❌ Error: Module not found
import { utils } from "./util";
// ✅ Fix: Correct path
import { utils } from "./utils";
// ✅ Fix: Add missing export
// In utils.ts: export { utils };5. Generic Constraints
// ❌ Error: Type 'T' is not assignable to constraint
function process<T>(item: T) {
return item.id; // Error: Property 'id' doesn't exist
}
// ✅ Fix: Add constraint
function process<T extends { id: string }>(item: T) {
return item.id;
}6. React Hook Violations
// ❌ Error: React Hook is called conditionally
if (condition) {
const [state, setState] = useState();
}
// ✅ Fix: Move hook outside condition
const [state, setState] = useState();
if (condition) {
// use state here
}7. Async/Await Issues
// ❌ Error: 'await' only allowed in async function
function fetchData() {
const data = await api.get();
}
// ✅ Fix: Add async
async function fetchData() {
const data = await api.get();
}8. Module Resolution
// ❌ Error: Cannot find module '@/components'
// ✅ Fix: Check tsconfig.json paths
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}Fix Strategies
Strategy 1: Type Assertion (Quick but risky)
// Quick fix - use sparingly
const data = response as UserData;Strategy 2: Type Guard (Safe)
// Safer approach
function isUser(obj: unknown): obj is User {
return obj !== null && typeof obj === 'object' && 'id' in obj;
}Strategy 3: Type Narrowing (Recommended)
// Best practice
if (user && user.profile) {
// TypeScript knows user.profile exists here
}When NOT to Use
| Situation | Use Instead |
| Test failures | /verify → Fix tests |
| Security vulnerabilities | /security-audit |
| Add new feature | /feature-planner |
Integration
With /verify
/build-fix → Build passes
/verify quick → Confirm Build + Type
/verify full → Full quality verificationWith /checkpoint
/checkpoint create "before-build-fix"
/build-fix
/verify quick
# If issues: /checkpoint restore "before-build-fix"CI/CD Integration
# Auto-fix attempt on build failure
- name: Build
run: npm run build
continue-on-error: true
- name: Auto Fix
if: failure()
run: claude build-fix --autoCommands
| Command | Description |
/build-fix | Analyze and fix build errors |
/build-fix --dry-run | Preview fixes (don't apply) |
/build-fix --auto | Auto-fix (no confirmation) |
/build-fix <file> | Fix specific file only |
Output Format
Success
╔══════════════════════════════════════════════════════╗
║ 🔧 BUILD FIX COMPLETE ║
╠══════════════════════════════════════════════════════╣
║ Errors Fixed: 15/15 ║
║ Files Modified: 8 ║
║ Lines Changed: +23, -15 ║
║ ║
║ Build Status: ✅ PASSING ║
║ Type Check: ✅ PASSING ║
║ ║
║ ⚠️ Reminder: Run /verify for full quality check ║
╚══════════════════════════════════════════════════════╝Partial Success
╔══════════════════════════════════════════════════════╗
║ 🔧 BUILD FIX PARTIAL ║
╠══════════════════════════════════════════════════════╣
║ Errors Fixed: 12/15 ║
║ Remaining: 3 ║
║ ║
║ ⚠️ Manual intervention needed: ║
║ 1. src/complex/module.ts:89 - Circular dependency ║
║ 2. src/legacy/old.ts:45 - Deprecated API usage ║
║ 3. src/types/index.ts:12 - Conflicting declarations ║
║ ║
║ 💡 Suggestions: ║
║ - Consider refactoring circular dependency ║
║ - Update deprecated API calls ║
╚══════════════════════════════════════════════════════╝Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

