/init
Set up ForgeKit context for a repository: detect the stack, write or refresh AGENTS.md as a short map into docs/architecture, product, decisions and development, and recommend the ForgeKit packs that fit.
What it does
Set up ForgeKit context for a repository: detect the stack, write or refresh AGENTS.md as a short map into docs/architecture, product, decisions and development, and recommend the ForgeKit packs that fit.
- Category
- coreonboardingcontext
- Platforms
- generic
- Capabilities
- analysisdocumentationplanning
Example tasks
- /init
- /init focus on the apps/api package of this monorepo
- /init this is a legacy Rails app, keep the existing CLAUDE.md content
Works with
Related skills
Recommended alongside
Permissions summary
Files
Reads and edits files
Shell
Runs a limited set of commands
Network
No network
Permissions are declared in the component manifest and compiled into each client's tool list. Components are built for least privilege.
Supported environments
| Client | Support | Installed as |
|---|---|---|
| Claude Code | Native | .claude/commands/<id>.md |
| OpenAI Codex | Adapter | .codex/prompts/<id>.md |
| Cursor | Native | .cursor/commands/<id>.md |
| VS Code (Copilot) | Native | .github/prompts/<id>.prompt.md |
| Generic markdown | Adapter | docs/forgekit/commands/<id>.md |
Claude Code is the native reference. Other clients use adapters, so behaviour is close but not identical. See the compatibility matrix.
Included in packs
Full command (free preview)
This is a free component, so its complete content is public. It is exactly what gets installed (before client-specific formatting).
Initialize ForgeKit context for this repository. Optional focus from the user: $ARGUMENTS
The goal is a short, accurate AGENTS.md that works as a MAP, plus a small docs/ skeleton that loads only when relevant. Facts only: everything you write must be verified from files in this repo.
- Use the CLI if it exists. Run
command -v forge. If found, runforge detectandforge initand show their output; use their result as the starting point and still do steps 2-5 for anything they did not cover. If not found, say "ForgeKit CLI not installed, continuing manually" and do the steps below by hand. Never download or execute an installer. - Detect the stack. Read manifests and lockfiles (
package.json,pnpm-workspace.yaml,pyproject.toml,go.mod,Cargo.toml,build.gradle(.kts),Package.swift,pubspec.yaml,pom.xml,Gemfile,composer.json,*.csproj,ProjectSettings/), CI files,Dockerfile,Makefile. Record language and framework versions as written in those files, and the real build, test, lint and typecheck commands from scripts/CI. - Respect what exists. Read any current
AGENTS.md,CLAUDE.md,.cursor/rules,.github/copilot-instructions.md,README.md. Merge into them; never delete human-written guidance. IfCLAUDE.mdexists and duplicatesAGENTS.md, report it instead of rewriting it. - Write
AGENTS.md(max about 60 lines): one-paragraph purpose, stack with versions, verified commands, top-level layout (one line per directory), 3-6 non-obvious conventions or gotchas, then a pointer table:docs/architecture/,docs/product/,docs/decisions/,docs/development/each with a "read when..." clause. Create those four folders with a minimalREADME.mdoroverview.mdcontaining only verified facts and an "Open questions" list for what you could not determine. Do not invent architecture. - Recommend packs. List 3-6 ForgeKit components that match the detected stack and why (use ids such as
repository-understanding,code-reviewer,protect-secrets, plus stack-specific ones). To find the install command, runforge --helprather than guessing syntax. - Verify. Every command in
AGENTS.mdmust exist in a manifest/Makefile/CI file (run the fast ones: lint or typecheck, not full builds, unless cheap) and every path or link must resolve. Report anything you could not confirm.
Allowed shell: command -v, forge detect, forge init, forge --help, git ls-files, git log, ls, and the repo's own lint/typecheck scripts. Do not modify source code, lockfiles, CI, or .env* files, and never write secret values (env var names only).
Output: (1) detected stack table with evidence file per row, (2) files created/changed, (3) commands verified vs. not run, (4) recommended packs, (5) open questions for the user.
Version and changelog
Latest version 1.0.0. Requires DevBuildKit CLI 1.0.0 or newer.
Changelog — /init
1.0.0
- Initial release.