Agent AGENTS.md

Repository instructions for AI coding agents working on Agent, an AI-agnostic framework of rules, hooks, agents, skills, and automation for several coding-agent runtimes.

In plain words
What is it for?
Use it when changing the Agent framework so work follows its planning and sanitization rules.
Why use it?
It tells agents what the repository contains and requires them to plan certain changes and keep the framework neutral across domains.

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/joymin5655/agent/agents-md
Clone the repo
git clone --depth 1 https://github.com/joymin5655/Agent

Made for: Codex, OpenCode.

Per session 2,048 This file is loaded in full into every session.
When invoked 2,048 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.02048 $0.02048
Opus 5 $0.01024 $0.01024
Sonnet 5 $0.00410 $0.00410
Haiku 4.5 $0.00205 $0.00205

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

Security

Grade A, and why

Agent 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 2d 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 · 182 lines

How it starts

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

AGENTS.md

This file follows the agents.md spec so any AI coding agent (Codex CLI, OpenAI Assistants, Cursor, etc.) can understand how to work in this repo.

For Claude Code, see also CLAUDE.md (if present) or use this file as the primary instructions.

For Gemini CLI, see also GEMINI.md (if present) or use this file.


What this repo is

An AI-agnostic agent framework: rules, hooks, agents, skills, and automation that work identically across Claude Code / Codex CLI / Gemini CLI.

The repo itself is the framework. Consumers git clone it and run setup.sh to install configs into their AI runtime (~/.claude/, ~/.codex/, ~/.gemini/) and optionally scaffold a target project.


Operating mode for AI agents working IN this repo

When an AI agent works on improving the framework itself (this repo, not a consumer project):

1. Plan before code

For any change touching 3+ files or any change to core/hooks/, adapters/, or rules/: write a plan to /tmp/agent-plan-<slug>.md before editing. Discuss tradeoffs with the user before implementation.

2. Sanitize discipline

This repo MUST stay domain-neutral. The original maintainer ported it from a prior domain-specific project (the v0 mirror of it is preserved on the archive/v0-mirror tag, out of the shipped tree; later trim snapshots stay under legacy/). Before committing any file under core/, rules/, agents/, skills/, templates/, docs/, or root:

# Run the sanitize audit — must return zero matches outside legacy/
bash core/tests/sanitize-audit.sh

The audit script greps for known domain taint patterns (prior project name, prior-project domain terms, prior-project absolute paths) and machine-identity PII (real home paths, Apple .local device hostnames — see rules/public-repo.md § Machine-identity PII). The pattern list lives in core/tests/sanitize-audit.sh — update it if you introduce a new project-specific term that needs guarding.

Read the full file on GitHub · 182 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. 2d ago First seen · 182 lines · 2,048 tokens per session scan A f492dc204258

Subscribe to this mod's changes

Agent AGENTS.md is an instructions file published in the GitHub repository joymin5655/Agent (2 stars, last pushed 8d ago), licensed MIT. It adds 2,048 tokens to every session, about $0.0102 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.