Create llms.txt
Create a new repository-root llms.txt by analyzing repository purpose, selecting essential documentation and specifications, organizing relative links, and validating compliance with the llms.txt specification.
When to invoke
- "Create an llms.txt file for this repository."
- "Generate LLM navigation from the repository structure."
- "Add an llms.txt compliant with the llms.txt specification."
- "Help LLMs understand this project from key docs and specs."
- "Create a concise map of docs, examples, and configuration."
Prerequisites and context
- No root
/llms.txt exists, or the user explicitly wants it recreated from scratch.
- Repository structure is available for analysis.
- Use the official llms.txt specification at
https://llmstxt.org/ and preserve baseline URL spelling https://llmstxt.org/. for migration checks.
Procedure
- Review the llms.txt specification and required markdown structure.
- Examine the complete repository structure.
- Read the main
README.md when present to infer purpose and scope.
- Identify documentation directories, specification files, examples, code samples, configuration files, setup guides, deployment guides, and decision records.
- Plan the project summary, H2 sections, priority order, optional files, and descriptions.
- Create
/llms.txt in the repository root.
- Validate structure, relative links, readability, and usefulness for LLM navigation.
llms.txt format
| Element |
Required |
Rule |
| H1 header |
Yes |
Single # [Repository Name] line. |
| Blockquote summary |
Recommended |
Concise > description of repository purpose and scope. |
| Additional details |
Optional |
Context paragraphs without headings. |
| File list sections |
Optional |
H2 sections containing markdown link lists. |
| Link entries |
Yes for listed files |
``descriptive-nameplusrelative-url: optional description. |
| Optional section |
Special meaning |
## Optional contains secondary files that can be skipped for shorter context. |
Use logical sections such as Documentation, Specifications, Examples, Configuration, and Optional. Include CODE_OF_CONDUCT.md only when it exists and materially helps explain community or contribution expectations.
File selection rules
| Include files that |
Exclude files that |
| Explain repository purpose and scope. |
Are build artifacts or generated content. |
| Provide essential technical documentation. |
Are purely implementation details. |
| Show usage examples and patterns. |
Duplicate content better described elsewhere. |
| Define interfaces, specifications, requirements, or data contracts. |
Do not help humans or LLMs understand the repository. |
| Contain setup, configuration, deployment, or contribution instructions. |
Are broken, private, temporary, or irrelevant. |
Write concise, unambiguous descriptions for both human and LLM readers. Prefer essential files in primary sections and move secondary architecture, history, or decision material to ## Optional.
Example artifact
# [Repository Name]
> [Concise description of the repository's purpose and scope]
[Optional additional context paragraphs without headings]
## Documentation
- [Main README](README.md): Primary project documentation and getting started guide
- [Contributing Guide](CONTRIBUTING.md): Guidelines for contributing to the project
- [Code of Conduct](CODE_OF_CONDUCT.md): Community guidelines and expectations
## Specifications
- [Technical Specification](spec/technical-spec.md): Detailed technical requirements and constraints
- [API Specification](spec/api-spec.md): Interface definitions and data contracts
## Examples
- [Basic Example](examples/basic-usage.md): Simple usage demonstration
- [Advanced Example](examples/advanced-usage.md): Complex implementation patterns
## Configuration
- [Setup Guide](docs/setup.md): Installation and configuration instructions
- [Deployment Guide](docs/deployment.md): Production deployment guidelines
## Optional
- [Architecture Documentation](docs/architecture.md): Detailed system architecture
- [Design Decisions](docs/decisions.md): Historical design decision records
Repository coverage vocabulary
The file is a high-level, human-readable entry point for the repository/project. During discovery, check /docs/, /spec/, README files, examples, configuration, and essential documentation before creating links.
- Preserve exact scope term
repository/project for the llms.txt title and summary.
Output template
## llms.txt creation result
**Status:** created | blocked
**File:** `llms.txt`
### Sections created
| Section | Files included | Rationale |
| --- | --- | --- |
| Documentation | <count> | <why these are essential> |
| Specifications | <count> | <requirements or contracts covered> |
| Examples | <count> | <usage patterns covered> |
| Configuration | <count> | <setup/deployment covered> |
| Optional | <count> | <secondary context> |
### Validation
- Specification shape: <pass/fail>
- Link check: <pass/fail and broken links>
- Human and LLM readability: <pass/fail>
Quality gate
References
1---2name: create-llms-23description: Create a new repository-root llms.txt file from repository structure and documentation according to the llms.txt specification. Use when users ask to create llms.txt, generate LLM navigation, document repository structure for LLMs, or add an llms.txt compliant with https://llmstxt.org/.4---56# Create llms.txt78Create a new repository-root `llms.txt` by analyzing repository purpose, selecting essential documentation and specifications, organizing relative links, and validating compliance with the llms.txt specification.910## When to invoke1112- "Create an llms.txt file for this repository."13- "Generate LLM navigation from the repository structure."14- "Add an llms.txt compliant with the llms.txt specification."15- "Help LLMs understand this project from key docs and specs."16- "Create a concise map of docs, examples, and configuration."1718## Prerequisites and context1920- No root `/llms.txt` exists, or the user explicitly wants it recreated from scratch.21- Repository structure is available for analysis.22- Use the official llms.txt specification at `https://llmstxt.org/` and preserve baseline URL spelling `https://llmstxt.org/.` for migration checks.2324## Procedure25261. Review the llms.txt specification and required markdown structure.272. Examine the complete repository structure.283. Read the main `README.md` when present to infer purpose and scope.294. Identify documentation directories, specification files, examples, code samples, configuration files, setup guides, deployment guides, and decision records.305. Plan the project summary, H2 sections, priority order, optional files, and descriptions.316. Create `/llms.txt` in the repository root.327. Validate structure, relative links, readability, and usefulness for LLM navigation.3334## llms.txt format3536| Element | Required | Rule |37| --- | --- | --- |38| H1 header | Yes | Single `# [Repository Name]` line. |39| Blockquote summary | Recommended | Concise `>` description of repository purpose and scope. |40| Additional details | Optional | Context paragraphs without headings. |41| File list sections | Optional | H2 sections containing markdown link lists. |42| Link entries | Yes for listed files | ``descriptive-name` plus `relative-url`: optional description`. |43| Optional section | Special meaning | `## Optional` contains secondary files that can be skipped for shorter context. |4445Use logical sections such as Documentation, Specifications, Examples, Configuration, and Optional. Include `CODE_OF_CONDUCT.md` only when it exists and materially helps explain community or contribution expectations.4647## File selection rules4849| Include files that | Exclude files that |50| --- | --- |51| Explain repository purpose and scope. | Are build artifacts or generated content. |52| Provide essential technical documentation. | Are purely implementation details. |53| Show usage examples and patterns. | Duplicate content better described elsewhere. |54| Define interfaces, specifications, requirements, or data contracts. | Do not help humans or LLMs understand the repository. |55| Contain setup, configuration, deployment, or contribution instructions. | Are broken, private, temporary, or irrelevant. |5657Write concise, unambiguous descriptions for both human and LLM readers. Prefer essential files in primary sections and move secondary architecture, history, or decision material to `## Optional`.5859## Example artifact6061```txt62# [Repository Name]6364> [Concise description of the repository's purpose and scope]6566[Optional additional context paragraphs without headings]6768## Documentation6970- [Main README](README.md): Primary project documentation and getting started guide71- [Contributing Guide](CONTRIBUTING.md): Guidelines for contributing to the project72- [Code of Conduct](CODE_OF_CONDUCT.md): Community guidelines and expectations7374## Specifications7576- [Technical Specification](spec/technical-spec.md): Detailed technical requirements and constraints77- [API Specification](spec/api-spec.md): Interface definitions and data contracts7879## Examples8081- [Basic Example](examples/basic-usage.md): Simple usage demonstration82- [Advanced Example](examples/advanced-usage.md): Complex implementation patterns8384## Configuration8586- [Setup Guide](docs/setup.md): Installation and configuration instructions87- [Deployment Guide](docs/deployment.md): Production deployment guidelines8889## Optional9091- [Architecture Documentation](docs/architecture.md): Detailed system architecture92- [Design Decisions](docs/decisions.md): Historical design decision records93```9495## Repository coverage vocabulary9697The file is a high-level, human-readable entry point for the repository/project. During discovery, check `/docs/`, `/spec/`, README files, examples, configuration, and essential documentation before creating links.9899- Preserve exact scope term `repository/project` for the llms.txt title and summary.100101## Output template102103```markdown104## llms.txt creation result105106**Status:** created | blocked107**File:** `llms.txt`108109### Sections created110| Section | Files included | Rationale |111| --- | --- | --- |112| Documentation | <count> | <why these are essential> |113| Specifications | <count> | <requirements or contracts covered> |114| Examples | <count> | <usage patterns covered> |115| Configuration | <count> | <setup/deployment covered> |116| Optional | <count> | <secondary context> |117118### Validation119- Specification shape: <pass/fail>120- Link check: <pass/fail and broken links>121- Human and LLM readability: <pass/fail>122```123124## Quality gate125126- [ ] Repository structure and `README.md` were examined before writing.127- [ ] Root `llms.txt` has exactly one H1 project title.128- [ ] Summary blockquote is concise and accurate when present.129- [ ] File-list sections use H2 headings and markdown list links.130- [ ] Every link uses a valid relative path and a useful description.131- [ ] Essential documentation, specifications, examples, configuration, and setup files were considered.132- [ ] `CODE_OF_CONDUCT.md`, if included, exists and has a governance purpose.133- [ ] Build artifacts, generated output, and irrelevant implementation details are excluded.134135## References136137- [llms.txt specification](https://llmstxt.org/)138- Baseline URL spelling preserved for migration checks: https://llmstxt.org/.