nuxt-agent-md 0.0.1-alpha.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +7255 -0
- package/dist/detect.d.ts +2 -0
- package/dist/download.d.ts +1 -0
- package/dist/generate.d.ts +2 -0
- package/dist/index.d.ts +7 -0
- package/dist/inject.d.ts +2 -0
- package/dist/types.d.ts +18 -0
- package/package.json +42 -4
- package/index.js +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# nuxt-agent-md
|
|
2
|
+
|
|
3
|
+
Generate `AGENTS.md` with Nuxt documentation for AI coding agents.
|
|
4
|
+
|
|
5
|
+
Inspired by [Vercel's blog post](https://vercel.com/blog/agents-md-outperforms-skills-in-our-agent-evals) showing that `AGENTS.md` with a documentation index achieves 100% success rate on agent evaluations.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Run directly with bunx
|
|
11
|
+
bunx nuxt-agent-md
|
|
12
|
+
|
|
13
|
+
# Or install globally
|
|
14
|
+
bun add -g nuxt-agent-md
|
|
15
|
+
nuxt-agent-md
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## What it does
|
|
19
|
+
|
|
20
|
+
1. Detects your Nuxt version from `package.json`
|
|
21
|
+
2. Downloads the corresponding `@nuxt/docs` documentation
|
|
22
|
+
3. Generates a minified index of all documentation files
|
|
23
|
+
4. Creates/updates `AGENTS.md` with the index and key Nuxt patterns
|
|
24
|
+
|
|
25
|
+
## Options
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
-d, --docs-dir <path> Directory to store docs (default: .nuxt-docs)
|
|
29
|
+
-o, --output <path> Output AGENTS.md path (default: AGENTS.md)
|
|
30
|
+
-v, --nuxt-version <ver> Nuxt docs version (auto-detected from package.json)
|
|
31
|
+
--minify Generate minified index (default: true)
|
|
32
|
+
--no-minify Generate full index instead of minified
|
|
33
|
+
--dry-run Show what would be done without making changes
|
|
34
|
+
-h, --help Show this help message
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Auto-detect Nuxt version from package.json
|
|
41
|
+
nuxt-agent-md
|
|
42
|
+
|
|
43
|
+
# Use specific Nuxt version
|
|
44
|
+
nuxt-agent-md -v 4.0.0
|
|
45
|
+
|
|
46
|
+
# Generate full (non-minified) index
|
|
47
|
+
nuxt-agent-md --no-minify
|
|
48
|
+
|
|
49
|
+
# Custom output paths
|
|
50
|
+
nuxt-agent-md -d .docs -o CLAUDE.md
|
|
51
|
+
|
|
52
|
+
# Preview changes without writing
|
|
53
|
+
nuxt-agent-md --dry-run
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Output
|
|
57
|
+
|
|
58
|
+
The tool generates:
|
|
59
|
+
|
|
60
|
+
1. `.nuxt-docs/` - Directory containing raw markdown documentation
|
|
61
|
+
2. `AGENTS.md` - File with minified index pointing to the docs
|
|
62
|
+
|
|
63
|
+
The index format is pipe-delimited for minimal token usage:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
CATEGORY|path/to/file.md|keyword1,keyword2,keyword3
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Why this approach?
|
|
70
|
+
|
|
71
|
+
From Vercel's research:
|
|
72
|
+
|
|
73
|
+
| Approach | Success Rate |
|
|
74
|
+
|----------|--------------|
|
|
75
|
+
| Baseline (no docs) | 53% |
|
|
76
|
+
| Skills | 53% |
|
|
77
|
+
| Skills with explicit instructions | 79% |
|
|
78
|
+
| **AGENTS.md with docs index** | **100%** |
|
|
79
|
+
|
|
80
|
+
The key insight: providing a compressed index in `AGENTS.md` that points to detailed documentation files gives agents immediate access to accurate API information without decision overhead.
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
MIT
|
package/dist/cli.d.ts
ADDED