build-fix
Diagnose and minimally fix build, type, or dependency failures in TypeScript/JavaScript, Rust, Go, C++, Java, or Kotlin. Do not refactor or redesign.
- License 许可
- MIT
- 所属仓库
- xiaden/SkyScow
- 最近更新
- 2026-09-30
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- build-fix
- description
- Diagnose and minimally fix build, type, or dependency failures in TypeScript/JavaScript, Rust, Go, C++, Java, or Kotlin. Do not refactor or redesign.
02 资源文件 6
- 参考文档references/cpp.md2.8 KB
- 参考文档references/go.md6.1 KB
- 参考文档references/java.md4.9 KB
- 参考文档references/kotlin.md4.5 KB
- 参考文档references/rust.md3.2 KB
- 参考文档references/ts-js.md8.1 KB
03 SKILL.md 正文
Build Error Resolution
Purpose: Diagnose and fix build errors with minimal, surgical changes. No refactoring. No architectural modifications. Get the build passing and move on.
When to Use This Skill
Trigger conditions:
npm run build/npx tsc --noEmitfails with TypeScript/JavaScript errorscargo build/cargo checkfails with Rust compilation errorsgo build ./...fails with Go compilation errorscmake --build buildfails with C++ errors./mvnw compile/./gradlew buildfails with Java errors./gradlew buildfails with Kotlin errors- Dependency resolution errors, module not found, import/export issues
- Type errors blocking development
Do NOT use this skill for:
- Code refactoring or style improvements
- Architectural changes or redesign
- Adding new features
- Fixing failing tests (unless build failure is the root cause)
- Security issues
Language Dispatch Table
Choose the reference file matching the file extension of the failing source:
| File Extension(s) | Language | Reference |
|---|---|---|
.ts, .tsx, .js, .jsx |
TypeScript / JavaScript | [references/ts-js.md](file:///home/opencode/.config/opencode/skills/build-fix/references/ts-js.md) |
.rs |
Rust | [references/rust.md](file:///home/opencode/.config/opencode/skills/build-fix/references/rust.md) |
.go |
Go | [references/go.md](file:///home/opencode/.config/opencode/skills/build-fix/references/go.md) |
.cpp, .hpp, .cc, .hh, .cxx, .hxx, .c, .h |
C++ / C | [references/cpp.md](file:///home/opencode/.config/opencode/skills/build-fix/references/cpp.md) |
.java |
Java | [references/java.md](file:///home/opencode/.config/opencode/skills/build-fix/references/java.md) |
.kt, .kts |
Kotlin | [references/kotlin.md](file:///home/opencode/.config/opencode/skills/build-fix/references/kotlin.md) |
Workflow
- Identify the language — determine which build tool and language are failing
- Load the matching reference — use the dispatch table above to find the correct reference file
- Collect and categorize errors — run diagnostic commands from the reference, capture all errors, and categorize by type (type errors, import/export, configuration, dependency). Prioritize: fix blocking build errors first, then type errors, then warnings.
- Apply minimal fixes — fix one error at a time, verify after each change. For each error: understand the root cause → find the minimal fix → verify it doesn't break other code → iterate.
- Verify the build passes — re-run the repository's build command after all fixes, then run the repository's test command for the changed surface when one exists; do not assume a test suite such as
npm testexists (see/home/opencode/.config/opencode/instructions/validation-mandate.md)
Core Principles
- Surgical fixes only — change only what's needed to fix the error
- No refactoring — don't reorganize, rename, or restructure unrelated code
- No architecture changes — don't redesign data models or control flow
- Fix root cause — don't suppress symptoms with type assertions,
any,@SuppressWarnings,#[allow(...)], or//nolint - Verify after each fix — re-run the build to confirm the error is resolved and no new errors were introduced
- Stop after 3 failed attempts — if the same error persists, report and escalate
Output Format
After each fix — report the change:
[FIXED] src/components/MarketCard.tsx:45
Error: Parameter 'market' implicitly has an 'any' type
Fix: Added type annotation `market: Market`
Remaining errors: 3
Final summary — after all errors are resolved:
Build Status: PASSING / FAILING
Language: [TypeScript | Rust | Go | C++ | Java | Kotlin]
Errors Fixed: N
Files Modified: [list]
Remaining Issues: [list or "none"]
Validation Checklist
Before reporting completion, verify:
- [ ] Build command runs cleanly with zero errors
- [ ] No suppression comments added (
@ts-ignore,@ts-expect-error,#[allow(...)],@SuppressWarnings,# noqa,//nolint) without explicit approval - [ ] Each fix is minimal — only lines directly related to the error were changed
- [ ] No refactoring or restructuring of unrelated code
- [ ] Targeted verification passes for the changed surface (run the repository's test command when one exists; if none exists, report that instead of assuming a suite)
- [ ] Output format is followed for each fix reported
References
- This skill's reference files:
- [
references/ts-js.md](file:///home/opencode/.config/opencode/skills/build-fix/references/ts-js.md) — TypeScript/JavaScript build errors, type errors, ESLint violations - [
references/rust.md](file:///home/opencode/.config/opencode/skills/build-fix/references/rust.md) — Rust compilation, borrow-checker, and clippy errors - [
references/go.md](file:///home/opencode/.config/opencode/skills/build-fix/references/go.md) — Go build errors, vet issues, and staticcheck violations - [
references/cpp.md](file:///home/opencode/.config/opencode/skills/build-fix/references/cpp.md) — C++ compilation, CMake issues, and linker errors - [
references/java.md](file:///home/opencode/.config/opencode/skills/build-fix/references/java.md) — Java Maven/Gradle build errors and dependency issues - [
references/kotlin.md](file:///home/opencode/.config/opencode/skills/build-fix/references/kotlin.md) — Kotlin Gradle build errors and detekt violations
- [
- Related skills:
support-debuggerfor root cause analysis when fixes keep failing
04 同仓库更多 Skills
unquoted-colon
暂无简介
quoted-description
Use when a plain scalar contains a colon: like this one.
block-description
Use when a plain scalar contains a colon: like this one.
work-routing
Canonical authority for who owns the next unit of work — direct work versus delegation, task tiers, bounded localization, the Change DAG size threshold, R&D evaluation routing, progressive research escalation, researcher scope signals, and QA/support owner selection. Use before choosing execution, investigation, design, or QA ownership; do not use to construct dispatch prompts, handoff schemas, or Change DAG/DD tool operation.
update-docs
Update project documentation to match code changes — generate codemaps, refresh READMEs, detect doc/code drift using AST analysis. Use when updating documentation after code changes, generating codemaps, verifying doc accuracy, or detecting stale documentation. Do NOT use for writing API reference docs from scratch (use doc-coauthoring) or for creating new skill files (use making-editing-skills).
skill-loading-system
Explain or troubleshoot OpenCode skill discovery, loading, permissions, availability, or prompt injection.