forge-setup

forge-setup is a command for coding agents from malakhov-dmitrii/forge. It costs 27 tokens per session (541 once invoked), scanned A, original, MIT.

A one-time setup command for Forge, a project-workflow tool. It creates an organised documentation folder, starter Semgrep rules for code scanning, and sections in CLAUDE.md, a file that guides coding agents.

In plain words
What is it for?
Preparing a project for Forge, creating documentation indexes, adding starter security or quality checks, and recording project guidance for agents.
Why use it?
It removes the manual work of preparing these project files and checks which supporting tools are installed.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the beast-forge plugin — 3 skills, 2 commands, 21 agents, 3 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/malakhov-dmitrii/forge/forge-setup
Clone the repo
git clone --depth 1 https://github.com/malakhov-dmitrii/forge

Or install beast-forge, the plugin that ships this one along with the rest of its 3 skills, 2 commands, 21 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for forge-setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/malakhov-dmitrii/forge/forge-setup.svg)](https://agentmods.dev/commands/malakhov-dmitrii/forge/forge-setup)
Your own site
<a href="https://agentmods.dev/commands/malakhov-dmitrii/forge/forge-setup"><img src="https://agentmods.dev/badge/commands/malakhov-dmitrii/forge/forge-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 541 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.00541
Opus 5 $0.00014 $0.00270
Sonnet 5 $0.00005 $0.00108
Haiku 4.5 $0.00003 $0.00054

Measured 4d ago against content hash 0b5606a7860c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

forge-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/forge-setup.md · 68 lines

What it actually says

Forge Setup

One-time setup to get the most from forge. Run this once per project.

Steps

1. Check tools

which semgrep → installed? If not: "Install with: brew install semgrep"
which scc → installed? If not: "Install with: brew install scc"  
which codex → installed? If not: "Optional. Fresh opus agent used as fallback for second opinion."

2. Create docs/ vault

If docs/ doesn't exist, create it. If it exists, add subdirectories alongside existing content (DON'T overwrite).

Create:

  • docs/INDEX.md — root navigation with "What Goes Where" table
  • docs/architecture/INDEX.md — empty, with column headers (Doc | Summary | Updated | Related Code)
  • docs/decisions/INDEX.md — empty, with column headers
  • docs/specs/INDEX.md — empty
  • docs/retros/INDEX.md — empty
  • docs/runbooks/INDEX.md — empty

3. Create .semgrep/ (if semgrep installed)

Copy starter rules from ${CLAUDE_PLUGIN_ROOT}/templates/semgrep-starter.yml to .semgrep/rules.yml.

Scan project to auto-detect relevant rulesets:

  • TypeScript/JavaScript → uncomment relevant starter rules
  • Python → add p/python note
  • Go → add p/golang note

4. Update CLAUDE.md

If project has a CLAUDE.md, append (if not already present):

## Common Failures (update every ~10 tasks)
- [Add patterns here as you discover them during verification]

## Project Docs
Architecture, ADRs, specs, runbooks → docs/INDEX.md. Read before planning.

If no CLAUDE.md exists, create a minimal one with project name + these sections.

5. Report

Show what was created and what's ready:

Forge setup complete:
  ✓ docs/ vault (6 INDEX.md files)
  ✓ .semgrep/ rules (N starter rules)
  ✓ CLAUDE.md updated (Common Failures + Project Docs)
  ✓ semgrep: installed
  ✓ scc: installed
  ○ codex: not installed (optional, opus fallback active)

Run /forge "your task" to start.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 68 lines · 27 tokens per session scan A 0b5606a7860c

Subscribe to this mod's changes

forge-setup is a command published in the GitHub repository malakhov-dmitrii/forge (25 stars, last pushed 1mo ago), licensed MIT. It adds 27 tokens to every session and 541 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.