metagit-cli: Instructions file for Codex

AGENTS.md

agents is an instructions file for Codex, OpenCode from metagit-ai/metagit-cli. It costs 2,678 tokens per session, scanned A, original, MIT.

Project instructions that give coding agents shared context across related Git repositories. Git is a system for tracking code changes, while a multi-repository project keeps different parts of a system in separate repositories.

In plain words
What is it for?
Use it as the starting point for work in this project. It directs agents to read project context, analyze repository relationships, run checks, and update project records after meaningful changes.
Why use it?
It helps an agent understand the wider project before changing code and records important project knowledge in version-controlled files.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths.

This is metagit-ai/metagit-cli's own configuration. It tells Codex and OpenCode how to work on metagit-cli itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything metagit-cli configures →

Reuse

Borrowing it

Nothing to install: this file belongs to metagit-ai/metagit-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/metagit-ai/metagit-cli/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/metagit-ai/metagit-cli

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 agents

README.md
[![agentmods](https://agentmods.dev/badge/instructions/metagit-ai/metagit-cli/agents-md/github.svg)](https://agentmods.dev/instructions/metagit-ai/metagit-cli/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/metagit-ai/metagit-cli/agents-md"><img src="https://agentmods.dev/badge/instructions/metagit-ai/metagit-cli/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agents

Your own site · 80×15
<a href="https://agentmods.dev/instructions/metagit-ai/metagit-cli/agents-md"><img src="https://agentmods.dev/badge/instructions/metagit-ai/metagit-cli/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,678 This file is loaded in full into every session.
When invoked 2,678 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02678 $0.02678
Opus 5.5 $0.01071 $0.01071
Sonnet 5.5 $0.00536 $0.00536
Haiku 4.5 $0.00268 $0.00268

Measured 1mo ago against content hash e49fae7fadd7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agents 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 1mo 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 · 136 lines

How it starts

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

Metagit

What This Is

Metagit gives you situational awareness across Git repositories. It helps multi-repo projects feel manageable, discoverable, and cohesive. It captures cross-repository relationships and project knowledge in easy to understand version controlled manifests.

Day-1 Agent OS loop: docs/agents-quickstart.md — install → context pack → aos next → compile/ACL → complete.

After Every Task

After meaningful work, run GROW:

  • Prepare: Run task qa:prepush and resolve any errors. Rerun until all failures are resolved.
  • Ground: what changed in reality?
  • Record: update .mex/ROUTER.md and relevant .mex/context/ files
  • Orient: create or update a .mex/patterns/ runbook if this can recur
  • Write: bump last_updated on changed scaffold files and run mex log when rationale matters

At the start of every session, read .mex/ROUTER.md before doing anything else. For full project context, patterns, and task guidance — everything is there.

Metagit — agent quick reference

For agents instructed to use Metagit (not necessarily to contribute to this repository).

Install: uv tool install metagit-cli · set METAGIT_AGENT_MODE=true · PyPI name metagit-cli.

Quickstart: docs/agents-quickstart.md · example examples/agent-aos-loop/

Session start (from repo with .metagit.yml):

metagit -c .metagit.yml context pack --tier 0 --json
metagit -c .metagit.yml prompt workspace --kind session-start --text-only

Large umbrellas (500+ repos): keep .metagit.yml on disk. Use search + paged packs + prompt workspace -k large-workspace. Do not run config show --json or workspace list --include-workspace. See docs/reference/context-reduction.md.

Skills: metagit skills install --scope user · MCP: metagit mcp install --scope user

Need Command
Workspace map / repo cards metagit context pack --tier 0|1|2 --json
Find managed repo metagit search "…" --json
Resolve one repo path metagit search "…" --path-only (MCP metagit_repo_search path_only: true)
List all managed targets metagit workspace repo list --json (MCP metagit_workspace_repos_list)
Repo CI topology metagit project repo ci show / detect / set (--json)
Search repo file contents metagit workspace grep "…" --json
Grep backend (ripgrep) metagit workspace grep info --json
Catalog (paged; no full manifest) metagit workspace list --json
Operational prompts metagit prompt list
Scoped repo text metagit context repomix --profile bugfix-local --project P --repo R
Latest release / notes metagit version check --json
Self-update metagit version upgrade --apply --json
Agent profile / apply metagit agent profile show / metagit agent apply --vendor cursor
Campaigns metagit campaign list · metagit campaign new · metagit campaign status --limit 40 · metagit campaign expand · metagit campaign board-sync · metagit campaign context
Derived surgical project metagit project derived create -n N --from P/R or P/R/C [--include-dependencies] · refresh · include · exclude
Skills surface metagit skills surface --json
ACL isolate agent checkout metagit branch allocate · metagit lease acquire --allocate · metagit worktree create
ACL file claims metagit claim declare · metagit claim check (--component optional)
Task graph / intent metagit task create · metagit task expand · metagit task ready · metagit task complete
Context compile metagit context compile --project P --repo R [--component NAME] [--depth N] --json
Components (RFC-0026–0032) Nested repos[].components[]; `metagit component list
Context switch metagit context switch <project> [<repo>] · --json · MCP metagit_context_switch
Nav (human) metagit nav / navigate [--all] [--unmanaged] [--print-path]
Semantic ownership metagit semantic declare · metagit semantic owners · metagit semantic conflicts
Merge orchestration metagit merge enqueue · metagit merge integrate · metagit merge status
Agent scheduler metagit schedule next · metagit schedule status · metagit schedule policy show
Agent OS (composition) metagit aos status · metagit aos doctor · metagit aos next (coord alias)
Local Atlas metagit atlas init · metagit atlas generate · metagit atlas validate · metagit atlas query
Organization index metagit org index github ORG · metagit org search "query" · metagit graph neighbors REPO · metagit repo materialize REPO
Agent coordination skill metagit skills show metagit-agent-coordination
Agent OS skill metagit skills show metagit-aos
Agent coordination (ACL) docs/reference/agent-coordination.md
Task graph (RFC-0008) docs/reference/task-graph.md
Context compiler (RFC-0009) docs/reference/context-compiler.md
Semantic ownership (RFC-0010) docs/reference/semantic-ownership.md
Merge orchestrator (RFC-0011) docs/reference/merge-orchestrator.md
Agent scheduler (RFC-0012) docs/reference/agent-scheduler.md
Agent OS (RFC-0013) docs/reference/aos.md
Metagit Atlas (RFC-0014) docs/reference/atlas.md
Feature registry (all modalities) docs/reference/modality-feature-registry.md

Read the full file on GitHub · 136 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. 1mo ago Changed · +2 lines · +92 tokens per session e49fae7fadd7
  2. 1mo ago Changed · +1 lines · +42 tokens per session d409223ef22a
  3. 1mo ago Changed · +7 tokens per session c2dac307d1bc
  4. 1mo ago Changed · +2 lines · +63 tokens per session 7b9fa427581b
  5. 1mo ago Changed · +11 lines · +488 tokens per session f65564dab8e4
  6. 1mo ago Changed · +1 lines · +49 tokens per session d471a7c4f1d5
  7. 2mo ago First seen · 119 lines · 1,937 tokens per session scan A a84039e8f464

Subscribe to this mod's changes

agents is an instructions file published in the GitHub repository metagit-ai/metagit-cli (4 stars, last pushed yesterday), licensed MIT. It adds 2,678 tokens to every session, about $0.0107 per session on Opus 5.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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,719 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,516 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,313 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 3,037 tokens