What it does
/build analyzes your project’s build configuration, validates the environment, executes the appropriate build command for your target, and reports the resulting artifacts and build metrics. On failure, it diagnoses the root cause before retrying.
When to use
Use/build when you want to compile or package your project — for development, production, or test targets. Run it after /implement to verify the full build passes, or standalone when troubleshooting build issues.
Prerequisites
- Dependencies installed and up to date
- Build configuration present (e.g.,
package.json,Cargo.toml,pyproject.toml)
Conversation mode
Fast Mode — recommended for direct build execution.What happens
Analyze project structure and build configuration
Antigravity reads the project structure and identifies the build system and configuration files.
Validate environment and dependencies
Environment variables, installed dependencies, and tool versions are checked before executing the build.
Execute the build
The appropriate build command is run with the correct flags for your target (dev, prod, or test).
Parse errors with diagnostic analysis
If the build fails, errors are parsed and analyzed. The
systematic-debugging skill is loaded — the same failing command is never retried without a diagnosis.Skills invoked
systematic-debugging— loaded on build failure to diagnose root cause before any retry
Common build systems
| Stack | Command |
|---|---|
| Node.js / npm | npm run build |
| Node.js / Bun | bun run build |
| Python | python -m build or poetry build |
| Go | go build ./... |
| Rust | cargo build --release |
| Docker | docker build -t name . |
Example
node_modules is present, runs npm run build, and reports:
Related commands
/test
Run tests with coverage after a successful build.
/troubleshoot
For persistent build failures that need deep systematic investigation.
/implement
The implementation step that precedes a production build.
/git
Commit and push after a clean build and passing tests.