How ContextForge Works
A static public registry. A thin CLI. Instructions installed straight into your repo.
The flow
pack.json) from the registry..contextforge/agents/.config.json (desired state) and lock.json (resolved state).AGENTS.md and/or CLAUDE.md.Registry resolution
The CLI fetches the registry index, finds the pack by name, and resolves its file paths relative to the registry base URL. No hardcoded pack data lives in the CLI itself — everything comes from the live registry at install time.
// Simplified resolution
const index = await fetch("https://registry.contextforge.org/index.json");
const packMeta = index.packs["nextjs-best-practices"];
// → { path: "packs/nextjs-best-practices/pack.json", ... }
const manifest = await fetch(registryBase + packMeta.path);
// Downloads: agents.md, claude.md, skill.md, cursor.mdc, copilot.mdWhy root files stay tiny
AI tools like Codex read AGENTS.md and Claude Code reads CLAUDE.md at the project root. These files could bloat quickly if every pack wrote its full content there.
ContextForge keeps them as tiny pointers. The real instruction content lives inside .contextforge/. Agents that follow the pointer get the full instructions; agents that ignore it still get a clean root.
# AGENTS.md (tiny pointer — not the real instructions)
<!-- contextforge:start -->
ContextForge is installed for this repo.
Before working, read: .contextforge/agents/codex/
Follow packs listed in .contextforge/config.json.
<!-- contextforge:end -->Registry is versioned independently
The registry is a separate GitHub repository. New packs and pack updates can be published without releasing a new CLI version. The CLI always pulls the current state of the registry.
Registry source: github.com/Alone-Y154/ContextForge-registry