agents-md-generator

agents-md-generator is a skill for Claude Code, Codex from MADTeacher/mad-agents-skills. It costs 69 tokens per session (1,268 once invoked), scanned A, original, MIT.

A skill for creating and maintaining concise AGENTS.md files, which are repository instructions read by coding agents. It covers root and nested modules, progressive disclosure, templates, and how to find existing project skills.

In plain words
What is it for?
Creating, updating, repairing, trimming, or splitting AGENTS.md files after checking the repository structure and available documentation.
Why use it?
It helps keep agent guidance focused, portable, and consistent, especially in monorepos or repositories with multiple packages.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Creating, updating, repairing, trimming, or splitting AGENTS.md files after checking the repository structure and available documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/madteacher/mad-agents-skills/agents-md-generator
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 MADTeacher/mad-agents-skills --skill agents-md-generator
Clone the repo
git clone --depth 1 https://github.com/MADTeacher/mad-agents-skills

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/madteacher/mad-agents-skills/agents-md-generator"><img src="https://agentmods.dev/badge/skills/madteacher/mad-agents-skills/agents-md-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,268 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. Third-party audits
  • Socket pass 5 May 2026
  • Snyk pass 5 May 2026
How audits are shown
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.00069 $0.01268
Opus 5 $0.00034 $0.00634
Sonnet 5 $0.00014 $0.00254
Haiku 4.5 $0.00007 $0.00127

Measured 11d ago against content hash 3f9f364009d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

agents-md-generator 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 11d 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-generator/SKILL.md · 179 lines

How it starts

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

AGENTS.md Generator (Root + Nested, Portable)

Goal

Maintain small, high-signal AGENTS.md files:

  • Root AGENTS.md — purpose of repository, navigation, universal toolchain, canonical commands, links to docs and skills.
  • Nested AGENTS.md — module/package purpose, local commands, module references.

Use progressive disclosure: keep AGENTS.md concise; push details to docs or skills.


Skill location (agent-specific)

  • Do NOT assume .agents/ or any fixed directory exists.
  • Skills may live:
    • inside the repository (embedded),
    • or in an external/global skill library (external).
  • If referencing local skills, use only an existing skill root already used by the project or an existing project path already mentioned by repo docs.
  • If no local skill directory exists — reference skills by name only (external).
  • Never create hidden agent directories just to store skills.

Resource Routing

Use templates as skeletons, not literal output:

  • Read references/AGENTS_TEMPLATE_ROOT.md only when creating or updating the root AGENTS.md.
  • Read references/AGENTS_TEMPLATE_MODULE.md only after a directory is confirmed as a nested module that needs its own AGENTS.md.
  • Replace or remove every placeholder. Final AGENTS.md files must not contain unresolved <...> template markers.

When to run

Run this skill when:

  • AGENTS.md is missing, bloated, contradictory, or outdated.
  • AGENTS.md needs to be generated, repaired, trimmed, split, or updated.
  • A new package/service/module appears.
  • Repository structure changes (monorepo growth or split).
  • Teams want consistent agent context across diverse stacks.

Workflow (Deterministic)

1. Discover repository shape

  • Identify repository root (git root if available).
  • Detect language/tool markers:
    • package.json, pnpm-workspace.yaml
    • go.mod, go.work
    • pyproject.toml
    • Cargo.toml
    • pubspec.yaml
    • pom.xml, build.gradle
  • Locate docs/, README.md, existing AGENTS.md.

Read the full file on GitHub · 179 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 179 lines · 69 tokens per session scan A 3f9f364009d1

Subscribe to this mod's changes

agents-md-generator is a skill published in the GitHub repository MADTeacher/mad-agents-skills (108 stars, last pushed 4mo ago), licensed MIT. It adds 69 tokens to every session and 1,268 once invoked, about $0.0003 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-30.