validate-build

validate-build is a command for coding agents from CloudAI-X/claude-workflow-v2. It costs 20 tokens per session (495 once invoked), scanned A, original, MIT.

A command procedure for checking whether a project builds successfully. It detects common build systems, runs the appropriate build or compilation command, checks output files, and reviews warnings.

In plain words
What is it for?
Use it after code changes in Node.js, Python, Go, or Rust projects to validate the build and report a pass or fail result.
Why use it?
It catches compilation failures, missing build artifacts, and notable warnings before changes are committed.

Command

Part of the claude-workflow-v2 plugin — 14 skills, 26 commands, 7 agents, 6 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/cloudai-x/claude-workflow-v2/validate-build
Clone the repo
git clone --depth 1 https://github.com/CloudAI-X/claude-workflow-v2

Or install claude-workflow-v2, the plugin that ships this one along with the rest of its 14 skills, 26 commands, 7 agents, 6 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 validate-build

README.md
[![agentmods](https://agentmods.dev/badge/commands/cloudai-x/claude-workflow-v2/validate-build.svg)](https://agentmods.dev/commands/cloudai-x/claude-workflow-v2/validate-build)
Your own site
<a href="https://agentmods.dev/commands/cloudai-x/claude-workflow-v2/validate-build"><img src="https://agentmods.dev/badge/commands/cloudai-x/claude-workflow-v2/validate-build.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 495 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.00020 $0.00495
Opus 5 $0.00010 $0.00247
Sonnet 5 $0.00004 $0.00099
Haiku 4.5 $0.00002 $0.00049

Measured 4d ago against content hash f6fd4a35ecc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

validate-build 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/validate-build.md · 107 lines

What it actually says

Validate Build

Validate that the project builds successfully. Run BEFORE commits to catch build failures early.

Phase 1: Detect Build System

Identify the project's build system:

# Check for common build configurations
ls package.json Makefile setup.py pyproject.toml go.mod Cargo.toml CMakeLists.txt 2>/dev/null

Phase 2: Run Build Commands

Based on detected system:

Node.js/TypeScript

npm run build 2>&1 || yarn build 2>&1 || pnpm build 2>&1 || bun run build 2>&1

Python

find . -name "*.py" -exec python -m py_compile {} +
# or for packages:
pip install -e . --dry-run

Go

go build ./...

Rust

cargo build

Phase 3: Verify Build Artifacts

Check that expected outputs exist:

  • dist/ or build/ directory for JS/TS
  • Compiled binaries for Go/Rust
  • No missing dependencies
# Example for Node.js
ls -la dist/ build/ 2>/dev/null

Phase 4: Check for Warnings

Parse build output for:

  • Deprecation warnings
  • Unused variables/imports
  • Performance warnings
  • Type coercion warnings

Output Format

## Build Validation: [PASS/FAIL]

### Build Command
[command used]

### Result
- Exit code: [0/non-zero]
- Duration: [time if available]

### Artifacts
- [x] Output directory created
- [x] Expected files present
- [ ] Source maps generated (if applicable)

### Warnings
- [List any build warnings]

### Errors (if failed)
- [Parse and list specific errors]
- [Suggested fixes for each]

Auto-Fix Suggestions

If build fails, suggest:

  1. Missing dependency installation commands
  2. Type errors with file:line locations
  3. Syntax errors with context
  4. Configuration issues

Usage

This command ships with the project-starter plugin. Invoke with: /project-starter:validate-build

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 · 107 lines · 20 tokens per session scan A f6fd4a35ecc3

Subscribe to this mod's changes

validate-build is a command published in the GitHub repository CloudAI-X/claude-workflow-v2 (1,413 stars, last pushed 9d ago), licensed MIT. It adds 20 tokens to every session and 495 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.