Condense agents md

From CERTCC/Vultron · View interactive version

Condense agents md is an AI agent skill from the GitHub repository CERTCC/Vultron. Condense AGENTS.md files that have grown too large by migrating content to per-directory AGENTS.md files and notes/ references. Use when root AGENTS.md exceeds ~400 lines, or when asked to clean up, condense, or restructure AGENTS.md.

How to use this skill

Skill file

Skill: Condense AGENTS.md

Purpose

Root AGENTS.md files grow over time as pitfalls accumulate. This skill trims

them by migrating content to two destinations:

  1. Per-directory AGENTS.md — subsystem-specific rules land in the

directory they govern (e.g., test/AGENTS.md, specs/AGENTS.md).

  1. notes/ references — pitfall write-ups that already have (or should

have) a canonical notes/ file are replaced by a single-line pointer.

Target: root AGENTS.md ≤ 400 lines.

Workflow

Phase 1 — Audit

bash .agents/skills/condense-agents-md/scripts/audit.sh AGENTS.md

Shows: each ##/### section, its line count, the running total, and the

excess over the 400-line target.

Phase 2 — Categorize

For every section over-budget, classify it using the rules in

REFERENCE.md:

| Label | Meaning |

|---|---|

| KEEP | Essential orientation — stays in root |

| MOVE:path/AGENTS.md | Subsystem-specific — move to that file |

| REF:notes/x.md | Already in notes/ — replace with one-liner |

| NEW-NOTE:notes/x.md | No existing home — create new notes/ file, then REF |

Phase 3 — Plan and get approval

Present the migration table (section → action → destination → rationale) to

the user via ask_user. Do not modify any files before approval.

Phase 4 — Execute

For each migration:

the target notes/ file (create with frontmatter if new — see

REFERENCE.md); replace the root section with a one-liner:

See [notes/x.md](notes/x.md) for <topic>.

remove the section from root entirely.

Phase 5 — Validate and commit

  1. wc -l AGENTS.md — verify within target.
  2. ./mdlint.sh AGENTS.md <other modified .md files> — lint the modified

markdown files.

  1. Commit: docs: condense AGENTS.md — migrate <N> sections.

Hard rules

workaround, or rule that has since been superseded, do not migrate it and do

not migrate a "this is retired" note about it — drop it, and state the current

rule in its place. AGENTS.md and notes/ carry current understanding; git

history is the record of what they used to say. Verify supersession against the

code before deciding (git log -S, grep for the pattern), and say so in the

commit message. Retired notes sections are removed via

uv run append-history note (PD-03-002, PD-03-004), not raw deletion.

(related_notes, related_specs) to reflect the new content.

status: active). See REFERENCE.md for the template.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.