# llms-maintainer

A subagent that builds and updates the llms.txt roadmap from your site structure. Handy after a build or a routing change.

- subagent · `type=agent` · Claude Code · 976 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/ai-specialists/llms-maintainer.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/agents/llms-maintainer

## What it does

llms-maintainer walks your project and writes `llms.txt`, the page map AI crawlers read. It starts by detecting the framework from config files: Astro and Nuxt get `public/llms.txt`, Svelte, Hugo and Docusaurus get `static/llms.txt`, VitePress gets `<srcDir>/public/llms.txt`, Jekyll gets `llms.txt` at the repo root. Then it looks for the base URL in environment variables or `package.json`, and asks you for the domain if it finds neither.

Next it scans the content directories and pulls titles and descriptions from metadata, front-matter or `<Head>`. Titles are trimmed to 70 characters, descriptions to 120. Paths like `/api/`, `/admin/` and test files are skipped. Past roughly 50 candidates it switches to batched Grep extraction to stay inside the turn budget. Anything between `# BEGIN CUSTOM` and `# END CUSTOM` is left untouched.

The agent asks for confirmation before committing and never pushes on its own. It only creates `llms-full.txt` when you ask for it. Above 500 entries it warns you and asks how to curate. It runs on the haiku model with Read, Write, Bash, Grep and Glob.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --agent ai-specialists/llms-maintainer
```

2. **Manually: put the files in place**
- File: `.claude/agents/llms-maintainer.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/llms-maintainer.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/llms-maintainer.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/ai-specialists/llms-maintainer.md

## When to use it
- generate llms.txt after a production build
- refresh the page map after routes change
- pull titles and descriptions out of page metadata
- set up navigation for AI crawlers
- keep hand-written blocks intact on rewrite

## Example prompts
- Generate llms.txt for this project
- Update llms.txt after the route changes
- Check whether llms.txt is current and add the new pages

## Similar
- [seo-aeo-geo](https://affpapa.org/en/nevibecode/skills/seo-aeo-geo.md) — skill · 317 installs
- [create-llms](https://affpapa.org/en/nevibecode/skills/create-llms.md) — skill · 9200 installs
- [update-llms](https://affpapa.org/en/nevibecode/skills/update-llms.md) — skill · 8800 installs
- [seo-aeo-best-practices](https://affpapa.org/en/nevibecode/skills/seo-aeo-best-practices.md) — skill · 7300 installs
- [bencium-aeo](https://affpapa.org/en/nevibecode/skills/bencium-aeo.md) — skill · 3300 installs
- [blog-geo](https://affpapa.org/en/nevibecode/skills/blog-geo.md) — skill · 2600 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 224 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
