From mk
Detects language from build errors, loads fix patterns, and auto-retries. Use for 'build failed', 'fix compilation', 'type error'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mk:build-fix [error output or file path]When to use
Use when build/compilation fails — detect language, load fix patterns, auto-retry. NOT for runtime errors (see mk:fix) or architectural debugging (see mk:investigate).
[error output or file path]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Detects language from error output, loads the appropriate reference, classifies the error
Detects language from error output, loads the appropriate reference, classifies the error
by fixability, applies the fix, and chains into mk:verify to confirm the build is green.
Phase: 3 (Build GREEN)
Handoff: If mk:verify passes → proceed to Phase 4 (Review). If 3 attempts exhausted → escalate to user.
Run the failing build command and capture full output. If error output was passed as input, use that directly.
Match error patterns in order (first match wins):
| Pattern | Language | Reference |
|---|---|---|
error TS\d{4}: | TypeScript | references/typescript-errors.md |
SyntaxError: or ModuleNotFoundError: or IndentationError: | Python | references/python-errors.md |
cannot find package or undefined: or syntax error near (Go) | Go | references/general-errors.md |
error[E\d{4}] (Rust) | Rust | references/general-errors.md |
| Any other pattern | Unknown | references/general-errors.md |
Load the matched reference file before proceeding to Step 3.
After loading the reference, classify the error:
| Class | Description | Action |
|---|---|---|
| auto-fixable | Syntax errors, missing imports, simple type mismatches | Apply fix immediately |
| suggest-with-confidence | Wrong argument types, missing interface properties | Propose fix, apply after brief explanation |
| report-only | Runtime errors, architectural issues, circular dependencies | Describe the problem and root cause; do not auto-fix |
Auto-fixable examples: TS1005 Expected semicolon, TS2307 Cannot find module (missing import) Suggest-with-confidence examples: TS2322 type mismatch, TS2345 argument type mismatch Report-only examples: Circular dependency, architectural type mismatch requiring refactor
For auto-fixable and suggest-with-confidence:
any type as a fixFor report-only:
Run mk:verify (or the project's build command directly if verify not available).
If the build still fails after applying a fix:
After 3 failed attempts, escalate to user with:
Track attempts in the session. Reset counter when switching to a different error.
Per tdd-rules.md Rule 4: max 3 self-healing attempts, then escalate.
references/typescript-errors.md — TS error codes with fix patternsreferences/python-errors.md — Python exception types with fix patternsreferences/general-errors.md — Framework-agnostic build error patternsNEVER use TypeScript any as a fix for type errors. Always use unknown + type guards or
fix the actual type mismatch. See security-rules.md — any type is a blocked pattern.
.tsbuildinfo hides real errors on warm incremental builds — tsc --incremental skips files it thinks are unchanged; a corrupt or out-of-date .tsbuildinfo causes TS to report 0 errors while the actual output is broken; delete .tsbuildinfo and rerun tsc --noEmit before declaring the build clean.npm ci on a different OS — packages like esbuild, sharp, @swc/core ship OS-specific binaries; a node_modules/ copied from macOS to Linux (or via Docker volume mount) silently uses wrong binaries until a cryptic "invalid ELF header" or "exec format error" appears at runtime; always run npm ci fresh inside the container, never share node_modules across platforms.npm install prints peer dep warnings as non-fatal by default; a eslint@8 peer warning can hide the real problem that @typescript-eslint/parser@6 requires eslint@8 but 9 is installed, causing TypeError: eslint.linter is not a constructor at runtime; always resolve peer warnings before treating the build as clean.rm -rf dist .tsbuildinfo && tsc) to ensure you're seeing the complete error set, not just the delta from last run.tsc but break bundlers at runtime — TypeScript compiles circular imports without error; Vite/webpack may emit a broken bundle where one module resolves to {} because the other hadn't initialized yet; run madge --circular src/ to detect cycles as part of build triage.npx claudepluginhub ngocsangyem/meowkit --plugin mkDiagnoses and fixes TypeScript compile errors, runtime exceptions, build failures, and test issues in JavaScript/Node.js projects via linting, dependency reinstalls, and code patterns. Use for task failures.
Fixes TypeScript build and compilation errors incrementally: runs npm/pnpm build, analyzes and prioritizes errors by file/severity, applies one fix at a time with context review, re-verifies until resolved.
Fixes build, lint, and TypeScript errors in npm-based projects. Runs npm build/lint/tsc checks, categorizes issues by priority, applies minimal batch fixes, and verifies.