用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/InugamiDev/ultrathink-oss --skill build-resolver命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Unified design foundations — design system architecture, tokens, component specs, visual principles, creative vision, figma integration, plus brand design system loader (66 real brands via DESIGN.md). Absorbs design, design-system, design-systems, design-principles, design-router, creative-vision, figma, design-md.
Render, summarize, and present markdown documents and structured content in multiple output modes
Ultra UI skill - combines Google's DESIGN.md spec (machine-readable design tokens) with the ui-ux-pro-max knowledge base (91 styles, 161 palettes, 73 font pairings, 161 products, 104 UX guidelines, 25 chart types). Generates lint-clean DESIGN.md files, validates token references and WCAG contrast, exports Tailwind/DTCG tokens, and diffs design systems version-over-version.
基于 SOC 职业分类
| name | build-resolver |
| description | Minimal-diff build error fixer — gets builds green with the smallest possible changes |
| layer | utility |
| category | quality |
| triggers | ["build error","build failed","tsc error","type error","build fix","compilation error","build broken"] |
| inputs | [{"errors":"Build output or error messages"},{"scope":"Files to fix (default: all erroring files)"}] |
| outputs | [{"fixes":"Minimal edits that resolve all build errors"},{"verification":"Clean build confirmation"}] |
| linksTo | ["fix","typescript-frontend","quality-gate"] |
| linkedFrom | ["debug","cook","ship"] |
| preferredNextSkills | ["quality-gate","test"] |
| fallbackSkills | ["fix","debug"] |
| riskLevel | low |
| memoryReadPolicy | selective |
| memoryWritePolicy | selective |
| sideEffects | ["Modifies source files with minimal type/import fixes"] |
| agentConfig | {"tools":["Read","Edit","Bash","Grep","Glob"],"model":"sonnet","isolation":true} |
Get a broken build passing with the absolute minimum changes. No refactoring, no architecture changes, no improvements — just fix what's broken and verify.
This skill is designed to run as an isolated agent with its own context window, so it can focus entirely on build errors without polluting the main conversation.
Use this when:
tsc --noEmit reports errors after editsnpm run build / next build failsThe build-resolver follows one rule: smallest possible change that makes the build green.
| DO | DON'T |
|---|---|
| Add type annotations | Refactor code structure |
Add null checks (?., ??) | Rename variables |
| Fix import paths | Add new features |
| Add missing interface fields | Change business logic |
| Cast types when safe | "Improve" existing code |
Add @ts-expect-error as last resort | Add comments or docs |
| Error Pattern | Fix |
|---|---|
implicitly has type 'any' | Add explicit type annotation |
possibly 'undefined' | Add optional chaining ?. or nullish coalescing ?? |
Property 'X' does not exist on type 'Y' | Add to interface or use type assertion |
Cannot find module 'X' | Fix import path or install package |
Type 'X' is not assignable to type 'Y' | Narrow type or add assertion |
Argument of type 'X' is not assignable | Convert type at call site |
Module has no exported member 'X'| Fix import name or add export |
Object is possibly 'null' | Add null guard or ! assertion |
'X' is declared but never used | Remove unused variable/import |
Cannot use JSX unless '--jsx' flag is provided | Check tsconfig.json jsx setting |
When a clean fix isn't obvious:
if (x !== undefined) guardas SomeType at usage sitePartial<Interface> or Record<string, unknown>// @ts-expect-error <reason> (document why)Never use // @ts-ignore — always use @ts-expect-error which will fail if the error is fixed.
# Run full typecheck, capture all errors
npx tsc --noEmit 2>&1 | tee /tmp/build-errors.txt
# Count and categorize
grep -c 'error TS' /tmp/build-errors.txt
# Group by error code
grep -oP 'error TS\d+' /tmp/build-errors.txt | sort | uniq -c | sort -rn
Fix errors in dependency order — fixing a type definition error may cascade-fix downstream usage errors:
types.ts, interfaces.ts) — fix firstlib/, utils/) — fix secondFor each error:
# Re-run typecheck
npx tsc --noEmit 2>&1
# If clean, run build
npm run build
# Verify no new errors were introduced
git diff --stat # Should show minimal changes
BUILD RESOLVER: ✅ FIXED
Errors found: 8
Errors fixed: 8
Files changed: 3
Lines changed: 12
Changes:
src/lib/db.ts +2 lines (type annotations)
src/api/users.ts +5 lines (null checks)
src/types/index.ts +5 lines (missing interface fields)
if (x) is safer than as NonNullfix skill@ts-expect-error over any — it's self-documenting and self-removing| Pitfall | Impact | Fix |
|---|---|---|
| Fixing symptoms not causes | More errors appear | Fix type definitions first, then usages |
Using any to silence errors | Hides real bugs | Use specific types or unknown with guards |
| Changing function signatures | Breaks callers | Add overloads or fix callers instead |
| Ignoring cascading fixes | Fixing 1 error fixes 5 others | Re-run tsc after each file's fixes |
| Over-fixing | Unnecessary changes in diff | Stop as soon as build passes |
| Missing transitive deps | Cannot find module | Check tsconfig paths and package.json |
// ERROR: Type 'string | undefined' is not assignable to type 'string'
// BEFORE:
const name = user.name;
// AFTER (minimal fix):
const name = user.name ?? "";
// ERROR: Property 'email' does not exist on type 'User'
// BEFORE:
interface User { id: string; name: string; }
// AFTER:
interface User { id: string; name: string; email: string; }
// ERROR: Module '"@/lib/db"' has no exported member 'query'
// BEFORE:
import { getDb, query } from "@/lib/db";
// AFTER:
import { getDb } from "@/lib/db";
// (query was removed — check if it's used, remove usage too)
When invoked as a subagent (via the Agent tool), build-resolver should: