[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DTNS8XM5PNAFHWSQRYFEJB":3,"skill-same:01M7DTNS8XM5PNAFHWSQRYFEJB":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7DTNS8XM5PNAFHWSQRYFEJB","mk-build-fix",null,"Build error triage: detect language, load fix patterns, auto-retry. Chains into mk:verify. NOT for runtime errors (mk:fix); NOT for architecture debugging (mk:investigate).","ngocsangyem\u002FMeowKit","ngocsangyem","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F33769536?v=4","01M6J3FSMJAG9PVQEGRT7AQ9J2","Sang Nguyen","01M6J3FSRTJG0MNP6NV71639RM",16,"MIT","https:\u002F\u002Fgithub.com\u002Fngocsangyem\u002FMeowKit\u002Fblob\u002Fmain\u002Fkit\u002Fbundles\u002Fcodex\u002Froot\u002F.agents\u002Fskills\u002Fmk-build-fix\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"mk-build-fix\"\ndescription: \"Build error triage: detect language, load fix patterns, auto-retry. Chains into mk:verify. NOT for runtime errors (mk:fix); NOT for architecture debugging (mk:investigate).\"\n---\n\n# Build Fix — Universal Build Error Resolver\n\nDetects language from error output, loads the appropriate reference, classifies the error\nby fixability, applies the fix, and chains into `mk:verify` to confirm the build is green.\n\n## When to Use\n\n- Build command fails (npm run build, tsc, go build, python -m build, cargo build)\n- Type check errors (TypeScript TS\\d{4}, mypy)\n- Compilation errors in any language\n- Triggers: \"build failed\", \"fix build\", \"compilation error\", \"type error\"\n\n## Phase Anchor\n\n**Phase: 3 (Build GREEN)**\n**Handoff:** If `mk:verify` passes → proceed to Phase 4 (Review). If 3 attempts exhausted → escalate to user.\n\n## Process\n\n### Step 1: Capture Error Output\n\nRun the failing build command and capture full output. If error output was passed as input,\nuse that directly.\n\n### Step 2: Detect Language\n\nMatch error patterns in order (first match wins):\n\n| Pattern | Language | Reference |\n|---------|----------|-----------|\n| `error TS\\d{4}:` | TypeScript | `references\u002Ftypescript-errors.md` |\n| `SyntaxError:` or `ModuleNotFoundError:` or `IndentationError:` | Python | `references\u002Fpython-errors.md` |\n| `cannot find package` or `undefined: ` or `syntax error near` (Go) | Go | `references\u002Fgeneral-errors.md` |\n| `error[E\\d{4}]` (Rust) | Rust | `references\u002Fgeneral-errors.md` |\n| Any other pattern | Unknown | `references\u002Fgeneral-errors.md` |\n\nLoad the matched reference file before proceeding to Step 3.\n\n### Step 3: Classify Error Fixability\n\nAfter loading the reference, classify the error:\n\n| Class | Description | Action |\n|-------|-------------|--------|\n| **auto-fixable** | Syntax errors, missing imports, simple type mismatches | Apply fix immediately |\n| **suggest-with-confidence** | Wrong argument types, missing interface properties | Propose fix, apply after brief explanation |\n| **report-only** | Runtime errors, architectural issues, circular dependencies | Describe the problem and root cause; do not auto-fix |\n\n**Auto-fixable examples:** TS1005 Expected semicolon, TS2307 Cannot find module (missing import)\n**Suggest-with-confidence examples:** TS2322 type mismatch, TS2345 argument type mismatch\n**Report-only examples:** Circular dependency, architectural type mismatch requiring refactor\n\n### Step 4: Apply Fix\n\nFor auto-fixable and suggest-with-confidence:\n- Apply the minimal change that resolves the error\n- Do not refactor beyond what the error requires (YAGNI)\n- Follow security-rules.md — do NOT use `any` type as a fix\n\nFor report-only:\n- Describe what needs to change and why\n- Stop — do not modify files\n- Return the diagnosis to the developer\n\n### Step 5: Verify Fix\n\nRun `mk:verify` (or the project's build command directly if verify not available).\n\n### Step 6: Iterate (Max 3 Attempts)\n\nIf the build still fails after applying a fix:\n- Attempt 2: re-classify with updated error output, try different approach\n- Attempt 3: re-classify one final time with a different approach\n\nAfter 3 failed attempts, **escalate to user** with:\n- All 3 error outputs\n- All 3 attempted fixes and why each failed\n- Suspected root cause\n- Suggested next steps (architectural review, dependency update, etc.)\n\n## Attempt Counter\n\nTrack attempts in the session. Reset counter when switching to a different error.\nPer the TDD rules Rule 4: max 3 self-healing attempts, then escalate.\n\n## Reference Files\n\n- `references\u002Ftypescript-errors.md` — TS error codes with fix patterns\n- `references\u002Fpython-errors.md` — Python exception types with fix patterns\n- `references\u002Fgeneral-errors.md` — Framework-agnostic build error patterns\n\n## Security Constraint\n\nNEVER use TypeScript `any` as a fix for type errors. Always use `unknown` + type guards or\nfix the actual type mismatch. See `security-rules.md` — `any` type is a blocked pattern.\n\n## Gotchas\n\n- **Stale `.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.\n- **Platform-specific native binaries fail silently after `npm ci` on a different OS** — packages like `esbuild`, `sharp`, `@swc\u002Fcore` ship OS-specific binaries; a `node_modules\u002F` 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.\n- **Peer dependency warnings mask fatal version mismatches** — `npm install` prints peer dep warnings as non-fatal by default; a `eslint@8` peer warning can hide the real problem that `@typescript-eslint\u002Fparser@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.\n- **Different error output on cold vs warm cache means fixing the wrong error** — a first clean build often surfaces errors that incremental builds skip; fix errors only after a full clean build (`rm -rf dist .tsbuildinfo && tsc`) to ensure you're seeing the complete error set, not just the delta from last run.\n- **Circular dependencies aren't caught by `tsc` but break bundlers at runtime** — TypeScript compiles circular imports without error; Vite\u002Fwebpack may emit a broken bundle where one module resolves to `{}` because the other hadn't initialized yet; run `madge --circular src\u002F` to detect cycles as part of build triage.","# Build Fix — Universal Build Error Resolver\n\nDetects language from error output, loads the appropriate reference, classifies the error\nby fixability, applies the fix, and chains into `mk:verify` to confirm the build is green.\n\n## When to Use\n\n- Build command fails (npm run build, tsc, go build, python -m build, cargo build)\n- Type check errors (TypeScript TS\\d{4}, mypy)\n- Compilation errors in any language\n- Triggers: \"build failed\", \"fix build\", \"compilation error\", \"type error\"\n\n## Phase Anchor\n\n**Phase: 3 (Build GREEN)**\n**Handoff:** If `mk:verify` passes → proceed to Phase 4 (Review). If 3 attempts exhausted → escalate to user.\n\n## Process\n\n### Step 1: Capture Error Output\n\nRun the failing build command and capture full output. If error output was passed as input,\nuse that directly.\n\n### Step 2: Detect Language\n\nMatch error patterns in order (first match wins):\n\n| Pattern | Language | Reference |\n|---------|----------|-----------|\n| `error TS\\d{4}:` | TypeScript | `references\u002Ftypescript-errors.md` |\n| `SyntaxError:` or `ModuleNotFoundError:` or `IndentationError:` | Python | `references\u002Fpython-errors.md` |\n| `cannot find package` or `undefined: ` or `syntax error near` (Go) | Go | `references\u002Fgeneral-errors.md` |\n| `error[E\\d{4}]` (Rust) | Rust | `references\u002Fgeneral-errors.md` |\n| Any other pattern | Unknown | `references\u002Fgeneral-errors.md` |\n\nLoad the matched reference file before proceeding to Step 3.\n\n### Step 3: Classify Error Fixability\n\nAfter loading the reference, classify the error:\n\n| Class | Description | Action |\n|-------|-------------|--------|\n| **auto-fixable** | Syntax errors, missing imports, simple type mismatches | Apply fix immediately |\n| **suggest-with-confidence** | Wrong argument types, missing interface properties | Propose fix, apply after brief explanation |\n| **report-only** | Runtime errors, architectural issues, circular dependencies | Describe the problem and root cause; do not auto-fix |\n\n**Auto-fixable examples:** TS1005 Expected semicolon, TS2307 Cannot find module (missing import)\n**Suggest-with-confidence examples:** TS2322 type mismatch, TS2345 argument type mismatch\n**Report-only examples:** Circular dependency, architectural type mismatch requiring refactor\n\n### Step 4: Apply Fix\n\nFor auto-fixable and suggest-with-confidence:\n- Apply the minimal change that resolves the error\n- Do not refactor beyond what the error requires (YAGNI)\n- Follow security-rules.md — do NOT use `any` type as a fix\n\nFor report-only:\n- Describe what needs to change and why\n- Stop — do not modify files\n- Return the diagnosis to the developer\n\n### Step 5: Verify Fix\n\nRun `mk:verify` (or the project's build command directly if verify not available).\n\n### Step 6: Iterate (Max 3 Attempts)\n\nIf the build still fails after applying a fix:\n- Attempt 2: re-classify with updated error output, try different approach\n- Attempt 3: re-classify one final time with a different approach\n\nAfter 3 failed attempts, **escalate to user** with:\n- All 3 error outputs\n- All 3 attempted fixes and why each failed\n- Suspected root cause\n- Suggested next steps (architectural review, dependency update, etc.)\n\n## Attempt Counter\n\nTrack attempts in the session. Reset counter when switching to a different error.\nPer the TDD rules Rule 4: max 3 self-healing attempts, then escalate.\n\n## Reference Files\n\n- `references\u002Ftypescript-errors.md` — TS error codes with fix patterns\n- `references\u002Fpython-errors.md` — Python exception types with fix patterns\n- `references\u002Fgeneral-errors.md` — Framework-agnostic build error patterns\n\n## Security Constraint\n\nNEVER use TypeScript `any` as a fix for type errors. Always use `unknown` + type guards or\nfix the actual type mismatch. See `security-rules.md` — `any` type is a blocked pattern.\n\n## Gotchas\n\n- **Stale `.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.\n- **Platform-specific native binaries fail silently after `npm ci` on a different OS** — packages like `esbuild`, `sharp`, `@swc\u002Fcore` ship OS-specific binaries; a `node_modules\u002F` 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.\n- **Peer dependency warnings mask fatal version mismatches** — `npm install` prints peer dep warnings as non-fatal by default; a `eslint@8` peer warning can hide the real problem that `@typescript-eslint\u002Fparser@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.\n- **Different error output on cold vs warm cache means fixing the wrong error** — a first clean build often surfaces errors that incremental builds skip; fix errors only after a full clean build (`rm -rf dist .tsbuildinfo && tsc`) to ensure you're seeing the complete error set, not just the delta from last run.\n- **Circular dependencies aren't caught by `tsc` but break bundlers at runtime** — TypeScript compiles circular imports without error; Vite\u002Fwebpack may emit a broken bundle where one module resolves to `{}` because the other hadn't initialized yet; run `madge --circular src\u002F` to detect cycles as part of build triage.",{"name":5,"description":7},"main","c7ff0a9e672de2c0590b03f6459385c2d7a63c1a","kit\u002Fbundles\u002Fcodex\u002Froot\u002F.agents\u002Fskills\u002Fmk-build-fix",3,"https:\u002F\u002Fgithub.com\u002Fngocsangyem\u002FMeowKit","https:\u002F\u002Fdocs.meowkit.dev\u002F","https:\u002F\u002Fgithub.com\u002Fngocsangyem","Keep moving forward","2026-11-15 03:54:21",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add ngocsangyem\u002FMeowKit --skill mk-build-fix",{"tool":39,"command":40},"bunx","bunx skills add ngocsangyem\u002FMeowKit --skill mk-build-fix",{"tool":42,"command":43},"pnpm","pnpm dlx skills add ngocsangyem\u002FMeowKit --skill mk-build-fix","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fngocsangyem\u002FMeowKit\u002Fblob\u002Fmain\u002Fkit\u002Fbundles\u002Fcodex\u002Froot\u002F.agents\u002Fskills\u002Fmk-build-fix\u002FSKILL.md",true,[47,53,57],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fgeneral-errors.md","REFERENCE","参考文档",4344,"https:\u002F\u002Fgithub.com\u002Fngocsangyem\u002FMeowKit\u002Fblob\u002Fmain\u002Fkit\u002Fbundles\u002Fcodex\u002Froot\u002F.agents\u002Fskills\u002Fmk-build-fix\u002Freferences\u002Fgeneral-errors.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fpython-errors.md",3569,"https:\u002F\u002Fgithub.com\u002Fngocsangyem\u002FMeowKit\u002Fblob\u002Fmain\u002Fkit\u002Fbundles\u002Fcodex\u002Froot\u002F.agents\u002Fskills\u002Fmk-build-fix\u002Freferences\u002Fpython-errors.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Ftypescript-errors.md",4785,"https:\u002F\u002Fgithub.com\u002Fngocsangyem\u002FMeowKit\u002Fblob\u002Fmain\u002Fkit\u002Fbundles\u002Fcodex\u002Froot\u002F.agents\u002Fskills\u002Fmk-build-fix\u002Freferences\u002Ftypescript-errors.md",[62,69,76,83,90,97],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7DVHF481B4J41T4855KGM50","mk-worktree","Manages git worktrees for parallel agent isolation: creates parallel\u002F{name}-{timestamp} branches, merges with conflict detection. NOT for user feature branches (use git worktree directly).","https:\u002F\u002Fgithub.com\u002Fngocsangyem\u002FMeowKit\u002Fblob\u002Fmain\u002Fkit\u002Fbundles\u002Fcursor\u002Froot\u002F.cursor\u002Fskills\u002Fmk-worktree\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7DVHAWVKDKPB1EA3F1NC4JC","mk-workflow-orchestrator","Auto-invoked 7-phase workflow for complex-feature intent; fasttrack mode for pre-approved specs. NOT for explicit single tasks (mk:cook), green-field builds (mk:autobuild), or simple fixes (mk:fix).","https:\u002F\u002Fgithub.com\u002Fngocsangyem\u002FMeowKit\u002Fblob\u002Fmain\u002Fkit\u002Fbundles\u002Fcursor\u002Froot\u002F.cursor\u002Fskills\u002Fmk-workflow-orchestrator\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7DVH6SYBHWW00TRZXCC56JW","mk-web-to-markdown","Fetch a URL and return clean markdown, for arbitrary external pages (blog, RFC, GitHub issue, vendor doc) not covered by mk:docs-finder. Static-only by default; opt-in JS rendering available.","https:\u002F\u002Fgithub.com\u002Fngocsangyem\u002FMeowKit\u002Fblob\u002Fmain\u002Fkit\u002Fbundles\u002Fcursor\u002Froot\u002F.cursor\u002Fskills\u002Fmk-web-to-markdown\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7DVH3HGW47BX3PEF30JV6EJ","mk-vulnerability-scanner","Vulnerability analysis: OWASP Top 10, current threat landscape, supply chain security, attack surface mapping, risk prioritization. Use for security audits. NOT for STRIDE\u002FCSO infra audits (mk:cso).","https:\u002F\u002Fgithub.com\u002Fngocsangyem\u002FMeowKit\u002Fblob\u002Fmain\u002Fkit\u002Fbundles\u002Fcursor\u002Froot\u002F.cursor\u002Fskills\u002Fmk-vulnerability-scanner\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7DVGZBKMB9WDFH9MFMA99FV","mk-vue","Vue 3 authoring\u002Freview: components, composables, reactivity, Pinia, Pinia Colada, file routing, forms. Composition API + script setup. Auto-activates on .vue files. Deep review: mk:vue-best-practices.","https:\u002F\u002Fgithub.com\u002Fngocsangyem\u002FMeowKit\u002Fblob\u002Fmain\u002Fkit\u002Fbundles\u002Fcursor\u002Froot\u002F.cursor\u002Fskills\u002Fmk-vue\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M7DVGSE12AA1M7599HB8HRCT","mk-vue-testing-best-practices","Vue 3 testing best-practices review: Vitest + Vue Test Utils for components, composables, Pinia, Router, async\u002FSuspense, forms, a11y, plus Playwright E2E strategy. Advisory only.","https:\u002F\u002Fgithub.com\u002Fngocsangyem\u002FMeowKit\u002Fblob\u002Fmain\u002Fkit\u002Fbundles\u002Fcursor\u002Froot\u002F.cursor\u002Fskills\u002Fmk-vue-testing-best-practices\u002FSKILL.md",[],[]]