← Back to Skills Marketplace
encryptshawn

Astro Starlight

by EncryptShawn · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
114
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install astro-starlight
Description
Use this skill whenever the user wants to create, configure, customize, or troubleshoot an Astro Starlight documentation site. Triggers include any mention o...
README (SKILL.md)

Astro Starlight Skill

Build production-grade documentation sites with Astro Starlight. This skill covers everything from initial scaffolding to advanced customization and deployment.

When to use this skill

  • Creating a new documentation site from scratch
  • Adding Starlight to an existing Astro project
  • Configuring sidebar navigation (manual, autogenerated, or mixed)
  • Styling/theming a Starlight site (custom CSS, Tailwind, dark mode)
  • Using MDX components inside docs (Tabs, Cards, Asides, Code, etc.)
  • Deploying to subpaths (/docs/), Vercel, Netlify, Cloudflare Pages
  • Setting up search (Pagefind, Algolia)
  • Internationalization (i18n)
  • Overriding built-in components
  • Troubleshooting common issues (404s, broken links, sidebar mismatches)

Quick orientation

Before writing any code, read the relevant reference file(s) from references/:

Task Read first
New project or project structure references/project-setup.md
Sidebar, navigation, frontmatter references/sidebar-and-content.md
Styling, theming, Tailwind references/styling-and-theming.md
MDX components, custom components references/components.md
Deployment, subpaths, search, i18n references/deployment-and-advanced.md
Something broken? references/troubleshooting.md

For most tasks, read project-setup.md first, then the topic-specific file.

Core workflow

1. Scaffold the project

npm create astro@latest -- --template starlight

This gives you a working project with:

my-docs/
├── astro.config.mjs        # Starlight integration config
├── src/
│   ├── content/
│   │   └── docs/            # All doc pages live here
│   │       └── index.mdx
│   └── content.config.ts    # Content collection schema
├── public/                  # Static assets (favicon, images)
└── package.json

2. Design folder structure FIRST

This is the most important step. Your folder structure = your URL structure = your sidebar structure. Plan it before writing content. See references/sidebar-and-content.md for patterns.

3. Configure astro.config.mjs

The Starlight integration is configured here. Minimum viable config:

import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

export default defineConfig({
  integrations: [
    starlight({
      title: 'My Docs',
      sidebar: [
        {
          label: 'Guides',
          autogenerate: { directory: 'guides' },
        },
      ],
    }),
  ],
});

4. Write content in src/content/docs/

Every .md or .mdx file needs frontmatter with at least title:

---
title: Getting Started
description: How to get started with our product.
sidebar:
  order: 1
---

5. Build and deploy

npm run build    # Outputs to dist/
npm run preview  # Preview the build locally

Key principles

  1. Design folder structure before writing content. Restructuring later means broken links and sidebar chaos.
  2. Keep sidebar config explicit rather than fully auto-generated — you'll want control over ordering and grouping.
  3. Use .mdx only when you need component imports. Plain .md is simpler and avoids hydration issues.
  4. Test deployment early, especially if hosting at a subpath. Don't wait until the end.
  5. Keep CSS overrides minimal. Work with Starlight's design tokens (CSS custom properties) rather than fighting its defaults.
  6. Use frontmatter sidebar.order to control page ordering within autogenerated groups.

Important gotchas (read these)

  • Subpath deployment is the #1 source of bugs. If deploying to /docs/, you must set both site and base in astro.config.mjs. See references/deployment-and-advanced.md.
  • MDX imports only work in .mdx files, not .md. If you get import errors, check your file extension.
  • Sidebar config and filesystem must agree. A page that exists on disk but isn't in the sidebar config (or vice versa) causes confusing 404s or missing nav items.
  • Tailwind + Starlight requires the @astrojs/starlight-tailwind compatibility package. Without it, styles will fight each other.
  • Pagefind search breaks on subpaths if base isn't configured correctly.
  • Custom components need client:load (or another client directive) if they use JavaScript/interactivity. Without it, they render as static HTML only.

Reference files

