editing-agents-md

editing-agents-md is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 145 tokens per session (2,140 once invoked), scanned A, original, MIT.

A guide for deciding what belongs in AGENTS.md or CLAUDE.md files, which store instructions that coding agents load while working in a repository. It also helps write, review, or remove those instructions.

In plain words
What is it for?
Use it when changing an instruction file, documenting a recurring convention, reviewing a related code change, or deciding whether an existing file has grown too large.
Why use it?
It helps keep shared agent instructions useful and focused instead of adding rules that burden every task or become hard to maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; installed under .agents/ (shared by several agents); mentions AGENTS.md.

Good fit Use it when changing an instruction file, documenting a recurring convention, reviewing a related code change, or deciding whether an existing file has grown too large.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/editing-agents-md
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.

Any agent
npx skills add PostHog/posthog-foss --skill editing-agents-md
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

Made for: Claude Code, Codex.

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 editing-agents-md

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/editing-agents-md/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/editing-agents-md)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/editing-agents-md"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/editing-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 editing-agents-md

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/editing-agents-md"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/editing-agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,140 The whole file, excluding the scripts and references it only reads on demand.
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.00145 $0.02140
Opus 5.5 $0.00058 $0.00856
Sonnet 5.5 $0.00029 $0.00428
Haiku 4.5 $0.00015 $0.00214

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

Security

Grade A, and why

editing-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 29d 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/skills/editing-agents-md/SKILL.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.

Editing AGENTS.md

The root AGENTS.md loads in full at the start of every session, in every tool that reads it. A line you add is paid for by every task in the repo, forever, whether or not that task touches the subject. So the question is never "is this true?" — it is "is this worth loading into every session?"

Two findings set the frame:

  • Adding a context file raises inference cost by over 20% on average, and does not reliably raise task success (2602.11988). A second study measured the opposite sign on runtime and tokens (2601.20404). The evidence is mixed, which argues for a small sharp file rather than no file.
  • File size, instruction position, file architecture, and contradictions between adjacent files each produced no detectable effect on whether an agent follows a rule, across 1,650 sessions (2605.10039).

Read the second one carefully, because it kills a whole class of proposals. Moving a section higher "so the agent sees it" is churn against a null result. Do not reorder for attention. Reorder only when a heading makes a rule easier for a human to find or cite.

1. Does this belong in the file at all?

Work down this ladder and stop at the first rung that fits. It is the same ladder .agents/agent-automation.md states for the repo.

Rung Mechanism Use when
1 Linter — ruff, oxlint, semgrep (.semgrep/rules/devex/) The violation is a code pattern a matcher can see
2 lint-staged / pre-commit It needs the file list or the working tree, not the AST
3 Skill (.agents/skills/) It applies to one kind of task, not every task
4 A rule in AGENTS.md None of the above can carry it

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. 29d ago Changed · +2 lines c17ff1df3cf4
  2. 2mo ago First seen · 117 lines · 145 tokens per session scan A 7ac0407b103f

Subscribe to this mod's changes

editing-agents-md is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 145 tokens to every session and 2,140 once invoked, about $0.0006 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-09-12.

Related

editing-agents-md compared with skills from other repositories

editing-agents-md next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
editing-agents-mdPostHog/posthog-fossSkill736todayMITA145Claude Code, Codex
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82ktodayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill332k6d agoMITA21Claude Code