- agent-docs ships three skills (
/gather-agent-docs,/use-agent-docs,/refresh-agent-docs) that give a coding agent a curated, on-disk reference for the project's key topics — answer locally before web-searching. - Skills are file-based and harness-agnostic: the same
skills/tree works in Claude Code, Gemini CLI, and GitHub Copilot. - End-user state lives in
.agents/docs/INDEX.mdplus one<topic>/DOC.mdper topic and optional<SUBTOPIC>.mdsibling files. Each page opens with YAML frontmatter (last_verified, optionalupstream_commit,sources.{docs,repo,changelog,release});INDEX.md's per-topic date is the oldestlast_verifiedamong the topic's files.
-
Line caps. Skill files exist to be loaded by an agent on every run; verbosity directly costs context budget. Targets:
skills/*/SKILL.md— ≤ 110 lines- Project-root markdown (
README.md,AGENTS.md) — uncapped, but tighten when it sprawls
When a file approaches its cap, prefer cutting motivational/explanatory prose over removing structural rules. Each rule should be stated once, in the imperative, in the file the agent loads when it needs it. The "why" lives in commit messages and PR descriptions.
-
Lint. Run
npm run lintto validate changes — Prettier formatting plus markdownlint-cli2.pre-commitand CI run the same hook. -
Voice. Skill bodies address the agent in the imperative ("Read X, then write Y"). Avoid second-person flavor text aimed at the human reader — that belongs in the README.
-
Capture vs. link. The
gather-agent-docsrules apply to this repo's own behavior: build the documentation map by default (T1: page title + URL + one-line hook); capture paste-ready snippets only on request (T2: capped at ~5 per topic, each with a per-block source link); link out (never capture) for volatile values like model IDs and pricing (T3); copy verbatim from upstream just fetched in this session (never paraphrase, infer, or auto-complete); keep pages reusable across projects.
- The three skills pair into a small loop on the user's project (this repo does not consume its own skills — there is no
.agents/docs/here):/gather-agent-docs— seed.agents/docs/with a documentation map (link index) for the project's key topics; deepen a topic with paste-ready snippets on request (e.g. "deepen gemini-cli")/use-agent-docs— read.agents/docs/INDEX.mdand the matchingDOC.md's documentation map before web-searching a known topic; optionally backfill snippets on use/refresh-agent-docs— re-verify the documentation map (link rot) and any captured snippets against upstream; bumplast_verifieddates; defaults to every topic, accepts a topic slug ortopic/subtopicas a natural-language argument; short-circuits viaupstream_commit/sources.changelogwhen upstream hasn't moved
skills/— Agent Skills (gather-agent-docs,use-agent-docs,refresh-agent-docs).examples/— worked sample of what/gather-agent-docsproduces (two topics, one with a deepened subtopic split). Illustrative, not curated..claude-plugin/,gemini-extension.json,plugin.json— harness manifests for Claude Code, Gemini CLI, GitHub Copilot.CLAUDE.md,GEMINI.md— single-line@AGENTS.mdincludes so Claude Code and Gemini CLI pick up the canonical context.package.json,.markdownlint-cli2.jsonc,.prettierrc.json,.prettierignore—npm run lint(Prettier + markdownlint-cli2) plus shared formatter config..pre-commit-config.yaml,.github/workflows/ci.yml— pre-commit hooks (large files, merge conflicts, private keys, lint) run locally and in CI on push and PR.