Read these for detailed guidance. Each is self-contained and covers one topic area thoroughly:

  • references/project-setup.md — Scaffolding, project structure, astro.config.mjs anatomy, content collections
  • references/sidebar-and-content.md — Sidebar config patterns, frontmatter reference, content authoring, ordering
  • references/styling-and-theming.md — Custom CSS, Tailwind integration, theming, dark mode, Expressive Code
  • references/components.md — Built-in components (Tabs, Cards, Asides, etc.), custom components in MDX, hydration
  • references/deployment-and-advanced.md — Deployment targets, subpath hosting, search, i18n, versioning, auth, SSR
  • references/troubleshooting.md — Diagnosis and fixes for the most common Starlight issues

Useful links

Usage Guidance
This skill is coherent and appears to be a straightforward authoring/deployment guide for Astro Starlight. Before using it, review any example config you copy into your project: remove or replace example analytics scripts or external bundle URLs (Algolia/Pagefind mergeIndex) with services you trust, and do not paste credentials or tokens into the config unless you intend to enable those integrations. Test subpath/base settings locally (npm run preview) before deploying, and verify that any third‑party integrations you enable have the appropriate access controls. If you want additional assurance, request a code-based skill (with an install spec) rather than an instruction-only skill so you can review execution behavior more concretely.
Capability Analysis
Type: OpenClaw Skill Name: astro-starlight Version: 1.0.0 The astro-starlight skill bundle is a comprehensive and legitimate toolset for assisting users in building documentation sites with Astro Starlight. The files, including SKILL.md and various reference guides (e.g., project-setup.md, deployment-and-advanced.md), provide accurate technical instructions and standard development commands (such as 'npm create astro@latest') consistent with the framework's official documentation. No evidence of malicious intent, data exfiltration, or harmful prompt injection was found.
Capability Assessment
Purpose & Capability
The name/description (Astro Starlight docs site scaffolding, configuration, theming, deployment, troubleshooting) align with the actual content: an instruction-only skill with reference files. It requests no binaries, env vars, installs, or config paths beyond what's needed for authoring and deploying a static docs site.
Instruction Scope
Runtime instructions are limited to reading the included reference files and running normal project commands (npm create, npm install, npm run build/dev, npx astro add, etc.). The docs contain examples that reference external services (analytics script in head, Algolia, Pagefind mergeIndex with an external bundlePath) — these are expected for a docs site but are points where site configuration could cause data to be sent to third parties if the user copies them verbatim.
Install Mechanism
There is no install spec and no code files that would be downloaded or executed. The skill is instruction-only; commands shown are standard project scaffolding/deploy commands and no arbitrary download URLs or extract steps are present.
Credentials
The skill declares no required environment variables or credentials. Example configuration in the references mentions platform integrations and edit links/analytics (which in a real site could require tokens), but the skill itself does not request any secrets or unrelated credentials.
Persistence & Privilege
always:false and agent autonomous invocation is default. The skill does not request persistent system modifications or cross-skill configuration changes. There is no evidence it would enable persistent background activity beyond normal user-run build/deploy steps.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install astro-starlight
  3. After installation, invoke the skill by name or use /astro-starlight
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of the astro-starlight skill. - Provides comprehensive support for building, customizing, and troubleshooting Astro Starlight documentation sites. - Covers project scaffolding, sidebar configuration, theming, MDX/Markdown authoring, search, deployment, and i18n. - Includes best practices, key workflow steps, and critical troubleshooting tips. - Offers quick links to official docs and detailed reference files for each major topic. - Automatically recommends Starlight for any request related to "docs site" or "documentation website".
Metadata
Slug astro-starlight
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Astro Starlight?

Use this skill whenever the user wants to create, configure, customize, or troubleshoot an Astro Starlight documentation site. Triggers include any mention o... It is an AI Agent Skill for Claude Code / OpenClaw, with 114 downloads so far.

How do I install Astro Starlight?

Run "/install astro-starlight" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Astro Starlight free?

Yes, Astro Starlight is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Astro Starlight support?

Astro Starlight is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Astro Starlight?

It is built and maintained by EncryptShawn (@encryptshawn); the current version is v1.0.0.

💬 Comments