From github-pages-astro
Author and maintain Astro + Starlight documentation sites using .docs-config.json for repo-specific configuration
How this skill is triggered — by the user, by Claude, or both
Slash command
/github-pages-astro:docs-siteThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Maintain documentation sites built with Astro and Starlight, deployed to GitHub Pages. This skill is generic — it reads `.docs-config.json` in the project root for all repo-specific details.
Maintain documentation sites built with Astro and Starlight, deployed to GitHub Pages. This skill is generic — it reads .docs-config.json in the project root for all repo-specific details.
Always read .docs-config.json first. This file lives at CLAUDE_PROJECT_DIR/.docs-config.json and contains:
site.directory — path to the Astro site root (e.g., site, docs)site.baseUrl — base path for deployed site (e.g., /my-project/)site.siteUrl — root URL of deployment target (e.g., https://user.github.io)site.contentDir — content directory relative to site root (typically src/content/docs)sections — sidebar sections with slug, label, and purposesourceMappings — maps source files/globs to doc pages they informterminology — canonical terms and their synonymsagentDocs — agent documentation configurationIf .docs-config.json does not exist, suggest running /docs-init to generate it before proceeding with any documentation work.
<site.directory>/<site.contentDir>/ (read from .docs-config.json).src/content.config.ts using the standard Starlight docsLoader.starlight-llms-txt plugin generates llms.txt, llms-full.txt, and llms-small.txt at build time from existing content pages.Card, CardGrid, LinkCard, Tabs, TabItem.bun install && bunx astro build from the site directory.bunx astro dev from the site directory..docs-config.json{
"site": {
"directory": "<path>",
"baseUrl": "/<project>/",
"siteUrl": "https://user.github.io",
"contentDir": "src/content/docs"
},
"sections": [
{ "slug": "getting-started", "label": "Getting Started", "purpose": "..." }
],
"sourceMappings": [
{ "source": "README.md", "docs": ["getting-started/overview"] }
],
"terminology": { "ticket": ["card", "item", "task"] },
"agentDocs": {
"quickReferencePage": "reference/agent-quick-reference",
"llmsSmallExcludes": ["reference/design-docs"]
}
}
sections — defines what sidebar sections exist and what content belongs in each.sourceMappings — declares which source files inform which doc pages. When editing a doc page, check the source files it maps to for accuracy. When a source file changes, the corresponding doc pages may need updating.terminology — canonical terms and synonyms. Always use the canonical term (the key) rather than any synonym (the values).agentDocs.quickReferencePage — slug for the AI Agent Quick Reference page.agentDocs.llmsSmallExcludes — section prefixes excluded from llms-small.txt.Pages are .md or .mdx files under the content directory.
Required frontmatter:
---
title: Page Title
description: One-line description for SEO and search
---
Optional Starlight frontmatter:
| Field | Type | Description |
|---|---|---|
sidebar.order | number | Position within sidebar group |
sidebar.badge | string/object | Badge displayed next to sidebar entry |
tableOfContents | boolean/object | Control table of contents display |
template | string | splash for landing pages; doc (default) for all others |
Landing pages use template: splash. All other pages use the default doc template.
Internal links must include the base URL prefix from .docs-config.json. For a page at getting-started/overview with base URL /my-project/:
[See the overview](/my-project/getting-started/overview)
Do not add trailing slashes in source-level links — Astro handles this.
The sidebar is defined manually in astro.config.mjs — it is not autogenerated from directory structure.
Every new content page MUST have a corresponding entry in the sidebar config. Orphaned pages (in the content directory but not in the sidebar) are not discoverable by readers.
Sidebar structure mirrors the section slugs defined in .docs-config.json. Sidebar entries use slug (not link) pointing to the content path without file extension:
sidebar: [
{
label: 'Getting Started',
items: [
{ label: 'Overview', slug: 'getting-started/overview' },
],
},
],
Read section purposes from the sections array in .docs-config.json. Each section has:
slug — directory name under the content directorylabel — human-readable name for the sidebarpurpose — description of what content belongs in this sectionWhen creating new pages, match the page's content to the appropriate section's purpose. If no section fits, discuss with the user before creating a new section.
The sourceMappings array in .docs-config.json connects source files to their documentation pages:
{
"source": "src/lib/**/*.ts",
"docs": ["reference/api"]
}
source — a file path or glob pattern relative to the project rootdocs — doc page slugs that should reflect this source's contentWhen a source file changes, check if corresponding doc pages need updating. When editing a doc page, consult the source files it maps to for accuracy.
All JavaScript/TypeScript tooling uses Bun exclusively. No npm, no npx, no Node-specific tooling.
| Concern | Command |
|---|---|
| Install dependencies | bun install |
| Dev server | bunx astro dev |
| Build site | bunx astro build |
| Run scripts | bun run <script.ts> |
| Run tests | bun test |
npx claudepluginhub kormie/dot-skillsAstro Starlight documentation theme — setup, sidebar config, Pagefind search, dark/light mode, plugins (DocSearch, blog, openapi, typedoc, versions), multi-language, Content Layer API, llms.txt, customization. Use for building documentation sites.
Guides building and maintaining Cyfrin Next.js documentation sites using MDX and Tailwind CSS, covering structure, required components like PrevNextNav, PageActions, edit buttons, and link checking.