@iamdangavin/claude-skill-vitepress-docs 1.1.0 → 1.5.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 +1 -69
- package/package.json +5 -2
- package/skill/SKILL.md +29 -2
package/README.md
CHANGED
|
@@ -1,70 +1,2 @@
|
|
|
1
|
-
#
|
|
1
|
+
# claude-skill-vitepress-docs
|
|
2
2
|
|
|
3
|
-
A [Claude Code](https://claude.ai/code) skill that handles the full VitePress documentation lifecycle — setup, generation, screenshots, and sync.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npx @iamdangavin/claude-skill-vitepress-docs
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Installs the skill to `~/.claude/skills/vitepress-docs/`. Invoke it inside Claude Code with:
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
/vitepress-docs
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Modes
|
|
18
|
-
|
|
19
|
-
### `setup`
|
|
20
|
-
Wires up VitePress and GitHub Actions for GitHub Pages deployment. Handles custom domains and subdomains, PostCSS conflicts from parent projects (e.g. Next.js or Laravel roots), and generates the workflow file at the correct git root.
|
|
21
|
-
|
|
22
|
-
### `generate`
|
|
23
|
-
Analyzes a codebase and writes full documentation — user-facing guides, developer reference, or both. Proposes a doc structure for approval before writing, accumulates gaps for batch review, and generates placeholder screenshots for later capture.
|
|
24
|
-
|
|
25
|
-
### `screenshot`
|
|
26
|
-
Captures real browser screenshots via Playwright and replaces all placeholders. Supports auth-gated screens using in-session credentials (never written to disk). Rewrites surrounding doc prose to match each captured image.
|
|
27
|
-
|
|
28
|
-
### `sync`
|
|
29
|
-
Detects doc drift since the last sync via git diff or full re-analysis. Reports affected pages before making changes, updates only what drifted, and flags screenshots that may need recapture.
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Features
|
|
34
|
-
|
|
35
|
-
### Stack detection
|
|
36
|
-
Auto-detects WordPress, Next.js, Node, and static sites before asking any questions. Confirms the finding with the user and accepts corrections.
|
|
37
|
-
|
|
38
|
-
### WordPress support
|
|
39
|
-
- Identifies project type: traditional theme, block theme, headless WP, plugin, or full site
|
|
40
|
-
- Asks about page builder (Gutenberg, Elementor, Divi, ACF Blocks)
|
|
41
|
-
- Auto-suggests the active theme or plugin from scanning `wp-content/`
|
|
42
|
-
- Handles being invoked from the WP install root — correctly scopes everything to the theme or plugin folder
|
|
43
|
-
- Accepts multiple focus paths (e.g. a theme + a plugin that work together)
|
|
44
|
-
|
|
45
|
-
### Multi-path and token scope
|
|
46
|
-
- **Single path:** analysis strictly isolated to that directory — WP core, other themes, and other plugins are never read
|
|
47
|
-
- **Multiple paths:** cross-reading allowed only between declared paths; nothing outside the declared set is touched
|
|
48
|
-
- Each path must be its own git repository — the skill halts with a clear message if `.git` is missing from any path
|
|
49
|
-
|
|
50
|
-
### Git root awareness
|
|
51
|
-
Detects `.git` at the exact focus path rather than walking up to parent folders. Correctly handles the common pattern where the git repo lives inside a theme or plugin subfolder of a larger WP install. The GitHub Actions workflow is always placed at the correct git root, even when docs live deeper inside it.
|
|
52
|
-
|
|
53
|
-
### Manifest
|
|
54
|
-
Tracks every doc page alongside its source file mappings, screenshot placeholder status, and a sync hash. Local-only (`.gitignore`d) — each environment generates its own. Used by `screenshot` and `sync` modes to know precisely what needs updating.
|
|
55
|
-
|
|
56
|
-
### Deployment
|
|
57
|
-
- Generates a GitHub Actions workflow scoped to the correct git root per path
|
|
58
|
-
- Supports push-to-branch, tag-based (`v*`), and manual-only triggers
|
|
59
|
-
- Uses `actions/upload-pages-artifact` + `actions/deploy-pages`
|
|
60
|
-
- Always includes `workflow_dispatch` for manual deploys
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## Updating
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
npx @iamdangavin/claude-skill-vitepress-docs
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Re-running the install command always pulls the latest version.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iamdangavin/claude-skill-vitepress-docs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Installs the vitepress:docs Claude Code skill — VitePress docs setup, generation, screenshots, and sync.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,5 +17,8 @@
|
|
|
17
17
|
"vitepress",
|
|
18
18
|
"docs"
|
|
19
19
|
],
|
|
20
|
-
"license": "MIT"
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
}
|
|
21
24
|
}
|
package/skill/SKILL.md
CHANGED
|
@@ -76,6 +76,8 @@ Add this line if not already present:
|
|
|
76
76
|
|
|
77
77
|
Use AskUserQuestion for each choice below. For freeform text inputs (repo URL, domain name, docs path) ask as plain text immediately after the relevant choice is made.
|
|
78
78
|
|
|
79
|
+
**Multiple focus paths:** if more than one path was established in Step 0, ask Q2 through Q6 once per path — fully completing all questions for the first path before starting the second. Never present questions for two paths at the same time.
|
|
80
|
+
|
|
79
81
|
**Q1 — VitePress status:**
|
|
80
82
|
- header: "VitePress"
|
|
81
83
|
- question: "Is VitePress already installed in this project?"
|
|
@@ -83,7 +85,14 @@ Use AskUserQuestion for each choice below. For freeform text inputs (repo URL, d
|
|
|
83
85
|
- "Already installed"
|
|
84
86
|
- "Starting from scratch"
|
|
85
87
|
|
|
86
|
-
**Q2 — Docs folder
|
|
88
|
+
**Q2 — Docs folder:**
|
|
89
|
+
- header: "Docs location"
|
|
90
|
+
- question: "Where should the docs folder be created? I found your repo at `[GIT_ROOT_PATH]`."
|
|
91
|
+
- options:
|
|
92
|
+
- "Here → `[GIT_ROOT_PATH]/docs/`"
|
|
93
|
+
- "Somewhere else — I'll type the path"
|
|
94
|
+
|
|
95
|
+
If "Somewhere else": ask as plain text — "What path should I use? (Full path or relative to `[GIT_ROOT_PATH]`)"
|
|
87
96
|
|
|
88
97
|
**Q3 — GitHub repo** (plain text): Ask — "What is the GitHub repo? (full URL or `owner/repo`)"
|
|
89
98
|
|
|
@@ -385,7 +394,25 @@ This matters because the GitHub Actions workflow file must go in `.github/workfl
|
|
|
385
394
|
|
|
386
395
|
**Q3 — Codebase root** (plain text): Ask — "Where is the codebase root? (Press enter to use the current directory.)" — **Skip for WordPress; already established by WP-Q6.**
|
|
387
396
|
|
|
388
|
-
**Q4 — Docs output
|
|
397
|
+
**Q4 — Docs output:** Before asking, check whether `setup` has already been run by looking for `.vitepress/config.mjs` anywhere inside the focus path:
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
find FOCUS_PATH -name "config.mjs" -path "*/.vitepress/*" 2>/dev/null
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**If found:** docs location is already established — skip this question, infer the docs folder from the found path, and tell the user: "I found an existing VitePress config at `[PATH]` — using that as the docs folder."
|
|
404
|
+
|
|
405
|
+
**If not found:** ask:
|
|
406
|
+
|
|
407
|
+
- header: "Docs location"
|
|
408
|
+
- question: "Where should the docs folder be created? I found your repo at `[GIT_ROOT_PATH]`."
|
|
409
|
+
- options:
|
|
410
|
+
- "Here → `[GIT_ROOT_PATH]/docs/`"
|
|
411
|
+
- "Somewhere else — I'll type the path"
|
|
412
|
+
|
|
413
|
+
If "Somewhere else": ask as plain text — "What path should I use? (Full path or relative to `[GIT_ROOT_PATH]`)"
|
|
414
|
+
|
|
415
|
+
Always show the full resolved path — never use abstract terms like "project root."
|
|
389
416
|
|
|
390
417
|
**Q5 — Skip anything:**
|
|
391
418
|
- header: "Exclusions"
|