home / skills / yeachan-heo / oh-my-claudecode / build-fix

build-fix skill

/skills/build-fix

This skill fixes build and TypeScript errors with minimal changes to get the project compiling without refactoring.

npx playbooks add skill yeachan-heo/oh-my-claudecode --skill build-fix

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.9 KB
---
name: build-fix
description: Fix build and TypeScript errors with minimal changes
---

# Build Fix Skill

Fix build and compilation errors quickly with minimal code changes. Get the build green without refactoring.

## When to Use

This skill activates when:
- User says "fix the build", "build is broken"
- TypeScript compilation fails
- the build command or type checker reports errors
- User requests "minimal fixes" for errors

## What It Does

Delegates to the `build-fixer` agent (Sonnet model) to:

1. **Collect Errors**
   - Run the project's type check command (e.g., `tsc --noEmit`, `mypy`, `cargo check`, `go vet`)
   - Or run the project's build command to get build failures
   - Categorize errors by type and severity

2. **Fix Strategically**
   - Add type annotations where missing
   - Add null checks where needed
   - Fix import/export statements
   - Resolve module resolution issues
   - Fix linter errors blocking build

3. **Minimal Diff Strategy**
   - NO refactoring of unrelated code
   - NO architectural changes
   - NO performance optimizations
   - ONLY what's needed to make build pass

4. **Verify**
   - Run the project's type check command after each fix
   - Ensure no new errors introduced
   - Stop when build passes

## Agent Delegation

```
Task(
  subagent_type="oh-my-claudecode:build-fixer",
  model="sonnet",
  prompt="BUILD FIX TASK

Fix all build and TypeScript errors with minimal changes.

Requirements:
- Run tsc/build to collect errors
- Fix errors one at a time
- Verify each fix doesn't introduce new errors
- NO refactoring, NO architectural changes
- Stop when build passes

Output: Build error resolution report with:
- List of errors fixed
- Lines changed per fix
- Final build status"
)
```

## Stop Conditions

The build-fixer agent stops when:
- Type check command exits with code 0
- Build command completes successfully
- No new errors introduced

## Output Format

```
BUILD FIX REPORT
================

Errors Fixed: 12
Files Modified: 8
Lines Changed: 47

Fixes Applied:
1. src/utils/validation.ts:15 - Added return type annotation
2. src/components/Header.tsx:42 - Added null check for props.user
3. src/api/client.ts:89 - Fixed import path for axios
...

Final Build Status: ✓ PASSING
Verification: [type check command] (exit code 0)
```

## Best Practices

- **One fix at a time** - Easier to verify and debug
- **Minimal changes** - Don't refactor while fixing
- **Document why** - Comment non-obvious fixes
- **Test after** - Ensure tests still pass

## Use with Other Skills

Combine with other skills for comprehensive fixing:

**With Ultrawork:**
```
/ultrawork fix all build errors
```
Spawns multiple build-fixer agents in parallel for different files.

**With Ralph:**
```
/ralph fix the build
```
Keeps trying until build passes, even if it takes multiple iterations.

**With Pipeline:**
```
/pipeline debug "build is failing"
```
Uses: explore → architect → build-fixer workflow.

Overview

This skill fixes build and TypeScript compilation errors quickly with minimal, targeted code changes. It aims to get the build green without refactoring or architectural changes. The approach is conservative: one fix at a time, verify each change, and stop when the build passes.

How this skill works

It runs the project type checker or build command to collect and categorize errors, then applies focused fixes such as adding type annotations, null checks, and correcting imports. After each change the skill reruns the type check or build to verify no new errors were introduced. The process continues until the build succeeds or no safe minimal fixes remain.

When to use it

  • You or CI report "fix the build" or "build is broken"
  • TypeScript compilation fails (tsc errors)
  • A build command or type checker reports blocking errors
  • You want minimal changes rather than refactoring or architecture work
  • You need a quick verification loop to get tests or CI passing

Best practices

  • Apply one fix at a time and verify by rerunning the type checker or build
  • Restrict edits to the minimal lines required to resolve the error
  • Avoid refactoring, performance changes, or architectural modifications during the fix
  • Add short comments for non-obvious fixes so future reviewers understand intent
  • Run unit/integration tests after the build is green to ensure runtime behavior remains correct

Example use cases

  • CI failing on TypeScript errors after a dependency upgrade — fix imports and types to restore CI
  • Local developer changes cause tsc failures — apply minimal null checks and annotations to unblock work
  • Monorepo module resolution errors — correct import paths or export signatures to get the build passing
  • Linter or type errors blocking deployment — fix the specific lint/type issue without broader refactors
  • Parallelized fixing where multiple agents each handle distinct failing files to reduce turnaround

FAQ

Will the skill refactor or change architecture?

No. It intentionally avoids refactoring and architectural changes, focusing only on the minimal edits needed to make the build pass.

How does it ensure fixes are safe?

Each fix is followed by rerunning the type checker or build to ensure no new errors appear; non-obvious changes are documented with comments.