build-fix

build-fix is a command for coding agents from VersoXBT/claude-initial-setup. It costs 9 tokens per session (458 once invoked), scanned A, original, MIT.

A build-fixing command that resolves compilation and other project build errors one at a time. A build checks whether source code can be assembled or compiled into a working application.

In plain words
What is it for?
Use it to run the appropriate build or type check, group and prioritize errors, apply minimal fixes, and re-run the check after every fix.
Why use it?
It keeps cascading errors from becoming confusing and confirms each change before moving to the next problem.

Command

Part of the claude-initial-setup plugin — 75 skills, 15 commands, 14 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/versoxbt/claude-initial-setup/build-fix
Clone the repo
git clone --depth 1 https://github.com/VersoXBT/claude-initial-setup

Or install claude-initial-setup, the plugin that ships this one along with the rest of its 75 skills, 15 commands, 14 agents, 2 hooks.

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/versoxbt/claude-initial-setup/build-fix.svg)](https://agentmods.dev/commands/versoxbt/claude-initial-setup/build-fix)
Your own site
<a href="https://agentmods.dev/commands/versoxbt/claude-initial-setup/build-fix"><img src="https://agentmods.dev/badge/commands/versoxbt/claude-initial-setup/build-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 458 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 $0.00009 $0.00458
Opus 5 $0.00005 $0.00229
Sonnet 5 $0.00002 $0.00092
Haiku 4.5 $0.00001 $0.00046

Measured 4d ago against content hash 2848767197a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

commands/build-fix.md · 62 lines

What it actually says

Build Fix

Systematically resolve build errors by fixing them one at a time and verifying after each fix.

Steps

  1. Run the project build command:

    • Detect the build system (npm, pnpm, yarn, cargo, go, make, etc.).
    • Run the appropriate build command and capture all output.
    npm run build 2>&1
    tsc --noEmit
    
  2. Parse the build errors:

    • Extract each error with its file path, line number, and message.
    • Group errors by file to understand the scope.
    • Identify the total count of errors.
  3. Prioritize the errors:

    • Fix type errors and import errors first — they often cascade.
    • Fix errors in dependency order (utilities before components that use them).
    • Start with the first error in the output, as later errors may be caused by earlier ones.
  4. Fix one error at a time:

    • Read the affected file to understand context.
    • Apply the minimal fix needed.
    • Do not refactor or improve unrelated code during this process.
  5. Re-run the build after each fix:

    • Verify the fixed error is resolved.
    • Check that no new errors were introduced.
    • If new errors appear that were not in the original output, revert the last change and try a different approach.
  6. Repeat steps 4-5 until the build passes cleanly.

  7. Run the test suite after the build succeeds:

    • Ensure no tests are broken by the fixes.
    • If tests fail, fix them before considering the task complete.

If a Fix Introduces New Errors

  • Revert the change immediately.
  • Re-read the error message and surrounding code more carefully.
  • Consider whether the error is a symptom of a deeper issue.
  • Try an alternative approach.

If the Build Has Too Many Errors (50+)

  • Check if a major dependency or configuration change caused the cascade.
  • Review recent commits for large-scale changes.
  • Consider reverting the problematic commit and reapplying changes incrementally.

Output

A clean build with zero errors and all tests passing.

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. 4d ago First seen · 62 lines · 9 tokens per session scan A 2848767197a6

Subscribe to this mod's changes

build-fix is a command published in the GitHub repository VersoXBT/claude-initial-setup (4 stars, last pushed 3mo ago), licensed MIT. It adds 9 tokens to every session and 458 once invoked, about $0.0000 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-31.