skills/forge-setup-project/SKILL.md
Set up or update a project's context infrastructure for agentic engineering — AGENTS.md as lean hot memory, docs/ as earned warm memory, with signal-to-noise scoring for existing guidance. Use when starting a new project, retrofitting an existing codebase, or auditing current guidance quality.
npx skillsauth add mgratzer/forge forge-setup-projectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Set up or update a project's context infrastructure for agentic engineering. 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.
CLAUDE.md is a compatibility symlink to AGENTS.md, never a separate source of truth.
Optional project root path (defaults to cwd). Optional: -- <additional context> for execution guidance.
Scan the project root for AGENTS.md, CLAUDE.md, README.md, and docs/.
| Mode | Trigger | Behavior |
|------|---------|----------|
| Setup | Neither AGENTS.md nor CLAUDE.md exists | Generate tiered context from scratch |
| Audit & Update | AGENTS.md exists | Score existing guidance, identify improvements, apply changes |
| Legacy Migration | CLAUDE.md exists but AGENTS.md does not | Migrate CLAUDE.md to AGENTS.md, then update |
Skip for greenfield projects (no code exists).
Explore thoroughly: structure, language/runtime, scripts, CI/CD, lint/format/test config, docs. Classify each finding as discoverable (agents can find it) 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 (entry points, boundaries), app legibility (bootable locally?), known risks.
Read all existing guidance files. 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? |
Present an audit report. Group recommendations into quick wins, high-value additions, and structural changes. Get user confirmation via AskUserQuestion before applying.
Use AskUserQuestion to collect what cannot be determined from code. Incorporate any optional additional context when deciding what to ask, audit, or prioritize.
Always ask:
Ask only if ambiguous from code:
AGENTS.md)Never ask what's discoverable from code — language, framework, test runner, scripts, directory structure.
For Audit/Migration modes, ask about gaps found in Step 3.
Create or update AGENTS.md. Target ~150-200 lines. Every line must pass the undiscoverability test.
See agents-md-template.md for the template structure.
For Legacy Migration: migrate accepted content into AGENTS.md, fold duplicates, replace legacy file with symlink in Step 7.
Only create docs with actual content. An empty doc wastes context.
Always created:
docs/architecture.md — design decisions, data flow, module responsibilities. Not directory listings.docs/pr-workflow.md — branch naming, PR checklist, review process. Reference AGENTS.md for commit format.Created only when warranted (offer via AskUserQuestion based on detection):
docs/development.md — when setup has gotchas or multi-step requirementsdocs/coding-guidelines.md — when project has specific patterns worth codifyingdocs/testing.md — when test patterns are non-obviousAll Tier 2 docs must pass the undiscoverability test. Use tables for structured data. Include actual file paths.
rm -f CLAUDE.md
ln -sf AGENTS.md CLAUDE.md
If the platform doesn't support symlinks, stop and tell the user.
Create or update .gitignore with entries matching the detected stack. Never overwrite an existing .gitignore — append only missing entries.
Create if it doesn't exist (this is for humans, not agent context):
Stage and commit all new/modified files:
docs: set up agentic context infrastructuredocs: update context infrastructureDo not commit if: dry run requested, unrelated staged changes exist, or generated files have unresolved questions.
Report what was created/changed. See output-format.md for the structure. Include tier status with line counts, agent readiness assessment, and 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.
/forge-setup-project
/forge-setup-project /path/to/project
/forge-setup-project -- keep the setup lean and call out missing feedback loops
tools
End-to-end implementation and self-review in a single invocation. Implements from an Issue, plan file, or free-text description, then runs a lean fresh-context review. Use when the user wants to implement and review without manual handoff between skills.
development
Shape a vague idea into a clear plan through codebase investigation and convergent one-at-a-time questioning. Use when the user has a rough idea or problem that needs specifying before issue creation.
tools
Review current changes with a lean review flow. Works on a PR, branch diff, or uncommitted changes. Tiny low-risk diffs stay inline; larger or riskier changes use fresh-context review. Use when the user wants to self-review before committing, pushing, or requesting peer review.
databases
⚠️ Renamed to forge-reflect. This stub exists for migration — remove it and install forge-reflect instead.