You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
♻️ Refactor generate-llms-txt to follow LLM-to-LLM communication best practices
Remove docs/ directory support and simplify location detection to public/ → static/ → root. Eliminate overly prescriptive step-by-step instructions in favor of goal-focused directives that trust the executing LLM's capabilities.
Changes:
- Remove docs/ from location detection logic (user preference)
- Replace numbered steps with clear objectives and outcomes
- Consolidate workflow sections into semantic XML structure
- Add two complete, consistent examples showing desired pattern
- Remove anti-patterns and "don't do this" guidance
- Simplify from prescriptive algorithms to goal statements
- Reduce file from 253 to 192 lines while improving clarity
Fixes Cursor bot medium severity issue about documentation site priority conflict by removing docs/ entirely. Aligns with prompt-engineering.mdc principles: goals over process, pattern consistency, and trusting LLM capabilities.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
@@ -4,7 +4,7 @@ description: Generate or update llms.txt file to help LLMs understand and naviga
4
4
5
5
# Generate llms.txt
6
6
7
-
Creates or updates `llms.txt` - a standardized file that helps Large Language Models understand and navigate your website or documentation at inference time.
7
+
Creates or updates llms.txt - a standardized file that helps Large Language Models understand and navigate your website or documentation at inference time.
8
8
9
9
<philosophy>
10
10
llms.txt provides LLM-friendly navigation and context for websites and documentation. It should be:
@@ -16,44 +16,21 @@ llms.txt provides LLM-friendly navigation and context for websites and documenta
16
16
Think: "What does an LLM need to understand and effectively use this site?"
17
17
</philosophy>
18
18
19
-
<workflow>
20
-
<determine-location>
21
-
Detect the appropriate location for llms.txt based on project type:
22
-
23
-
1. Check for `public/` directory (Next.js, React, Vue, many static site generators)
24
-
2. Check for `static/` directory (Django, Flask, Hugo)
25
-
3. Check for `docs/` directory if this appears to be a documentation site
26
-
4. Default to repository root if none found
27
-
28
-
The file should be placed where it will be accessible at the URL path `/llms.txt` when the site is deployed.
29
-
</determine-location>
30
-
31
-
<analyze-project>
32
-
Understand the project structure to generate relevant content:
33
-
34
-
1. Detect project type:
35
-
- Check `package.json` for web frameworks (Next.js, React, Vue, etc.)
36
-
- Check `pyproject.toml`, `requirements.txt` for Python frameworks (Django, Flask, FastAPI)
37
-
- Check for static site generators (Hugo, Jekyll, Gatsby, etc.)
38
-
- Check for documentation tools (MkDocs, Docusaurus, VitePress, etc.)
39
-
40
-
2. Identify key documentation:
41
-
- Look for README.md
42
-
- Look for docs/ or documentation/ directory
43
-
- Look for CONTRIBUTING.md, ARCHITECTURE.md, API.md
44
-
- Check .cursor/rules/ for coding standards
45
-
- Check .claude/agents/ for specialized agents
46
-
- Check for API documentation (OpenAPI/Swagger files)
- Documentation site URL (from package.json, README)
51
-
- API reference locations
52
-
- Getting started guides
53
-
</analyze-project>
54
-
55
-
<generate-structure>
56
-
Create llms.txt following the standard format:
19
+
<objective>
20
+
Generate or update an llms.txt file that helps LLMs navigate the project's documentation and resources. Place the file where it will be accessible at /llms.txt when deployed.
21
+
</objective>
22
+
23
+
<file-placement>
24
+
Determine the appropriate location:
25
+
- public/ directory for Next.js, React, Vue, and most static site generators
26
+
- static/ directory for Django, Flask, Hugo
27
+
- Repository root as fallback
28
+
29
+
Choose the location that makes the file accessible at /llms.txt when the site is deployed.
30
+
</file-placement>
31
+
32
+
<content-structure>
33
+
Follow the llmstxt.org standard format:
57
34
58
35
```markdown
59
36
# Project Name
@@ -85,169 +62,131 @@ Additional context paragraph (optional): More detailed information about the pro
85
62
- [Advanced Topics](url): Brief description
86
63
```
87
64
88
-
Structure guidelines:
89
-
-**H1 title** (required): Project or site name
90
-
-**Blockquote** (recommended): Short summary with key information for understanding the rest of the file
91
-
-**Additional context** (optional): Detailed background if needed
92
-
-**Sections** (H2 headers): Organize documentation by category
93
-
- Common categories: Documentation, Guides, Reference, API, Examples, Contributing
94
-
- Use "Optional" section for less critical resources
95
-
-**Links**: Markdown format with optional brief descriptions
96
-
- Use relative paths for internal documentation
97
-
- Use absolute URLs for external resources
98
-
- Keep descriptions concise
99
-
100
-
Priority order:
101
-
1. Getting started / quickstart guides
65
+
Structure requirements:
66
+
- H1 title with project name
67
+
- Blockquote summary for quick context
68
+
- H2 sections organizing documentation by category
69
+
- Markdown links with concise descriptions
70
+
- "Optional" section for less critical resources
71
+
72
+
Link format:
73
+
- Use relative paths for internal documentation
74
+
- Use absolute URLs for external resources
75
+
- Prioritize most important links first within each section
- Present proposed updates with rationale before modifying
103
+
- Show diff of changes for review
104
+
</update-workflow>
113
105
114
-
For most projects, start with just `llms.txt`. Only create `llms-full.txt` if:
115
-
- Project has extensive documentation that would benefit from a single-file view
116
-
- Documentation is already in markdown format
117
-
- Total size would be reasonable (< 100KB)
106
+
<examples>
107
+
Next.js project with comprehensive docs:
118
108
119
-
Skip llms-full.txt creation for now unless user specifically requests it.
120
-
</create-llms-full-txt>
109
+
```markdown
110
+
# AI Coding Config
121
111
122
-
<optimize-for-llms>
123
-
Review and optimize the generated content:
112
+
> Plugin marketplace for Claude Code and Cursor providing reusable coding standards, workflows, and AI agents.
124
113
125
-
1.**Prioritize ruthlessly**: Most important links first
126
-
2.**Be concise**: Brief descriptions, not full explanations
127
-
3.**Use relative paths**: For internal documentation (easier to maintain)
128
-
4.**Organize logically**: Group related topics together
129
-
5.**Mark optional content**: Use "Optional" section for nice-to-have resources
130
-
6.**Keep it current**: Link to actively maintained documentation
131
-
7.**Test URLs**: Ensure all links will be valid when deployed
114
+
Provides a marketplace of plugins that bundle coding rules, slash commands, and specialized agents. Plugins maintain single source of truth through symlinks.
132
115
133
-
Target: Under 2KB for most projects (focused navigation, not content duplication)
134
-
</optimize-for-llms>
116
+
## Documentation
135
117
136
-
<report>
137
-
Show the user:
138
-
1. Where the file will be created (with explanation of why)
139
-
2. The generated content
140
-
3. File size
141
-
4. Suggestions for what to add if content seems sparse
142
-
5. Next steps (how to verify it works, how to update it)
143
-
</report>
144
-
</workflow>
118
+
- [Getting Started](README.md): Installation and basic setup
119
+
- [Plugin Structure](docs/plugin-structure.md): How plugins are organized
120
+
- [Available Plugins](plugins/README.md): Browse the marketplace
145
121
146
-
<update-mode>
147
-
When `llms.txt` already exists:
122
+
## Development
148
123
149
-
1. Read existing file to understand current content
150
-
2. Analyze project for changes:
151
-
- New documentation files added
152
-
- Changed project structure
153
-
- Updated README or documentation
154
-
- New major features or guides
155
-
3. Suggest additions or updates with rationale
156
-
4. Show diff of proposed changes
157
-
5. Let user review before updating
124
+
- [Creating Plugins](docs/creating-plugins.md): Build your own plugins
0 commit comments