everything-claude-code-zh: Command for Claude Code

.opencode/commands/build-fix.md

build-fix is a command for Claude Code, OpenCode from xu-xiang/everything-claude-code-zh. It costs 15 tokens per session (534 once invoked), scanned A, original, MIT.

A command that fixes build and TypeScript errors with the smallest practical code changes. It checks the types, repairs errors one by one, and verifies the final build and tests.

In plain words
What is it for?
Use it when a TypeScript project fails type checking or building and you need targeted fixes without new features.
Why use it?
It focuses on making an existing project pass its checks without refactoring the architecture or changing its intended behavior.

Command for Claude CodeOpenCode

Written for Claude Code and OpenCode: $ARGUMENTS substitution, but also installed under .opencode/. Also seen: agent in frontmatter.

This is xu-xiang/everything-claude-code-zh's own configuration. It tells Claude Code and OpenCode how to work on everything-claude-code-zh itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything everything-claude-code-zh configures →

Part of the everything-claude-code-zh plugin — 17 skills, 26 commands, 13 agents shipped together

About the project

everything-claude-code-zh is a Chinese translation of a collection of configurations for Claude Code and other AI coding agents. It provides agents, skills, hooks, commands, rules, and MCP configurations intended to support development workflows such as memory persistence, security scanning, evaluation, and research-first work. The catalogue includes commands, skills, agents, instructions, and a plugin from this configuration set.

xu-xiang/everything-claude-code-zh · 1,931 stars · on GitHub · oneskill.one

Reuse

Borrowing it

Nothing to install: this file belongs to xu-xiang/everything-claude-code-zh. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/xu-xiang/everything-claude-code-zh/main/.opencode/commands/build-fix.md
Clone the repo
git clone --depth 1 https://github.com/xu-xiang/everything-claude-code-zh

Made for: Claude Code, OpenCode.

Or install everything-claude-code-zh, the plugin that ships this one along with the rest of its 17 skills, 26 commands, 13 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for build-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/xu-xiang/everything-claude-code-zh/build-fix.svg)](https://agentmods.dev/commands/xu-xiang/everything-claude-code-zh/build-fix)
Your own site
<a href="https://agentmods.dev/commands/xu-xiang/everything-claude-code-zh/build-fix"><img src="https://agentmods.dev/badge/commands/xu-xiang/everything-claude-code-zh/build-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 534 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.00534
Opus 5 $0.00008 $0.00267
Sonnet 5 $0.00003 $0.00107
Haiku 4.5 $0.00002 $0.00053

Measured 6d ago against content hash cceb27718e4e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

build-fix scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.opencode/commands/build-fix.md · 57 lines

What it actually says

构建修复(Build Fix)命令

以最小改动修复构建与 TypeScript 错误:$ARGUMENTS

你的任务

  1. 运行类型检查npx tsc --noEmit
  2. 收集所有错误
  3. 逐一修复错误,保持最小改动
  4. 验证每次修复,确保未引入新错误
  5. 运行最终检查,确认所有错误已解决

方法论(Approach)

建议(DO):

  • ✅ 使用正确的类型修复类型错误
  • ✅ 添加缺失的导入(imports)
  • ✅ 修复语法错误
  • ✅ 保持最小改动
  • ✅ 保留现有行为
  • ✅ 每次改动后运行 tsc --noEmit

禁止(DON'T):

  • ❌ 重构(Refactor)代码
  • ❌ 添加新功能
  • ❌ 更改架构(Architecture)
  • ❌ 使用 any 类型(除非绝对必要)
  • ❌ 添加 @ts-ignore 注释
  • ❌ 更改业务逻辑

常见错误修复

错误(Error) 修复(Fix)
Type 'X' is not assignable to type 'Y' 添加正确的类型标注
Property 'X' does not exist 在接口(interface)中添加属性或修复属性名
Cannot find module 'X' 安装包或修复导入路径
Argument of type 'X' is not assignable 进行类型转换或修复函数签名
Object is possibly 'undefined' 添加空值检查(null check)或可选链(optional chaining)

验证步骤(Verification Steps)

修复后:

  1. npx tsc --noEmit - 应显示 0 个错误
  2. npm run build - 应构建成功
  3. npm test - 测试应仍能通过

重要提示:仅关注修复错误。禁止重构、禁止改进、禁止架构变更。以最小的差异(diff)使构建通过(Get the build green)。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 57 lines · 15 tokens per session scan A cceb27718e4e

Subscribe to this mod's changes

build-fix is a command published in the GitHub repository xu-xiang/everything-claude-code-zh (1,931 stars, last pushed 6mo ago), licensed MIT. It adds 15 tokens to every session and 534 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.