@iamdangavin/claude-skill-vitepress-docs 3.1.4 → 3.1.7

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 CHANGED
@@ -1,2 +1,130 @@
1
1
  # claude-skill-vitepress-docs
2
2
 
3
+ A [Claude Code](https://claude.ai/claude-code) skill suite for creating and maintaining VitePress documentation for any project. Covers the full docs lifecycle — from initial setup through writing, capturing screenshots and videos, keeping docs in sync with code changes, and configuring visual branding.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npx @iamdangavin/claude-skill-vitepress-docs
9
+ ```
10
+
11
+ This installs the `vitedocs:` command suite into `~/.claude/commands/vitedocs/`. Commands are then available in any Claude Code session.
12
+
13
+ ## Commands
14
+
15
+ ### `/vitedocs:init`
16
+
17
+ Entry point. Asks which mode you need and tells you which command to run next. Use this if you're not sure where to start.
18
+
19
+ ---
20
+
21
+ ### `/vitedocs:setup`
22
+
23
+ Wire up VitePress and GitHub Actions for GitHub Pages deployment.
24
+
25
+ - Scaffolds the VitePress config, package.json, and directory structure inside your chosen docs folder
26
+ - Writes a GitHub Actions workflow (`.github/workflows/deploy-docs.yml`) that builds and deploys to GitHub Pages on push
27
+ - Adds `node_modules` and `.vitepress/cache` to `.gitignore`
28
+ - Outputs the expected deploy URL and a next-steps checklist
29
+
30
+ **Next:** `/vitedocs:generate`
31
+
32
+ ---
33
+
34
+ ### `/vitedocs:generate`
35
+
36
+ Analyze the codebase and write documentation pages.
37
+
38
+ - Auto-detects the tech stack (Next.js, WordPress, Node, static, etc.) before asking any questions
39
+ - Supports user-facing guides, developer reference docs, or both
40
+ - Proposes a doc structure outline and confirms before writing anything
41
+ - Identifies 3–6 home page feature highlights drawn from the actual codebase
42
+ - Writes all pages with real content — gaps are marked with `<!-- GAP: ... -->` comments rather than stopping to ask
43
+ - Inserts image placeholders and records them in `.vitepress/docs-manifest.json` for capture later
44
+ - Suggests video captures (via `VideoDemo`) for interactive flows and screenshots for static UI states
45
+ - Installs and registers custom VitePress components: `ApiEndpoint`, `VideoDemo`, medium-zoom
46
+ - Generates API endpoint docs using the `ApiEndpoint` component when REST routes are found
47
+ - Includes color chips (inline swatches) in any table that references color values
48
+
49
+ **Next:** `/vitedocs:capture` (if placeholder images were created)
50
+
51
+ ---
52
+
53
+ ### `/vitedocs:capture`
54
+
55
+ Capture screenshots and record interaction videos for docs pages.
56
+
57
+ - Reads `.vitepress/docs-manifest.json` to find all pending captures
58
+ - Batches all screenshots into a single script (one approval covers the full set)
59
+ - Records `.webm` interaction videos using Playwright with step-by-step captions
60
+ - Generates `.vtt` caption files (committed to git) synced to video timestamps
61
+ - Shows a custom cursor overlay during video recordings for visibility
62
+ - Hides the Next.js Turbopack dev tools badge (`#devtools-indicator`) in all captures
63
+ - Supports local dev servers (Node or non-Node) and deployed URLs
64
+ - Handles auth-gated screens — credentials are used only in-session and never written to any file
65
+ - Videos are uploaded to GitHub Releases (tagged `docs-media`) to keep binary files out of git
66
+ - Rewrites surrounding prose to match what was actually captured
67
+
68
+ **Next:** `/vitedocs:sync`
69
+
70
+ ---
71
+
72
+ ### `/vitedocs:sync`
73
+
74
+ Detect code drift and update docs that are out of date.
75
+
76
+ - Hashes source files referenced in the manifest and compares against `syncHash` values from last sync
77
+ - Reports which pages have drifted and which are current
78
+ - Rewrites only the sections that changed — does not regenerate entire pages
79
+ - Flags screenshots that may need recapture after content changes
80
+ - Confirms each proposed update before writing
81
+
82
+ **Next:** `/vitedocs:capture` (if screenshots were flagged for recapture)
83
+
84
+ ---
85
+
86
+ ### `/vitedocs:brand`
87
+
88
+ Configure colors, fonts, logo, and favicon for VitePress docs.
89
+
90
+ - Derives a full VitePress brand palette (4 tokens, light + dark) from a single hex color
91
+ - Previews the derived palette as a table with inline color chips before writing anything
92
+ - Supports Google Fonts, custom CSS imports, or the VitePress default (Inter)
93
+ - Writes brand variables to `.vitepress/theme/index.css` and logo/favicon to `config.mjs`
94
+ - Can apply shared branding across all docs paths or different branding per path
95
+
96
+ **Next:** `/vitedocs:capture` or `/vitedocs:sync`
97
+
98
+ ---
99
+
100
+ ### `/vitedocs:update`
101
+
102
+ Retrofit an existing VitePress docs setup with the latest components and dependencies.
103
+
104
+ - Writes or overwrites `ApiEndpoint.vue` and `VideoDemo.vue` to the latest versions
105
+ - Merges medium-zoom setup and component registrations into `.vitepress/theme/index.js`
106
+ - Adds required z-index CSS rules to `index.css`
107
+ - Installs `medium-zoom` and `highlight.js` if not already present
108
+ - Reads existing files before editing — never rewrites unrelated config sections
109
+
110
+ **Next:** `/vitedocs:capture` or `/vitedocs:sync`
111
+
112
+ ---
113
+
114
+ ## How the commands fit together
115
+
116
+ ```
117
+ setup → generate → capture → sync (repeat as code changes)
118
+ ↘ brand (anytime)
119
+ ↘ update (when upgrading the skill)
120
+ ```
121
+
122
+ ## Manifest
123
+
124
+ All modes read and write `.vitepress/docs-manifest.json`. This file tracks page-to-source mappings, image placeholder status, sync hashes, and video metadata. It is local-only and should be added to `.gitignore`.
125
+
126
+ ## Requirements
127
+
128
+ - [Claude Code](https://claude.ai/claude-code)
129
+ - [Playwright](https://playwright.dev/) (for `/vitedocs:capture` — install with `npx playwright install`)
130
+ - A GitHub repo with GitHub Pages enabled (for deployment and video hosting)
@@ -87,21 +87,16 @@ If custom: ask as plain text — "What hex color for dark mode accent?"
87
87
 
88
88
  ### Step 4 — Preview palette
89
89
 
90
- Before writing any files, present the full derived palette as a table:
90
+ Before writing any files, present the full derived palette as a markdown table with inline color chips. Use this format exactly — the `<span>` renders in Claude's markdown output and in VitePress:
91
91
 
92
- ```
93
- Light mode
94
- --vp-c-brand-1: #E63946
95
- --vp-c-brand-2: #EB5E6A
96
- --vp-c-brand-3: #F28B93
97
- --vp-c-brand-soft: #E6394620
98
-
99
- Dark mode
100
- --vp-c-brand-1: #F05A64
101
- --vp-c-brand-2: #F47980
102
- --vp-c-brand-3: #F7A0A5
103
- --vp-c-brand-soft: #F05A6420
104
- ```
92
+ | Token | &nbsp; | Light | &nbsp; | Dark |
93
+ |---|---|---|---|---|
94
+ | `--vp-c-brand-1` | <span style="display:inline-block;width:14px;height:14px;background:#E63946;border-radius:2px;vertical-align:middle;border:1px solid rgba(0,0,0,.12)"></span> | `#E63946` | <span style="display:inline-block;width:14px;height:14px;background:#F05A64;border-radius:2px;vertical-align:middle;border:1px solid rgba(0,0,0,.12)"></span> | `#F05A64` |
95
+ | `--vp-c-brand-2` | <span style="display:inline-block;width:14px;height:14px;background:#EB5E6A;border-radius:2px;vertical-align:middle;border:1px solid rgba(0,0,0,.12)"></span> | `#EB5E6A` | <span style="display:inline-block;width:14px;height:14px;background:#F47980;border-radius:2px;vertical-align:middle;border:1px solid rgba(0,0,0,.12)"></span> | `#F47980` |
96
+ | `--vp-c-brand-3` | <span style="display:inline-block;width:14px;height:14px;background:#F28B93;border-radius:2px;vertical-align:middle;border:1px solid rgba(0,0,0,.12)"></span> | `#F28B93` | <span style="display:inline-block;width:14px;height:14px;background:#F7A0A5;border-radius:2px;vertical-align:middle;border:1px solid rgba(0,0,0,.12)"></span> | `#F7A0A5` |
97
+ | `--vp-c-brand-soft` | <span style="display:inline-block;width:14px;height:14px;background:#E6394620;border-radius:2px;vertical-align:middle;border:1px solid rgba(0,0,0,.12)"></span> | `#E6394620` | <span style="display:inline-block;width:14px;height:14px;background:#F05A6420;border-radius:2px;vertical-align:middle;border:1px solid rgba(0,0,0,.12)"></span> | `#F05A6420` |
98
+
99
+ Substitute real derived hex values in place of the examples above.
105
100
 
106
101
  Then ask:
107
102
 
@@ -155,4 +150,6 @@ Files updated:
155
150
  PATH/.vitepress/config.mjs — logo, favicon
156
151
 
157
152
  Run the local dev server to preview: npm run dev
153
+
154
+ Next: run /vitedocs:capture if you have pending screenshots or videos, or /vitedocs:sync to check for code drift.
158
155
  ```
@@ -406,6 +406,16 @@ Populate `name`, `text`, `tagline`, and the `link` in `actions` from what you kn
406
406
  Use a screenshot (not video) for: static UI states, settings screens, empty states, error messages.
407
407
  Use a video for: multi-step flows, button interactions, animations, form submissions, drag-and-drop.
408
408
 
409
+ **Color chips in tables:** Whenever a doc page contains a table with color values (hex codes, `rgb()`, `hsl()`, or CSS custom properties that resolve to a color), include an inline color chip in the same table cell. Use a `<span>` with an inline style — VitePress renders HTML inside markdown tables:
410
+
411
+ ```md
412
+ | Token | | Value |
413
+ |---|---|---|
414
+ | `--brand-primary` | <span style="display:inline-block;width:14px;height:14px;background:#E63946;border-radius:2px;vertical-align:middle;border:1px solid rgba(0,0,0,.12)"></span> | `#E63946` |
415
+ ```
416
+
417
+ Apply this to any color reference you encounter in the source — CSS variables, Tailwind config values, design token files, theme files, etc. If the value is a CSS variable (e.g. `var(--some-color)`) and you can resolve its hex from the source, use the resolved hex for the chip. If you can't resolve it, omit the chip for that row.
418
+
409
419
  Do not stop to ask gap questions mid-page. Keep writing and accumulate all gaps.
410
420
 
411
421
  ### Step 5 — Gap review
@@ -274,4 +274,8 @@ docs.yourdomain.com
274
274
 
275
275
  ### Step 4 — Summary
276
276
 
277
- List files written and give the user a next-steps checklist with the expected deploy URL.
277
+ List files written and give the user a next-steps checklist with the expected deploy URL. End with:
278
+
279
+ ```
280
+ Next: run /vitedocs:generate to analyze the codebase and write documentation pages.
281
+ ```
@@ -93,5 +93,5 @@ Update `lastSynced` and `syncHash` for all updated pages. Update the top-level `
93
93
  ```
94
94
  Updated X of N drifted pages.
95
95
  X gap comments added for manual review.
96
- Y screenshots flagged for recapture — run /vitedocs:screenshot when ready.
96
+ Y screenshots flagged for recapture — run /vitedocs:capture when ready.
97
97
  ```
@@ -134,6 +134,8 @@ Changes applied:
134
134
  PATH/.vitepress/theme/index.js — merged medium-zoom + ApiEndpoint
135
135
  PATH/.vitepress/theme/index.css — added z-index rules
136
136
  PATH/package.json — installed medium-zoom, highlight.js
137
+
138
+ Next: run /vitedocs:capture to refresh screenshots, or /vitedocs:sync to check for code drift.
137
139
  ```
138
140
 
139
141
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamdangavin/claude-skill-vitepress-docs",
3
- "version": "3.1.4",
3
+ "version": "3.1.7",
4
4
  "description": "Installs the vitedocs: Claude Code skill suite — VitePress docs setup, generate, screenshot, sync, brand, and update.",
5
5
  "type": "module",
6
6
  "bin": {