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.
npx agentmods add rules/srmackey/context-forge/contextforge-routergit clone --depth 1 https://github.com/srmackey/context-forgeWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00823 | $0.00823 |
| Opus 5 | $0.00411 | $0.00411 |
| Sonnet 5 | $0.00165 | $0.00165 |
| Haiku 4.5 | $0.00082 | $0.00082 |
Grade A, and why
contextforge-router 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ContextForge router
ContextForge is a local MCP server that stores durable, cross-repo engineering context (Components, Repos, Tasks, Governance) as markdown, indexed in SQLite. This rule is a router — it tells you how to use the tools. It does not contain the knowledge itself.
Act proactively — do not wait to be asked
Use ContextForge on your own initiative; the user should not have to say "add this to ContextForge" or "did you check ContextForge?". In particular:
- When the user names or starts a ticket (anything matching
[A-Z]+-\d+, e.g.TICKET-1234, or phrasing like "starting/working on …"): immediatelyresolve_ref(query="<id or name>")to see if atask:entity already exists. If it does,get_task_pack(task_slug=...). If it does not, create it now —create_task(slug="<id>", description=...)— andlink_taskit to the current repo (resolved viaget_current_workspace). Do this before starting the work, not after. Never silently create a duplicate of a task that might already exist. - Recall aggressively, capture at checkpoints. Loading context is always safe — do it up front. Writing context is higher-stakes — capture durable facts when a decision is reached, a workaround is found, or a unit of work wraps, not on every message.
At the start of planning or coding work
- Call
get_current_workspace(path=<the open repo's absolute path>). If it resolves to a repo slug, that repo is tracked here. - Load context before planning — do not start from a blank slate:
- For focused/transient work, prefer a task pack:
get_task_pack(task_slug=...)(composes task + linked entities + cascaded governance;focus=Truenarrows to the most relevant subtopics). - Otherwise pull the specific entity/subtopic:
get_context(ref="repo:<slug>/local-dev"),get_context(ref="component:<slug>/auth"), etc.
- For focused/transient work, prefer a task pack:
- Only pull what the task concerns. Refs listed under
droppedin a focused pack can be fetched on demand if they turn out to be relevant — don't preload them.
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.
- yesterday First seen · 61 lines · 823 tokens per session scan A 34aa6b8b1f54
contextforge-router is a cursor rule published in the GitHub repository srmackey/context-forge (1 stars, last pushed 23d ago), licensed MIT. It adds 823 tokens to every session, about $0.0041 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-31.
Other cursor rules, from other repositories
cursor
You are working on the checkout service. Preserve transaction integrity and auditability.
java-springboot-jpa-cursorrules-prompt-file
description: "Cursor rules for Java development with Springboot and JPA integration." globs: / alwaysApply: false.
002-verify-before-act
Requires Claude to read before writing, verify before installing, and confirm before destructive operations.
swift-development
Swift development: SwiftUI, Combine, async/await, iOS patterns, and Apple platform conventions.
design-patterns
Design patterns (GoF) and file size conventions for sweagent TypeScript codebase.
database
Cursor rule "database" from ItamarZand88/awesome-agent-conventions, covering database best practices, prisma setup, prisma models, prisma queries and supabase setup.