Skip to main content

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

1

Analyze project structure and build configuration

Antigravity reads the project structure and identifies the build system and configuration files.
2

Validate environment and dependencies

Environment variables, installed dependencies, and tool versions are checked before executing the build.
3

Execute the build

The appropriate build command is run with the correct flags for your target (dev, prod, or test).
4

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.
5

Report artifacts and metrics

On success, the build artifacts generated and key build metrics (size, duration) are reported.

Skills invoked

  • systematic-debugging — loaded on build failure to diagnose root cause before any retry

Common build systems

StackCommand
Node.js / npmnpm run build
Node.js / Bunbun run build
Pythonpython -m build or poetry build
Gogo build ./...
Rustcargo build --release
Dockerdocker build -t name .

Example

/build
Antigravity detects a Node.js project, validates that node_modules is present, runs npm run build, and reports:
Build target: production
Command: npm run build
Result: SUCCESS
Artifacts: dist/ (1.2 MB, 3 files)
Duration: 4.3s
If the build fails, Antigravity will load the systematic-debugging skill and diagnose the root cause. It will not retry the same failing command without a new hypothesis.

/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.

Build docs developers (and LLMs) love