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
.claude/commands/build.mdWhat 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.mdCall it with /build. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/build.mdCall it with /prompts:build. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/build.prompt.mdManually: put the files in place
.gemini/commands/build.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
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.