agentleFS
k-joelk-joel/agent-skills/init-project-docs/SKILL.md

init-project-docs

Skill1 starsChanged 17 days agoMITView on GitHub

One-time initialization of the standard project documentation set (ARCH, CHANGELOG, DECISIONS, GLOSSARY, ISSUES, NOTES, RUNBOOK, TECH_DEBT, TOOLS) in docs/, registered in the root AGENTS.md. Use when setting up or standardizing documentation for a new or existing project. Creates or refreshes each doc with its canonical header, adds the Project Docs entries to AGENTS.md, and drafts initial content following each doc''s embedded maintenance guide. Single-use: every generated doc carries its own maintenance instructions, so later updates follow the doc itself and this skill is never invoked again.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. bbiramahire/claude-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 5 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run everything from the project root (the script writes to ./docs/ and ./AGENTS.md).

    line 14
  2. Very specific:

    Run from the project root, where <skill-dir> is the directory containing this SKILL.md:

    line 37
  3. Very specific:

    If --list returned matches, ask which file headers to overwrite.

    line 47
  4. Distinctive:

    If no standard docs exist yet, ask which docs to initialize (default: all nine).

    line 48
  5. Very specific:

    Existing file: read the file and find N, the line where the old header ends and the content begins.

    line 55
  6. Distinctive:

    Search for an AGENTS.md in the project root.

    line 64
  7. Very specific:

    If it exists, search it for a documentation section — a heading such as ## Project Docs, ## Docs, ## Documentation, or similar.

    line 65
  8. Very specific:

    If a docs section exists, note BEGIN:END, the line range of that section (heading line through its last entry).

    line 67
  9. Distinctive:

    If no docs section exists, find an appropriate place for it (for example after the project overview or near other reference material) and …

    line 69
  10. Very specific:

    If AGENTS.md does not exist, pass --agents -1.

    line 71
  11. Very specific:

    After the headers are in place, make each doc conform to the EXAMPLE LAYOUT and STRUCTURE & FORMATTING rules in its own maintenance guide — …

    line 92
  12. Distinctive:

    Check each doc against its guide's hard rules before finishing, for example:

    line 111
  13. Very specific:

    If docs/<FILE>.md does not exist: create it with the stored header.

    line 137
  14. Very specific:

    If it exists: replace its first N lines with the stored header and keep the rest.

    line 139
  15. Distinctive:

    Single-use skill: After this run the docs maintain themselves: every update follows the maintenance guide embedded in the affected doc.

    line 158

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Initialize Project Documentation

Initialize the standard nine-document set in docs/ at the project root and register it in the root AGENTS.md. Each document embeds its own <!-- MAINTENANCE GUIDE --> comment — the authoritative spec for how to create, update, and retire its content. This skill runs once per project: after it completes, every future update follows the maintenance guide inside the affected doc. Never invoke this skill again.

Run everything from the project root (the script writes to ./docs/ and ./AGENTS.md). The bundled script is Python 3, standard library only.

The documentation set

FlagFilePurpose
--archdocs/ARCH.mdLive, as-built architecture reference: topology, data flows, components.
--changelogdocs/CHANGELOG.mdReverse-chronological record of notable user-visible changes (Keep a Changelog).
--decisionsdocs/DECISIONS.mdArchitecture decision records: why structural choices exist (ADR-NNN entries).
--glossarydocs/GLOSSARY.mdCanonical project vocabulary; rejected aliases under _Avoid_.
--issuesdocs/ISSUES.mdOpen bugs, defects, and gaps (ISS-NNN entries).
--notesdocs/NOTES.mdVerified gotchas, invariants, and operational quirks.
--runbookdocs/RUNBOOK.mdRepeatable operator procedures (RUN-NNN entries).
--tech-debtdocs/TECH_DEBT.mdVerified technical debt ledger (DEBT-NNN entries).
--toolsdocs/TOOLS.mdInventory of standalone helper scripts in tools/.

The same run also registers the processed docs in the root AGENTS.md (step 4).

Workflow

1. Inventory existing docs

Run from the project root, where <skill-dir> is the directory containing this SKILL.md:

python "<skill-dir>/scripts/create_docs.py" --list

This prints every standard doc that already exists in docs/, with its line count.

2. Choose scope with the user

  • If --list returned matches, ask which file headers to overwrite; accept all for everything.
  • If no standard docs exist yet, ask which docs to initialize (default: all nine).
  • Exclude every doc the user does not want touched.

3. Write headers

For each selected doc:

  • Existing file: read the file and find N, the line where the old header ends and the content begins. The old header is the H1 title, the preamble, the <!-- MAINTENANCE GUIDE --> comment, the --- separator, and the old empty-state scaffold. N is the last line of that block — the script replaces lines 1..N and preserves everything from N+1. Never include content lines in N; they would be deleted.
  • New file: pass no line number; the script creates docs/<FILE>.md with the stored header.

