forge ships an AI agent skill that teaches coding agents — Claude, Codex,
and Gemini — to drive the forge CLI to set up and manage a development
environment safely. It is recon-first and human-gated: the agent inspects the
current state, shows you a plan, and waits for your go-ahead before anything is
installed, removed, deployed, or rewritten.
This is not the same as forge skill (forge's own internal
template/transform subsystem). This page is about the AI-agent-facing
instruction skill that lives under .claude/skills/.
When you ask an agent to "set up this dev environment," "bootstrap my machine," or run forge commands, the skill gives the agent a consistent, safe playbook instead of letting it improvise:
- A command map of forge's full surface, with every command tagged read-only (safe to run for recon) or mutating (requires your confirmation).
- A five-phase setup workflow: recon → plan → confirm → apply → verify.
- A safety contract that encodes guardrails (no unprompted
--yes,--dry-runpreviews, trash instead of delete, 1Password references for secrets, standard SSH host-key verification).
The result: the agent does the legwork (inspecting drift, previewing installs, re-checking after) while you keep the final say on anything that changes your machine.
| Tool | How it loads the skill |
|---|---|
| Claude (Claude Code) | Auto-discovers .claude/skills/forge-environment-setup/SKILL.md. No setup needed. |
| Codex | Reads AGENTS.md at the repo root, which carries the safety contract inline and points to the canonical skill. |
| Gemini (Gemini CLI) | Reads GEMINI.md at the repo root, same pattern as AGENTS.md. |
All three drive forge through their shell/Bash tool — there is no per-tool
command translation. SKILL.md is the single source of truth; the two pointer
files exist only so Codex and Gemini have a native filename to auto-load.
The skill's description frontmatter tells the agent when to reach for it.
You'll generally see it engage when you mention forge, provisioning or
bootstrapping a dev machine, installing tool bundles, or running forge commands.
With Claude Code you can also invoke it explicitly by name
(forge-environment-setup).
- Recon (read-only):
forge bootstrap --status,--scan, relevantforge <group> doctor— understand what's installed and what's drifted. - Plan (read-only):
forge bootstrap --dry-run [--bundles …]— preview the exact changes an install would make. Nothing executes. - Confirm: the agent summarizes the planned changes and waits for your explicit go-ahead.
- Apply: the install runs with forge's interactive confirmation intact (no
unprompted
--yes). - Verify (read-only): re-run
--statusand the doctors to confirm the previously-missing tools are installed, nothing regressed, and new tools resolve onPATH. The agent reports a clear pass/fail rather than assuming success.
The skill instructs agents to:
- Run read-only recon first and get explicit confirmation before any mutation.
- Never pass
--yesunprompted — let forge's interactive prompt reach you. - Use the global
--dry-runflag to build the plan they show you. - Never delete with
rm -rf; preferforge file trash. - Reference secrets as
op://Vault/Item/field(resolved viaop read), never inline plaintext. - Use standard OpenSSH host-key verification (never
StrictHostKeyChecking=no).
The full command map and the complete contract live in
.claude/skills/forge-environment-setup/SKILL.md.
forge bootstrap is declarative — every package comes from a TOML bundle
manifest in config/bundles/, grouped by install source
(Homebrew formulae/casks, npm, Go, Gem, uv). The manifests are the source of
truth; the lists below are a snapshot to give you a sense of scope.
With no arguments, forge bootstrap installs the bundles listed in
config/default-profile.toml:
core, git, node, python, editors. Override per machine with, e.g.,
forge bootstrap --bundles core,go,node.
Those defaults pull in, for example:
- core (required) — modern shell tooling:
bat,fd,fzf,ripgrep,jq,lsd,zoxide,tmux,dust,just,tldr,oh-my-posh, … plus the Hack Nerd Font. - git —
git,git-flow,gh,hub,forgit, and the configured git aliases. - node —
node,yarn, plus global npm CLIstypescript,eslint,prettier,nodemon. - python —
pyenv,pyenv-virtualenv,uv, plusipythonandpytestinstalled as isolateduvtools. - editors —
neovim,ctags, and the VS Code and Cursor casks.
| Bundle | What it sets up | Tier |
|---|---|---|
core |
Shell tools, search, system utilities (required) | core |
git |
Git — aliases, flow, interactive tools | role |
node |
Node.js — essential global CLIs | role |
python |
Python toolchain — pyenv, uv, virtualenv | role |
editors |
Code editors and terminal tools | experimental |
go |
Go — goenv, language server, linters, debugger, REPL | role |
ruby |
Ruby — rbenv, ruby-build | role |
elixir |
Elixir/Erlang | experimental |
ios |
iOS — CocoaPods | experimental |
devops |
Kubernetes, Terraform, Docker, AWS, cloud CLIs | role |
platforms |
Vercel, Supabase, Netlify, Render, Appwrite | role |
ai-tools |
AI development CLIs | ai-tools |
python-libs |
Python libraries for your project virtualenv | role |
python-ml |
Python ML libraries (tensorflow, pytorch, …) | experimental |
See the individual files in config/bundles/ for the exact
package list of each bundle.
The skill's recon phase surfaces all of this without changing anything:
forge bootstrap --list-bundles # every bundle, grouped by tier
forge bootstrap --status # what's installed vs expected for your profile
forge bootstrap --dry-run # exactly what an install would add.claude/skills/forge-environment-setup/SKILL.md # canonical — Claude auto-discovers
AGENTS.md # Codex entry point (root)
GEMINI.md # Gemini entry point (root)
SKILL.md carries YAML frontmatter (name, description) plus the full body:
availability check, safety contract, setup workflow, command map, and a
disambiguation note about forge skill. AGENTS.md and GEMINI.md are thin —
they intentionally duplicate the short, high-value safety contract inline
(because Codex/Gemini read those files directly) and point to SKILL.md for the
command map and workflow detail. This avoids three-way duplication of the bulk
while giving each tool a native entry point.
- Edit
SKILL.mdas the source of truth. - If you change the safety contract, mirror the change in the inline
contracts in
AGENTS.mdandGEMINI.mdso all three stay consistent. - Keep the frontmatter valid —
namemust remainforge-environment-setupanddescriptionmust be non-empty.
Every forge command and flag named in SKILL.md must exist in the CLI
definition at crates/forge-cli/src/args.rs (the clap source of truth). When you
add, rename, or remove a forge command, update SKILL.md's command map to match,
including the read-only vs mutating classification. clap maps CamelCase enum
variants to kebab-case subcommands (e.g. CleanupDs → cleanup-ds,
MigrationStatus → migration-status). When in doubt, reconcile the command map
against args.rs variant by variant before committing.