
agents-md-generator
Create, generate, update, repair, trim, or split minimal AGENTS.md files for repository roots and confirmed nested modules using progressive disclosure. Use for missing, bloated, contradictory, or outdated agent instructions, monorepos, services, packages, module context, and portable agent guidance without assuming any fixed agent folder structure.
- Installs
- 379
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/madteacher/mad-agents-skills --skill agents-md-generator- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads agents-md-generator automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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.mdonly when creating or updating the rootAGENTS.md. - Read
references/AGENTS_TEMPLATE_MODULE.mdonly after a directory is confirmed as a nested module that needs its ownAGENTS.md. - Replace or remove every placeholder. Final
AGENTS.mdfiles 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.yamlgo.mod,go.workpyproject.tomlCargo.tomlpubspec.yamlpom.xml,build.gradle
- Locate
docs/,README.md, existingAGENTS.md.
2. Detect module boundaries
Create nested AGENTS.md if directory:
- Contains independent build/package manifest
- OR represents deployable/service unit (
apps/,services/,packages/) - AND adds distinct commands, docs, ownership, deployment notes, or toolchain guidance compared with parent scope.
Do not create a nested AGENTS.md that only repeats the root instructions.
3. Generate/Update Root AGENTS.md
Constraints:
- Ideal size: ≤ 60 lines
- Must include:
- One-sentence repository purpose
- Primary toolchain/package manager
- Canonical commands (if non-standard)
- Links to docs
- Instruction to read nested AGENTS.md when inside modules
- Optional skill references (adaptive: local or external)
- Preserve verified commands, docs, security/secrets/deployment warnings, and
important local rules from any existing root
AGENTS.md.
4. Generate/Update Nested AGENTS.md
Constraints:
- Ideal size: ≤ 40 lines
- Must include:
- One-sentence module purpose
- Module-specific commands
- Local documentation references
- Optional skill references (adaptive)
- Preserve verified module warnings, ownership, deployment notes, and local
rules from any existing nested
AGENTS.md.
5. Progressive Disclosure Rules
- Do not embed style guides, CI policies, or architecture details.
- Prefer links to existing docs and external or local skills.
- Include only links that exist or are explicitly cited as the source for commands or policy.
- Replace stale long-form sections with links when an authoritative doc exists.
- Avoid “always/never” rules unless critical for correctness/security.
6. Safety / Correctness Gates
- Never invent commands.
- Infer commands from:
- package scripts
- Makefile
- CI configuration
- README
- If uncertain → write: “Known commands: see <existing file>”
- Preserve critical warnings (security, secrets, deployment).
Output Contract
Create or update only:
<repo_root>/AGENTS.md<module_dir>/AGENTS.md
Do not create agent configuration folders.
Skill Referencing Strategy
When adding skill references inside AGENTS.md:
-
If local skill directory detected
See: <detected-skill-root>/<skill-name>/SKILL.md -
If no local directory exists
Skill: agents-md-generator (external)
Never assume filesystem paths.
Validation
Before finishing, verify:
- Only root/module
AGENTS.mdfiles were created or updated. - Final
AGENTS.mdfiles contain no unresolved<...>placeholders. - Relative documentation links exist or clearly point to a source file for commands/policy.
- Commands are supported by package scripts, Makefile, CI configuration, or
README. If no command is verified, use
Known commands: see <existing file>. - Line budgets are respected: root ≤ 60 lines, nested module ≤ 40 lines.
- Nested files exist only for confirmed module boundaries.
- Critical warnings from existing
AGENTS.mdfiles are preserved.
FAQ
What does the agents-md-generator skill do?
Create, generate, update, repair, trim, or split minimal AGENTS.md files for repository roots and confirmed nested modules using progressive disclosure. Use for missing, bloated, contradictory, or outdated agent instructions, monorepos, services, packages, module context, and portable agent guidance without assuming any fixed agent folder structure.
How do I install agents-md-generator?
Run npx skills add https://github.com/madteacher/mad-agents-skills --skill agents-md-generator in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/agents-md-generator/ (personal) or .claude/skills/agents-md-generator/ (project).
Which AI agents can use agents-md-generator?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is agents-md-generator safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains agents-md-generator?
It is published by madteacher in madteacher/mad-agents-skills. It has 379 recorded installs.
More from madteacher/mad-agents-skills
flutter-animations
madteacher/mad-agents-skills
Add, fix, refactor, debug, test, or explain Flutter animations and motion effects. Use when working with implicit animations such as AnimatedContainer, AnimatedOpacity, AnimatedSwitcher, and TweenAnimationBuilder; explicit animations using AnimationController, Tween, CurvedAnimation, AnimatedWidget, AnimatedBuilder, and built-in transitions; Hero/shared-element route transitions; staggered or sequenced animations; physics-based motion, gestures, springs, flings, scroll physics, curves, performance, accessibility, reduced motion, and animation lifecycle bugs.
flutter-adaptive-ui
madteacher/mad-agents-skills
Build, fix, review, and validate adaptive or responsive Flutter UIs for mobile, tablet, desktop, web, large screens, foldables, and mixed input devices. Use when creating breakpoint-driven layouts, responsive navigation, adaptive dialogs/lists/grids, keyboard/mouse/touch behavior, window-size decisions with MediaQuery or LayoutBuilder, or Capability and Policy patterns for platform-specific behavior.
flutter-architecture
madteacher/mad-agents-skills
Design, refactor, review, or implement Flutter app architecture using MVVM, layered UI/Data/optional Domain boundaries, feature-first or layer-first project structure, repositories, services, dependency injection, Result and Command patterns, offline-first or optimistic UI flows. Use when asked to add a Flutter feature, audit layer dependencies, fix cross-feature imports, migrate to feature-first, choose architecture for a Flutter project, or create scalable maintainable Flutter code organization.
flutter-testing
madteacher/mad-agents-skills
Write, fix, review, debug, and validate Flutter tests for apps, packages, and plugins. Use when adding unit tests, widget tests, integration tests, MethodChannel or plugin mocks, Mockito or mocktail test doubles, golden or accessibility checks, CI test commands, test failures, MissingPluginException, pump or pumpAndSettle problems, finder errors, buildrunner mock generation, device integration testing, web integration testing, or flaky Flutter tests.
flutter-networking
madteacher/mad-agents-skills
Implement, fix, debug, review, or refactor Flutter networking code for HTTP/REST APIs, WebSocket realtime flows, authentication and token refresh, request headers, timeouts, retries, JSON parsing, caching, background isolates, repositories, services, and adaptation to existing http, Dio, Retrofit, Chopper, or custom API clients. Use when asked to add network requests, investigate network errors, harden API clients, handle auth, or validate Flutter network behavior.
flutter-drift
madteacher/mad-agents-skills
Implement, fix, review, migrate, test, or debug Drift persistence in Flutter apps using SQLite, driftflutter, type-safe Dart queries, generated tables, StreamBuilder or Riverpod StreamProvider UI, write operations, transactions, schema migrations, web assets, isolate sharing, and local database testing. Use when a Flutter task mentions drift, local database storage, SQLite, reactive database streams, CRUD, schemaVersion, buildrunner, driftdev make-migrations, migration tests, or Flutter-specific database setup across mobile, web, or desktop.
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.