agentleFS
jmylchreestjmylchreest/aide/skills/build-fix/SKILL.md

build-fix

Skill19 starsChanged 3 months agoMITView on GitHub

Fix build, lint, and type errors

13 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • jh941213Skill

    docs-ci

    문서 CI(링크·OpenAPI lint·breaking 게이트·mermaid 검증)나 문서 드리프트 감지(docs.yaml 신선도 검사)를 설치하거나 돌릴 때 사용. 문서 내용 작성은 docs-architecture·docs-interfaces·docs-manuals.

    Also in 3 projects that use this

  • jh941213Skill

    docs-interfaces

    API·이벤트 인터페이스 문서(OpenAPI·swagger·AsyncAPI 명세, 엔드포인트 레퍼런스, API 구성도·시퀀스, API CHANGELOG)를 만들거나 코드와 맞출 때 사용. 시스템 구성도는 docs-architecture, API 설계 원칙은 api-design-principles.

    Also in 3 projects that use this

  • TheKREATORSSkill

    instinct-export

    Export instincts from project/global scope to a file

    Also in 3 projects that use this

  • TheKREATORSSkill

    instinct-import

    Import instincts from file or URL into project/global scope

    Also in 3 projects that use this

  • RachaelQuiselSkill

    client-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

  • planailabsSkill

    docs-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

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before starting, ensure you have:

    line 21
  2. Distinctive:

    Run all checks and capture output:

    line 29
  3. Very specific:

    Check package.json for available scripts

    line 39
  4. Very specific:

    Use npm ci for clean install if lock file exists

    line 41
  5. Distinctive:

    Use MCP tools to find definitions and patterns:

    line 60
  6. Distinctive:

    All missing imports together: - Add import statements

    line 80
  7. Distinctive:

    All type annotations together: - Add/fix type declarations

    line 81
  8. Very specific:

    All unused variables together: - Remove or prefix with _

    line 82
  9. Distinctive:

    No refactoring: - Don't improve "while you're there"

    line 117
  10. Distinctive:

    Match style: - Follow existing patterns exactly

    line 119
  11. Distinctive:

    One batch at a time: - Verify between batches

    line 120

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Build Fix Mode

Recommended model tier: balanced (sonnet) - this skill performs straightforward operations

Rapidly fix all build, type, and lint errors with minimal changes.

Prerequisites

Before starting, ensure you have:

  • Access to the project root directory
  • Build tools installed (npm, tsc, etc.)

Workflow

Step 1: Capture All Errors

Run all checks and capture output:

# Run in sequence, capture all output
npm run build 2>&1 | head -100
npm run lint 2>&1 | head -100
npx tsc --noEmit 2>&1 | head -100

If commands fail to run:

  • Check package.json for available scripts
  • Try npm install if dependencies are missing
  • Use npm ci for clean install if lock file exists

Step 2: Categorize Errors by Priority

Process errors in this order:

  1. Type errors (highest priority) - Fix TypeScript/type issues first
  2. Build errors - Compilation failures
  3. Lint errors - ESLint, Prettier, etc.
  4. Warnings - Address only if trivial

Group similar errors:

  • Missing imports
  • Type mismatches
  • Unused variables
  • Formatting issues

Step 3: Search for Context

Use MCP tools to find definitions and patterns:

# Find type definitions
mcp__plugin_aide_aide__code_search query="InterfaceName" kind="interface"

# Find function signatures
mcp__plugin_aide_aide__code_search query="functionName" kind="function"

# Get symbols in a file
mcp__plugin_aide_aide__code_symbols file="path/to/file.ts"

# Check project conventions
mcp__plugin_aide_aide__decision_get topic="coding-style"

Step 4: Apply Fixes Systematically

Fix in batches by category:

  1. All missing imports together - Add import statements
  2. All type annotations together - Add/fix type declarations
  3. All unused variables together - Remove or prefix with _

Step 5: Verify After Each Batch

# Run full verification
npm run build && npm run lint && npx tsc --noEmit

Verification criteria:

  • Exit code 0 for all commands
  • No error output
  • Warnings are acceptable if not introduced by changes

Step 6: Final Verification

# Run tests to ensure fixes didn't break functionality
npm test

Failure Handling

FailureAction
npm run build fails to startRun npm install first
Circular dependency errorCheck import structure, may need refactoring
Type error in third-party libCheck @types package version, update if needed
Cannot resolve moduleCheck tsconfig.json paths, baseUrl settings
ESLint config errorCheck .eslintrc, ensure plugins installed
Fix introduces new errorsRevert and try alternative approach

Rules

  • Minimal changes - Fix only what's broken
  • No refactoring - Don't improve "while you're there"
  • No new features - Just fix errors
  • Match style - Follow existing patterns exactly
  • One batch at a time - Verify between batches

Common Fixes Reference

ErrorFix
Cannot find moduleAdd import statement
Type 'X' not assignableAdd type annotation or use type assertion
'X' is declared but never usedRemove or prefix with _
Missing return typeAdd explicit return type
Unexpected anyAdd proper type annotation
Property does not existCheck interface, add property or fix typo
Argument of type X not assignableCheck function signature, cast if needed

MCP Tools

  • mcp__plugin_aide_aide__code_search - Find type definitions, function signatures
  • mcp__plugin_aide_aide__code_symbols - List all symbols in a file
  • mcp__plugin_aide_aide__decision_get - Check project coding decisions

Output Format

Report all fixes made:

## Build Fix Report

### Errors Fixed

- `src/foo.ts:10` - Added missing import for `Bar`
- `src/foo.ts:25` - Fixed type: `string` -> `string | null`
- `src/bar.ts:5` - Removed unused variable `temp`

### Verification

- Build: PASS
- Lint: PASS
- Types: PASS
- Tests: PASS

### Notes
[Any observations or remaining warnings]

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.