skills/build-fix/SKILL.md
--- name: build-fix description: 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. --- ## 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
npx skillsauth add excatt/superclaude-plusplus skills/build-fixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Last build output:
!cat .claude/state/last-build-error.log 2>/dev/null | tail -20 || echo "No cached build error"
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.
npm run build fails)tsc --noEmit fails)/build-fix, fix build, compile error| 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 |
| 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 |
# TypeScript
npx tsc --noEmit 2>&1 | head -100
# Build
npm run build 2>&1
# ESLint (errors only)
npx eslint src/ --quiet
/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)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 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)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ 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!
// ❌ 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");
// ❌ 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";
// ❌ 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
}
// ❌ Error: Module not found
import { utils } from "./util";
// ✅ Fix: Correct path
import { utils } from "./utils";
// ✅ Fix: Add missing export
// In utils.ts: export { utils };
// ❌ 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;
}
// ❌ 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
}
// ❌ 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();
}
// ❌ Error: Cannot find module '@/components'
// ✅ Fix: Check tsconfig.json paths
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}
// Quick fix - use sparingly
const data = response as UserData;
// Safer approach
function isUser(obj: unknown): obj is User {
return obj !== null && typeof obj === 'object' && 'id' in obj;
}
// Best practice
if (user && user.profile) {
// TypeScript knows user.profile exists here
}
| Situation | Use Instead |
|-----------|-------------|
| Test failures | /verify → Fix tests |
| Performance issues | /perf-optimize |
| Security vulnerabilities | /security-audit |
| Refactoring needed | /refactoring |
| Architecture change | /architecture |
| Add new feature | /feature-planner |
/verify/build-fix → Build passes
/verify quick → Confirm Build + Type
/verify full → Full quality verification
/checkpoint/checkpoint create "before-build-fix"
/build-fix
/verify quick
# If issues: /checkpoint restore "before-build-fix"
# 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 --auto
| 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 |
╔══════════════════════════════════════════════════════╗
║ 🔧 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 ║
╚══════════════════════════════════════════════════════╝
╔══════════════════════════════════════════════════════╗
║ 🔧 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 ║
╚══════════════════════════════════════════════════════╝
testing
사용자 계획을 기존 도메인 모델에 대해 stress-test하는 인터뷰 세션. 용어를 날카롭게 다듬고, 결정이 굳어질 때마다 CONTEXT.md(도메인 어휘 사전)와 ADR을 인라인으로 갱신한다. 새 기능 요구사항 탐색은 `/brainstorm`을, 기존 도메인 모델·용어와의 정합성 점검은 이 스킬을 사용한다.
development
# Excel (XLSX) Spreadsheet Skill Claude Code supports comprehensive spreadsheet operations through the **xlsx** skill, enabling creation, editing, and analysis of Excel files (.xlsx, .xlsm, .csv, .tsv). ## Trigger - When user needs Excel spreadsheet creation or editing - Financial modeling or data analysis required - Spreadsheet formulas and calculations needed - Data import from CSV/TSV files ## Core Capabilities **Primary functions include:** - Creating new spreadsheets with formulas and f
tools
Generate structured implementation workflows from PRDs and feature requirements
development
실시간 통신 설계 가이드를 실행합니다.