Skip to main content
command CX Codex

build · superclaude-org — Claude Code command: project compilation and packaging

A command that handles building, compiling, and packaging projects with automatic error detection and artifact optimization. Runs from Claude Code with configurable environments and build types.

MIT ★ 23,950 updated 2026-09-27

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/build.md
Open on GitHub

What build does

The /sc:build command manages the entire build pipeline: it inspects project structure and configurations, validates dependencies and toolchain, then executes compilation with real-time error detection. After a successful build, it optimizes artifacts, applies minification and tree-shaking for production mode, and outputs a report with build metrics.

Three build modes are available: dev for fast iteration, prod for highly optimized builds with reduced bundle sizes, and test for verification builds. The --clean flag performs a full rebuild, --optimize applies advanced optimizations, and --verbose provides detailed diagnostic output throughout the process.

When build errors occur, the command analyzes logs and suggests fixes. It integrates with Playwright to run UI validation during the build. The final report shows build status, execution time, and whether artifacts are ready for deployment.

What it helps with

  • compile a project for development or production with appropriate optimizations
  • identify and resolve errors during the build process
  • prepare deployment-ready artifacts with quality validation
  • verify that dependencies and build environment are correctly configured

Example prompts for the agent

  • /sc:build --type prod --clean --optimize
  • /sc:build frontend --verbose
  • /sc:build --type dev

How to install build

Manually: put the files in place

.claude/commands/build.md

Call it with /build. For all projects use ~/.claude/commands/

Questions about build

How do I install build in Claude Code?

Place the build.md file in your project's .claude/commands/ directory. The /sc:build command will then be available in Claude Code.

What does the build command do?

It compiles your project with error analysis, optimizes artifacts based on environment (dev, prod, or test), and generates a build report. Supports clean rebuilds and detailed process monitoring.

What flags does build support?

--type selects the environment (dev, prod, test), --clean performs a full rebuild, --optimize applies advanced optimizations to reduce bundle size, and --verbose displays detailed diagnostic output.

Source text

build.md · MIT
---
name: build
description: "Build, compile, and package projects with intelligent error handling and optimization"
category: utility
complexity: enhanced
mcp-servers: [playwright]
personas: [devops-engineer]
---

# /sc:build - Project Building and Packaging

## Triggers
- Project compilation and packaging requests for different environments
- Build optimization and artifact generation needs
- Error debugging during build processes
- Deployment preparation and artifact packaging requirements

## Usage
```
/sc:build [target] [--type dev|prod|test] [--clean] [--optimize] [--verbose]
```

## Behavioral Flow
1. **Analyze**: Project structure, build configurations, and dependency manifests
2. **Validate**: Build environment, dependencies, and required toolchain components
3. **Execute**: Build process with real-time monitoring and error detection
4. **Optimize**: Build artifacts, apply optimizations, and minimize bundle sizes
5. **Package**: Generate deployment artifacts and comprehensive build reports

Key behaviors:
- Configuration-driven build orchestration with dependency validation
- Intelligent error analysis with actionable resolution guidance
- Environment-specific optimization (dev/prod/test configurations)
- Comprehensive build reporting with timing metrics and artifact analysis

## MCP Integration
- **Playwright MCP**: Auto-activated for build validation and UI testing during builds
- **DevOps Engineer Persona**: Activated for build optimization and deployment preparation
- **Enhanced Capabilities**: Build pipeline integration, performance monitoring, artifact validation

## Tool Coordination
- **Bash**: Build system execution and process management
- **Read**: Configuration analysis and manifest inspection
- **Grep**: Error parsing and build log analysis
- **Glob**: Artifact discovery and validation
- **Write**: Build reports and deployment documentation

## Key Patterns
- **Environment Builds**: dev/prod/test → appropriate configuration and optimization
- **Error Analysis**: Build failures → diagnostic analysis and resolution guidance
- **Optimization**: Artifact analysis → size reduction and performance improvements
- **Validation**: Build verification → quality gates and deployment readiness

## Examples

### Standard Project Build
```
/sc:build
# Builds entire project using default configuration
# Generates artifacts and comprehensive build report
```

### Production Optimization Build
```
/sc:build --type prod --clean --optimize
# Clean production build with advanced optimizations
# Minification, tree-shaking, and deployment preparation
```