4. Register the docs in AGENTS.md

  1. Search for an AGENTS.md in the project root.
  2. If it exists, search it for a documentation section — a heading such as ## Project Docs, ## Docs, ## Documentation, or similar.
    • If a docs section exists, note BEGIN:END, the line range of that section (heading line through its last entry). The script replaces exactly those lines.
    • If no docs section exists, find an appropriate place for it (for example after the project overview or near other reference material) and note the insertion line.
  3. If AGENTS.md does not exist, pass --agents -1; the script creates a skeleton AGENTS.md with the Project Docs section already filled out.
  4. Pass --agents BEGIN:END in the same call as the doc flags from step 3. The script writes the Project Docs section (heading + intro line + entries) for every doc flagged in that call and skips entries for docs that were not flagged — no --issues flag means no ISSUES.md entry. To insert the section without deleting any lines, pass a zero-width range: --agents 40:39 inserts before line 40.

Batch everything into one call, for example:

python "<skill-dir>/scripts/create_docs.py" --issues 86 --notes 65 --arch --agents 30:45

The stored header is the boilerplate (H1 + preamble + maintenance guide comment + ---) plus the doc's empty-state scaffold, so a fresh file is valid per its own guide immediately. The script refuses to touch an existing file without a line number, refuses -1 when AGENTS.md already exists, and refuses a range when AGENTS.md does not exist.

5. Draft and rewrite content

After the headers are in place, make each doc conform to the EXAMPLE LAYOUT and STRUCTURE & FORMATTING rules in its own maintenance guide — the guide inside each doc is authoritative.

  • New docs: draft initial content from the actual codebase. Inspect source, config, and git history before writing; never invent facts. Keep the empty-state scaffold wherever nothing qualifies (for example, leave ## Open empty in ISSUES.md and _No tools registered._ in TOOLS.md).
  • Existing docs: rewrite the preserved content into the conforming layout. Preserve entry IDs — ADR-NNN, ISS-NNN, RUN-NNN, and DEBT-NNN are permanent and never renumbered — plus facts, dates, and evidence. Restructure only the format (for example, an ad-hoc bug list becomes ### ISS-NNN entries with Symptom / Where flagged / Cause / Suggested fix).
  • Fill placeholders: set the GLOSSARY H1 and overview sentence for this project, and CHANGELOG reference links when the repository URL is known.
  • Complete the AGENTS.md skeleton if one was created: fill the overview placeholder and add the project's conventions and workflows.

6. Verify

Check each doc against its guide's hard rules before finishing, for example:

  • ISSUES.md keeps ## Open present at all times and has no ## Closed or ## Resolved section.
  • DECISIONS.md and RUNBOOK.md keep a single H1 and a maintained ## Entries index table with working anchors.
  • TECH_DEBT.md keeps its two ## sections in order.
  • TOOLS.md lists entries strictly alphabetically using the **`<file>`** — summary format.
  • CHANGELOG.md groups bullets under the six ### categories, omitting empty ones.
  • AGENTS.md lists exactly the processed docs under the Project Docs section and its other content is untouched.

Script reference

python "<skill-dir>/scripts/create_docs.py" --list

Lists the standard docs that already exist in docs/, one per line, with line counts. Cannot be combined with other flags.

python "<skill-dir>/scripts/create_docs.py" --<name> [N] ...

For each doc flag (repeatable, combinable in one invocation):

  • If docs/<FILE>.md does not exist: create it with the stored header. A passed N is ignored with a note.
  • If it exists: replace its first N lines with the stored header and keep the rest. N = the last line of the old header, e.g. --issues 20 replaces the first 20 lines.
python "<skill-dir>/scripts/create_docs.py" --agents BEGIN:END|--agents -1 ...

Registers the docs flagged in the same invocation in the root AGENTS.md:

  • --agents BEGIN:END: replace lines BEGIN..END of AGENTS.md with the Project Docs section (## Project Docs, the intro line, and one entry per flagged doc). Entries for unflagged docs are excluded. A zero-width range (40:39) inserts the section before line 40 without deleting.
  • --agents -1: create a skeleton AGENTS.md with the Project Docs section already filled out (refused if AGENTS.md already exists).

Errors (non-zero exit): an existing file without N; N out of range; --list combined with other flags; no document selected; malformed or out-of-range --agents range. Existing files keep their line-ending style (CRLF stays CRLF).

Single-use skill. After this run the docs maintain themselves: every update follows the maintenance guide embedded in the affected doc. Do not invoke this skill again.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.