Command Reference

Every /forge invocation, SKILL.md section, .forge.toml option, bootstrap skill, and AGENTS.md format — all in one place.

/forge Commands

CommandDescription
/forgeActivate Forge delegation mode. Runs health check, bootstraps AGENTS.md if absent, loads SKILL.md.
/forge:deactivateDeactivate Forge delegation mode and return to direct Claude implementation.
/forge statusShow current activation state, model, and .forge.toml config summary.
/forge-historyList recent Forge conversations indexed by the progress-surface hook. Shows UUID, timestamp, tool counts, and token usage via forge conversation stats <uuid> --porcelain.
/forge-replay <uuid>Replay a prior Forge conversation by UUID. Dumps the full transcript via forge conversation dump <uuid> --html for inspection.

Plugin Hooks

Three hooks ship in plugin.json and run automatically under the forge-delegation skill:

HookEventDescription
forge-delegation-enforcer.shPreToolUse (Write / Edit / NotebookEdit / Bash)When delegation mode is active, rewrites forge -p calls to inject a UUID conversation ID and appends an entry to the idx file so each task is durably trackable.
forge-progress-surface.shPostToolUse (Bash)Parses Forge subprocess output and surfaces a compact STATUS block into the transcript so long-running delegations stream visible progress.
validate-release-gate.shPreToolUse (Bash)Release-safety guard. Blocks gh release create commands unless all four quality-gate-stage-N markers are present in ~/.claude/.sidekick/quality-gate-state.

Task Prompt Fields

Every task delegated to Forge uses exactly these 5 fields, in this order:

FieldDescriptionLimit
OBJECTIVEOne-sentence statement of what Forge must accomplish. No ambiguity.1 sentence
CONTEXTOnly files directly relevant to the task. No conversation history, no unrelated files.~600 tokens
DESIRED STATESpecific, verifiable outcome. What the code/system looks like when done.~300 tokens
SUCCESS CRITERIAChecklist Claude uses to verify Forge succeeded. Each item must be checkable.3–6 items
INJECTED SKILLS≤2 bootstrap skills relevant to the task type.1–2 skills

Total prompt budget: 2,000 tokens max.

.forge.toml Config

Created in the project root on first /forge invocation. Contains compaction settings only — Forge API credentials are stored globally in ~/forge/.credentials.json and ~/forge/.forge.toml.

.forge.toml (project root — compaction only)
# API credentials: ~/forge/.credentials.json # Context compaction — validated defaults token_threshold = 80000 # trigger at 80k tokens eviction_window = 0.20 # evict oldest 20% retention_window = 6 # always keep last 6 exchanges max_tokens = 16384 # max output tokens per call

Global provider config (~/forge/.forge.toml)

The global config sets the provider and model. Two providers are supported:

~/forge/.forge.toml — OpenRouter (recommended)
"$schema" = "https://forgecode.dev/schema.json" max_tokens = 16384 [session] provider_id = "open_router" model_id = "qwen/qwen3-coder-plus"
~/forge/.forge.toml — MiniMax Coding
"$schema" = "https://forgecode.dev/schema.json" max_tokens = 16384 [session] provider_id = "minimax" model_id = "MiniMax-M2.7"
.forge.toml is gitignored by default. API credentials are stored globally in ~/forge/.credentials.json (API key) and ~/forge/.forge.toml (provider and model config), not in the project root. When Claude guides you through setup it writes these files automatically.

Bootstrap Skills

Four skills are pre-installed at .forge/skills/ and available for injection:

SkillPathInject when…
testing-strategy.forge/skills/testing-strategy/SKILL.mdWriting tests, TDD, test coverage tasks
code-review.forge/skills/code-review/SKILL.mdCode quality, refactoring, review-driven changes
security.forge/skills/security/SKILL.mdAuth, input validation, secrets handling
quality-gates.forge/skills/quality-gates/SKILL.mdMulti-phase delivery, release prep

Forge Output Format

Every Forge task response includes a structured output block with four mandatory fields. Claude reads these fields to verify success, update AGENTS.md, and detect failures.

FieldDescription
STATUSSUCCESS or FAILURE. Claude checks this first — a FAILURE immediately triggers the fallback ladder.
FILES_CHANGEDList of every file Forge created, modified, or deleted during the task. Used for output review and session logging.
ASSUMPTIONSAny assumptions Forge made that were not explicit in the task prompt. Claude surfaces these for user review.
PATTERNS_DISCOVEREDCodebase conventions, architecture patterns, or project quirks Forge noticed during the task. Claude extracts these for AGENTS.md.
Example Forge output block
STATUS: SUCCESS FILES_CHANGED: - src/auth/middleware.ts (modified) - src/auth/middleware.test.ts (created) - src/types/auth.ts (modified) ASSUMPTIONS: - JWT secret read from process.env.JWT_SECRET - Token expiry defaults to 24h if not configured PATTERNS_DISCOVERED: - Project uses vitest, not jest - All middleware follows Express 5 async error pattern - TypeScript strict mode is enabled globally
PATTERNS_DISCOVERED feeds AGENTS.md. After each task, Claude reads this field and writes any new patterns to ./AGENTS.md and ~/forge/AGENTS.md — this is how Forge's understanding of your codebase grows over time.

AGENTS.md Format

AGENTS.md uses an action-oriented, categorized format. Claude extracts content from sessions and writes it under these categories:

AGENTS.md structure
# AGENTS.md — Forge Standing Instructions # Project: <name> ## Code Style - Use TypeScript strict mode for all new files - Prefer named exports over default exports ## Testing - All new functions must have unit tests - Use vitest, not jest ## Git Workflow - Atomic commits — one logical change per commit - Commit message format: <type>: <description> ## Forge Behavior - Always run the test suite before marking task complete - Report FILES_CHANGED at the end of every task ## Project Conventions - <project-specific rules extracted from sessions>

File Structure

Files created and managed by Sidekick:

PathPurpose
skills/forge/SKILL.mdForge delegation instruction set (321 lines, 8 sections)
.forge.tomlAPI key and compaction config (gitignored)
~/.claude/.forge-delegation-activeActive session state marker (zero-byte)
.forge/skills/*/SKILL.md4 bootstrap skills for injection
AGENTS.mdProject-level Forge standing instructions
~/forge/AGENTS.mdGlobal cross-project Forge instructions
docs/sessions/Per-session AGENTS.md evolution logs