repo-context-forge AGENTS.md

repo-context-forge AGENTS.md is an instructions file for Codex, OpenCode from negativexq/repo-context-forge. It costs 1,024 tokens per session, scanned A, original, MIT.

Project instructions for repo-context-forge, a local tool that creates source-based repository context for coding agents. They describe its purpose, architecture, testing rules, commands, and security constraints.

In plain words
What is it for?
Guiding work on repo-context-forge, including architecture decisions, testing, path validation, source references, and safe repository access.
Why use it?
They give coding agents the project's rules before they inspect or change code, reducing unsupported assumptions and unsafe implementation choices.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/negativexq/repo-context-forge/agents-md
Clone the repo
git clone --depth 1 https://github.com/negativexq/repo-context-forge

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for repo-context-forge AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/negativexq/repo-context-forge/agents-md.svg)](https://agentmods.dev/instructions/negativexq/repo-context-forge/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/negativexq/repo-context-forge/agents-md"><img src="https://agentmods.dev/badge/instructions/negativexq/repo-context-forge/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,024 This file is loaded in full into every session.
When invoked 1,024 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.01024 $0.01024
Opus 5 $0.00512 $0.00512
Sonnet 5 $0.00205 $0.00205
Haiku 4.5 $0.00102 $0.00102

Measured 4d ago against content hash 1dc28fb03b2a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

repo-context-forge AGENTS.md 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 4d ago.

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.

AGENTS.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Project Purpose

repo-context-forge is a local-first MCP-based repository intelligence platform. It creates compact, source-grounded repository context packs for coding agents such as Codex, Claude Code, and Cursor. The v0.2 alpha also contains an experimental local model provider, MCP client runtime, and read-only source-grounded agent loop.

Architecture Rules

  • CLI code must not contain domain logic.
  • MCP tools must delegate to service classes.
  • Domain services must not depend on Typer or FastMCP.
  • Filesystem paths must use pathlib.Path.
  • Repository-relative paths must never be trusted without validation.
  • Repository access must eventually be limited to configured workspace roots.
  • Generated summaries must preserve source file and line references.
  • Avoid oversized utility modules.
  • Prefer explicit typed models over loosely structured dictionaries.
  • Avoid hidden global state.
  • Do not use eval.
  • Do not use shell string interpolation.
  • Do not introduce unrestricted subprocess execution.
  • Do not silently ignore security failures.
  • Do not fabricate repository facts when source evidence is unavailable.
  • Never import or execute analyzed repository code.
  • Never use shell search commands for repository intelligence.
  • Static-analysis limitations must be surfaced honestly.
  • Source references must remain repository-relative.
  • Git subprocess use is allowed only through the safe Git runner.
  • Only explicitly allowlisted read-only Git commands and flags are permitted.
  • Analyzed repositories must never be mutated.
  • Dependency manifests must never be executed.
  • Dynamic dependency information must not be fabricated.
  • Context artifacts must never fabricate repository facts.
  • Deterministic facts and architectural inferences must remain explicitly separated.
  • Generated output must remain outside analyzed repositories by default.
  • Context manifests, configuration hashes, and artifact hashes must remain stable and validated.
  • Provider code must not log prompts or complete model responses by default.
  • API keys must never be logged or included in public model summaries.
  • LLM output is untrusted input and must be validated into project-owned models.
  • Tool-call arguments must always be validated before future use.
  • Models must never execute tools directly; execution belongs to a future controlled runtime.
  • MCP child processes must be explicitly allowlisted through trusted local configuration.
  • Never invoke MCP server commands through a shell; use SDK stdio transport with argument lists.
  • MCP server stdout is reserved exclusively for protocol messages; diagnostics belong on stderr.
  • MCP tool arguments require local JSON Schema validation before every request.
  • MCP tool schemas and results are untrusted input and must remain bounded.
  • Every MCP session, transport, and child process must close on success, failure, and timeout.
  • Model output is never trusted and cannot expand configured tool permissions.
  • An agent run is locked to one configured workspace; model-requested workspace switching is forbidden.
  • Agent citations must be validated against source evidence observed during that run.
  • Duplicate tool loops and all configured iteration, message, and result limits must terminate safely.
  • Default agent tools must remain read-only; context generation and task-bundle writes are excluded.
  • Agent provider and MCP manager lifecycles must close on every success and failure path.

Read the full file on GitHub · 115 lines

Changes

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.

  1. 4d ago First seen · 115 lines · 1,024 tokens per session scan A 1dc28fb03b2a

Subscribe to this mod's changes

repo-context-forge AGENTS.md is an instructions file published in the GitHub repository negativexq/repo-context-forge (0 stars, last pushed 1mo ago), licensed MIT. It adds 1,024 tokens to every session, about $0.0051 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.