@cubicecho/agent-docs
v0.2.2
Published
Generates and checks the agent docs a package ships: llms.txt from _agents/docs/ pages and each package export's doc comments, and the checks that keep README, AGENTS.md and the package contents to the standard.
Maintainers
Readme
@cubicecho/agent-docs
Generates and checks the docs a package ships for AI coding agents. agent-docs llms writes llms.txt from the
pages in _agents/docs/ and, for a TypeScript package, from the doc comments behind every package.json
exports entry. agent-docs check holds the README, AGENTS.md, links, page sizes and package contents to the
agent docs standard. Both exit 1 with one line per problem, so CI can run them as they are.
It exists because every repo had its own copy of the generator, and the copies had drifted: some indexed only
src/index.ts and missed subpath entries such as ./mdns, and all of them cut a summary short at "e.g.". One
package, one set of fixes.
Install
npm i -D @cubicecho/agent-docsNode 22 or later. No runtime dependencies.
Quick start
{
"scripts": {
"llms": "agent-docs llms",
"docs:check": "agent-docs check",
"prepack": "npm run build && agent-docs llms"
},
"files": ["dist", "llms.txt", "_agents/docs"]
}echo /llms.txt >> .gitignore # prepack writes it on every publish, so git doesn't track it
npm run llms # in CI: fails on a page without a title or summary
npm run docs:check # in CI: fails when the docs fall short of the standardDocumentation
- llms.txt, the index of everything below, as the latest release ships it
- Install and wire up
- The agent-docs command
_agents/llms.json- What check enforces
- CI
- Common mistakes
- Changelog