### Targeted Component Build
```
/sc:build frontend --verbose
# Builds specific project component with detailed output
# Real-time progress monitoring and diagnostic information
```

### Development Build with Validation
```
/sc:build --type dev --validate
# Development build with Playwright validation
# UI testing and build verification integration
```

## Boundaries

**Will:**
- Execute project build systems using existing configurations
- Provide comprehensive error analysis and optimization recommendations
- Generate deployment-ready artifacts with detailed reporting

**Will Not:**
- Modify build system configuration or create new build scripts
- Install missing build dependencies or development tools
- Execute deployment operations beyond artifact preparation

© SuperClaude-Org · MIT · SuperClaude-Org/SuperClaude_Framework

Similar slash commands

All slash commands for DevOps and infrastructure →

build by other authors comes first.

build disler build reads a plan file, applies it to your codebase and prints the report section from that plan. Useful once the plan is written and only the implementation is left. CX Codex +1 ★ 3,990repo stars build disler build is a command that reads a plan file and applies its changes to a codebase. It asks for the file path if none is provided. CX Codex +1 ★ 1,573repo stars build microsoft The build command from the Deep Wiki set turns finished markdown wiki pages into a VitePress project. Dark theme, Mermaid diagrams rendered for dark mode, click-to-zoom on diagrams and images. CX Codex +1 ★ 3,232repo stars build alirezarezvani build — a guided command for creating skills, prompts, agents, and hooks. Use it when you want the factory workflow to generate and check a new artifact. CX Codex +1 ★ 907repo stars build-acceleration mohitmishra786 build-acceleration — a Claude Code skill that teaches the agent how to cut C/C++ compile times. Kicks in on slow builds and walks through caching, distributed compilation, and link time fixes. CX Codex +1 597installs unity-build-size gamedev-skills unity-build-size — a skill for Claude Code analyzes build reports, spots oversized textures, audio and glTFast models in Unity 6.3 LTS projects, and shrinks build size. CX Codex +1 1,800installs build-on-change davila7 build-on-change runs your build pipeline automatically whenever Claude Code edits a file. Detects build setups for Node.js, Make, Rust, and Java projects. 877installs bazel-build-optimization Seth Hobson The bazel-build-optimization skill helps configure Bazel for monorepos, remote execution, and build caching. Use it when build setup or debugging needs a clear Bazel workflow. CX Codex +1 10,300installs build-parallelism dotnet build-parallelism — a skill for Claude Code and Codex examines why an MSBuild build stays slow across multiple nodes. It traces ProjectReference chains and timing bottlenecks from a binlog. CX Codex +1 4,500installs tailing-build-output spencerpauly tailing-build-output monitors build output in real time, catches errors as they stream, and patches source files before Webpack, Turbo, or Docker finishes. CX Codex +1 424installs

From the same set56

The whole set →
security-engineer The security-engineer subagent reviews code for vulnerabilities, maps attack paths, and checks security standards. Use it for audits and risk analysis. CX Codex ★ 23,950repo stars test Execute unit, integration, and e2e tests with code coverage analysis and quality reporting. Auto-detects test frameworks and supports watch mode for continuous testing during development. CX Codex +1 ★ 23,950repo stars python-expert python-expert writes production Python code guided by SOLID principles and clean architecture. Useful when you need test-driven development, 95%+ test coverage, and OWASP security. CX Codex ★ 23,950repo stars document document builds inline comments, API references, component guides, and user manuals directly from code analysis. CX Codex +1 ★ 23,950repo stars analyze analyze reviews code for quality, security, performance, and architecture. Use it for a whole project or a selected directory. CX Codex +1 ★ 23,950repo stars load Loads project context via Serena MCP and restores cross-session memory. Runs at session start or when switching between projects. CX Codex +1 ★ 23,950repo stars design design plans system architecture, API specifications, and database schemas before coding starts. Useful for creating technical contracts and component diagrams. CX Codex +1 ★ 23,950repo stars save save preserves session context, discoveries, and recovery points through Serena MCP. Use it when work needs to continue across sessions. CX Codex +1 ★ 23,950repo stars

Project sponsors

Companies that keep this analytics open