agents

agents is an instructions file for Codex, OpenCode from metagit-ai/metagit-cli. It costs 1,937 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

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/metagit-ai/metagit-cli/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,937 This file is loaded in full into every session.
When invoked 1,937 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.01937 $0.01937
Opus 5 $0.00968 $0.00968
Sonnet 5 $0.00387 $0.00387
Haiku 4.5 $0.00194 $0.00194

Measured 4d ago against content hash a84039e8f464, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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 · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 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 context pack --tier 2 --json
metagit prompt workspace --kind session-start --text-only

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
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 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 expand
Derived surgical project metagit project derived create -n N --from P/R · 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
Task graph / intent metagit task create · metagit task expand · metagit task ready · metagit task complete
Context compile metagit context compile --project P --repo R [--task-id N] --json
Context switch metagit context switch <project> [<repo>] · --json · MCP metagit_context_switch
Nav (human) metagit nav / navigate [-p PROJECT] [--repo REPO]
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
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 · 119 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 · 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 (2 stars, last pushed 6d ago), licensed MIT. It adds 1,937 tokens to every session, about $0.0097 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.