Maintain and enhance the Astro+Starlight docs site. Syncs generated pages, scores content quality, performs health checks, and proposes site improvements. Use when skills, agents, or MCP servers change. NOT for writing skills, creating agents, or building MCP servers.
Maintain, enhance, and improve the docs site at agents.w4w.dev. The site
uses Astro + Starlight + starlight-theme-black. The wagents CLI generates
MDX content pages from repository assets (skills, agents, MCP servers). This
skill wraps that CLI and extends it with AI-powered enhancement, health
checks, and site improvement capabilities.
Invoke this skill after any of these events:
skills/*/SKILL.mdagents/*.mdmcp/*/server.py or mcp/*/pyproject.tomlwagents new skill, wagents new agent, or wagents new mcpnpx skills addAuto-invocation is enabled by default (the disable-model-invocation field is absent, which defaults to false).
When invoked after asset changes, run in auto mode (default). No approval gates, no user prompts. Detect what changed, regenerate, enhance, verify.
In scope: Documentation site generation, MDX page enhancement, build verification, health checks, site configuration improvements, generation pipeline improvements, Astro component creation, CSS design system updates.
NOT for: Writing new skills (/skill-creator), creating agents (wagents new agent), building MCP servers (/mcp-creator), editing source SKILL.md or agent.md content, or managing the README (wagents readme).
| $ARGUMENTS | Mode | Description |
|------------|------|-------------|
| (empty) or auto | Auto sync + enhance | Detect changes, regenerate, enhance new/changed pages |
| sync | Full sync | Force full regeneration + build verification |
| sync installed | Sync installed | Scan ~/.claude/skills/ for new/removed/changed installed skills, regenerate docs |
| enhance | Enhance all | Improve content quality across all generated pages |
| enhance <path> | Enhance one | Improve a specific page |
| maintain | Health check | Validate links, detect stale/orphans, check build |
| improve | Improve site | Research latest Starlight features, propose + implement improvements |
| improve design | Improve design system | Audit CSS tokens, identify gaps, propose design system upgrades |
| improve ux | Improve UX | Audit component slots, propose islands and interactive features |
| improve cli | Improve pipeline | Analyze and improve docs generation modules |
| full | Full run | Sync, then Maintain, then Enhance, then Improve (sequential) |
This is the primary mode. Run it when auto-triggered or when $ARGUMENTS
is empty or auto.
Run these commands to identify changed asset files:
git diff --name-only HEAD
git status --porcelain
Filter results for asset files matching these patterns:
skills/*/SKILL.mdagents/*.mdmcp/*/server.pymcp/*/pyproject.tomlIf no asset files changed, report "No asset changes detected" and exit.
Run the CLI to regenerate all content pages:
uv run wagents docs generate
This produces MDX files under docs/src/content/docs/ for skills, agents,
and MCP servers based on their source assets.
For each new or changed page, enhance it. Read the generated MDX and its source asset side by side, then improve:
/skill-name command and argument patterns. For agents:
show how to spawn or reference them. For MCP servers: show connection config.Aside callouts for tips, warnings, and important notesSteps for sequential instructionsTabs for configuration variants (different agents, different modes)CardGrid with Card for related items or feature overviewsConsult references/quality-checklist.md for scoring criteria and
references/starlight-patterns.md for component usage patterns.
| Pages to enhance | Strategy | |-----------------|----------| | 1-3 pages | Inline — enhance sequentially in current session | | 4-12 pages | Subagent wave — 1 subagent per page, parallel | | 13+ pages | Batched waves — 5 pages per subagent, 2-3 sequential waves |
Each subagent receives: the current MDX content, the source SKILL.md or agent.md, the quality checklist, and the Starlight patterns reference.
Run the docs build to confirm nothing is broken:
cd docs && pnpm build
If the build fails, diagnose the error, fix it, and rebuild.
Run the wagents validator to confirm all assets are still valid:
uv run wagents validate
Fix any validation errors before finishing.
Force a full regeneration and build verification, regardless of what changed.
uv run wagents docs generatecd docs && pnpm buildNo enhancement in this mode. Use it to reset the generated pages to CLI baseline.
When $ARGUMENTS is sync installed:
Scan ~/.claude/skills/ for installed skills not already in the repo's
skills/ directory. The wagents docs generate command handles this
automatically via --include-installed (enabled by default).
uv run wagents docs generate (includes installed skill scanning)pnpm --dir docs build to verifyRun this mode after installing new skills via npx skills add.
When $ARGUMENTS is enhance with no path:
docs/src/content/docs/references/quality-checklist.mdcd docs && pnpm build to verifyuv run wagents validateWhen $ARGUMENTS is enhance <path>:
Run a comprehensive health check on the documentation site.
cd docs && pnpm build
Capture output. Look for broken link warnings, missing image errors, build failures.
Compare generated MDX page modification times against source asset modification times. Flag pages that are older than their source (the CLI was not re-run after the asset changed).
# Example: compare skills
for skill_dir in skills/*/; do
skill_name=$(basename "$skill_dir")
source="$skill_dir/SKILL.md"
generated="docs/src/content/docs/skills/$skill_name.mdx"
# Compare mtimes
done
Find generated pages whose source assets no longer exist. These are
orphans left behind when an asset was deleted but wagents docs generate
was not re-run.
uv run wagents validate
uv run wagents readme --check
Present findings grouped by severity:
Offer to fix each category. Apply fixes in parallel where possible.
When $ARGUMENTS is improve:
docs/astro.config.mjs — plugins, integrations, sidebar configdocs/src/styles/custom.css — theming, visual polishdocs/src/content/docs/index.mdx — landing pageWhen $ARGUMENTS is improve design:
docs/src/styles/custom.css and references/site-architecture.mdreferences/advanced-patterns.mdWhen $ARGUMENTS is improve ux:
docs/src/components/starlight/references/site-architecture.mdWhen $ARGUMENTS is improve cli:
wagents/docs.py — index pages, sidebar, CLI page, docs subcommandswagents/rendering.py — MDX page renderers (skill, agent, MCP)wagents/parsing.py — frontmatter parsing, text transforms, MDX escapingwagents/catalog.py — asset collection, node/edge data modelExecute all modes in sequence:
uv run wagents docs generate| File | Content | When to Read | |------|---------|--------------| | references/quality-checklist.md | 9-dimension page scoring rubric, enhancement patterns with before/after examples | Scoring or enhancing pages | | references/starlight-patterns.md | 10+ Starlight component patterns with import conventions and escape rules | Adding components to MDX | | references/site-architecture.md | Design system tokens, Astro component slots, plugin config, island patterns | Improve Site or Improve Design mode | | references/advanced-patterns.md | Interactive islands, marketplace UX, content collections, performance optimization | Improve Site or Improve UX mode |
Read these before enhancement work. They define the quality bar and component patterns to follow.
wagents docs generate — only enhance themuv run wagents validate after any changes to asset filescd docs && pnpm build to verify the build after changes{, <, > in prosewagents docs generate as foundation — never bypass the CLIimprove or improve cli changes without user approvalCanonical terms (use these exactly throughout):
wagents/docs.py, wagents/rendering.py, wagents/parsing.py, wagents/catalog.pySearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer