/forge:forge-setup-projectfrom forge
Sets up or updates AGENTS.md and docs/ for agentic engineering, with signal-to-noise scoring of existing guidance. Use when starting a project, retrofitting a codebase, or auditing context quality.
Ships in forge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Context is organized in three tiers:
| Tier | File(s) | Role |
|---|---|---|
| 1: Hot memory | AGENTS.md | Always loaded. Lean, convention-dense. Only what agents need constantly. |
| 2: Warm memory | docs/*.md | Loaded on-demand by topic. Created only when content earns its token cost. |
| 3: Cold memory | Specs, schemas, runbooks | On-demand references for complex projects. Not created by this skill. |
Central principle: context must earn its token cost. Only include knowledge that agents cannot discover by exploring the codebase with Grep, Glob, and Read.
AGENTS.md is the only guidance file. Don't create a CLAUDE.md: Claude Code reads AGENTS.md natively when no CLAUDE.md or CLAUDE.local.md is present, so a symlink or copy only adds a second name. Step 7 handles an existing one.
Optional project root path ($ARGUMENTS; defaults to cwd). Optional: -- <additional context> for execution guidance.
Scan the project root for AGENTS.md, CLAUDE.md, README.md, and docs/. The file state determines the work: nothing exists → generate from scratch; legacy CLAUDE.md without AGENTS.md → migrate it to AGENTS.md, then update; AGENTS.md exists → audit and update. A CLAUDE.md that is a symlink to or copy of AGENTS.md is removed in Step 7.
Explore structure, tooling, CI/CD, and docs (skip for greenfield projects). Classify each finding as discoverable (agents can find it themselves) or requires documentation (decisions, conventions, failure modes). Only the second category belongs in context files.
Assess agent readiness: feedback loops (tests, linter, build cycle speed), module structure, app legibility, known risks. A check that prints pages on success fills the agent's context with noise: under feedback loops, name the tool's quiet flag when it has one, or leave a <!-- TODO --> for a wrapper that prints one line on success and everything on failure.
Also prepare unattended shipping: a fresh-checkout step, a run recipe, and the ## Unattended Shipping section, per unattended-shipping, which says what happens in which step.
When guidance files already exist, score each section:
| Criterion | Test |
|---|---|
| Specificity | Does this describe THIS project, or could it apply to any project? |
| Undiscoverability | Would an agent find this by exploring? If yes, it's wasted context. |
| Currency | Does this match the current codebase? Verify commands, paths, patterns. |
| Signal density | Ratio of actionable information to total words? |
| Scope | Does every task need this, or only some? Guidance for one area (migrations, a service's logs) goes in a conditional block, or in a doc it points to. |
| Enforcement | Does a tool check this rule about structure (imports, layering)? A manual one, or one phrased as a workaround ("import the file directly to avoid cycles"), or whose check covers less than the rule says, is a candidate for a check. |
Present an audit report grouped by impact and get user confirmation via AskUserQuestion before applying changes.
Use AskUserQuestion for what code cannot reveal: core principles, repeated failure modes, and domain invariants, plus anything ambiguous from exploration, gaps surfaced by the Step 3 audit, and the fresh-checkout step, run recipe parts, and peer reviewer that discovery left open. Never ask what's discoverable from code. Incorporate any trailing context when deciding what to ask.
Create or update AGENTS.md. Keep it under ~200 lines, moving the rest to Tier 2; length comes from content that passes the undiscoverability test, so a small project's file is short. See agents-md-template.md for the structure. In a monorepo, suggest a per-package AGENTS.md. When migrating, fold accepted legacy content in and remove the old file in Step 7.
Create docs/architecture.md (design decisions, data flow, module responsibilities) and docs/pr-workflow.md (branch naming, PR checklist, review process); offer further docs (development, coding-guidelines, testing, domain-specific) via AskUserQuestion only when exploration surfaced content that warrants them. Every doc must pass the undiscoverability test: an empty doc wastes context.
Delete a CLAUDE.md that is a symlink to AGENTS.md, a copy of it, or legacy content now migrated into it (git rm when tracked). If it still holds content that isn't in AGENTS.md, ask the user via AskUserQuestion before deleting it. If it holds Claude-specific content the user wants to keep, reduce it to @AGENTS.md plus that content instead. If a CLAUDE.local.md exists, tell the user: Claude Code skips AGENTS.md while one is present. When you remove a CLAUDE.md, mention that some Claude Code versions and setups read only CLAUDE.md (which ones); for those, the fix is a CLAUDE.md containing @AGENTS.md. Append missing stack-appropriate entries to .gitignore. Never overwrite an existing one.
Create README.md if it doesn't exist (project description, quick start, docs links; for humans, not agent context). If one exists, ask via AskUserQuestion: replace, merge, or keep?
Stage and commit the new/modified files: docs: set up agentic context infrastructure (or docs: update context infrastructure when updating). Skip the commit if unrelated staged changes exist or generated files have unresolved questions.
Report what was created/changed (see output-format.md). Missing tests or CI go under next steps.
Next step: Use forge-create-issue to plan your first piece of work, or forge-shape if the idea is still rough and needs convergent questioning first.
From time to time: Use forge-survey to review the codebase's design and find the rules that need a check.
/forge-setup-project
/forge-setup-project /path/to/project
/forge-setup-project -- keep the setup lean and call out missing feedback loops
_shared/design-rounds.md (opens in a new tab)_shared/exercise.md (opens in a new tab)_shared/issue-operations.md (opens in a new tab)_shared/open-work.md (opens in a new tab)_shared/plan-folder-spec.md (opens in a new tab)_shared/pr-body.md (opens in a new tab)_shared/review-delegation.md (opens in a new tab)_shared/review-dimensions.md (opens in a new tab)_shared/review-rubric.md (opens in a new tab)_shared/roles/forge-reviewer.md (opens in a new tab)_shared/status-reporting.md (opens in a new tab)_shared/unattended-config.md (opens in a new tab)_shared/visuals.md (opens in a new tab)references/agents-md-template.md (opens in a new tab)references/output-format.md (opens in a new tab)references/unattended-shipping.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mgratzer/forge --plugin forge10 skills in this plugin
/forge-address-pr-feedbackAnalyze and address unresolved review feedback on a GitHub pull request. Asks the user about threads that need discussion unless --unattended. Use when the user or an orchestrating agent asks for forge-address-pr-feedback or to work through the review comments on a specific PR./forge-create-issuePlan and create well-structured Issues with the user (GitHub, markdown plan/ folder, or other providers), researching the codebase first and confirming the approach and draft interactively. Use when the user or an orchestrating agent asks for forge-create-issue or to file an Issue for work that is already understood, not when a bug merely comes up in conversation; use forge-shape first when the idea is still vague./forge-guardDrive an open pull request to review-ready without a human watching: run simplification and security passes, wait for CI and the peer reviewer, address feedback in bounded rounds, and stop at review-ready or needs-human. Never merges. Use when the user or an orchestrating agent asks for forge-guard on a PR, or when forge-ship runs with --guard./forge-implementImplement an Issue, plan file, or free-text description on a feature branch, following project standards, and stop at an open PR. Asks the user to approve the plan unless --unattended. Use when the user or an orchestrating agent asks for forge-implement or to take an Issue to a PR, not for a quick edit or fix in the current session; use forge-ship to also run review./forge-landDecide what a green pull request needs from a human: check it is mergeable, green, addressed and exercised, get a fresh-context risk verdict on the head commit, write it into the PR as a ## Risk section, and report merge-ready or review-ready. Merges a low-risk PR only when the project opts in with Auto-merge: low-risk. Use when the user or an orchestrating agent asks for forge-land on an open PR (typically after forge-guard reaches review-ready), or when forge-ship runs with --guard./forge-reflectSelf-review current changes (a PR, branch diff, or uncommitted work) with a fresh-context review and asks the user to fix or defer each finding (no unattended mode). Use when the user or an orchestrating agent asks for forge-reflect or a forge self-review before committing, pushing, or requesting peer review.Other plugins' skills for the same job