write-docs
Create or update documentation pages for the Abacus docs site. Use when adding new documentation, updating existing pages, or ensuring docs stay in sync with code changes. Ensures pages follow Starlight patterns and build correctly.
When & Why to Use This Skill
This Claude skill automates the creation, updating, and maintenance of technical documentation for the Abacus site. Built specifically for Astro Starlight environments, it streamlines the documentation lifecycle by ensuring code-doc synchronization, enforcing consistent frontmatter patterns, and performing build verifications to eliminate broken links and formatting errors, significantly improving developer productivity and documentation quality.
Use Cases
- Code-Doc Synchronization: Automatically update existing documentation pages when code changes occur to ensure technical accuracy and prevent outdated information.
- New Feature Documentation: Rapidly generate new .mdx pages with standardized Starlight frontmatter, correct sidebar ordering, and necessary component imports for new product features.
- Build Validation & QA: Use integrated bash tools to run build checks, identifying broken internal links or missing base paths (/abacus/) before committing changes.
- Style Guide Standardization: Refactor legacy documentation to adhere to specific style guidelines, such as using the imperative mood, adding language tags to code blocks, and optimizing content for skimmability.
| name | write-docs |
|---|---|
| description | Create or update documentation pages for the Abacus docs site. Use when adding new documentation, updating existing pages, or ensuring docs stay in sync with code changes. Ensures pages follow Starlight patterns and build correctly. |
| allowed-tools | Read, Grep, Glob, Edit, Write, Bash |
Write Docs Skill
Create and maintain documentation for the Abacus docs site (Astro Starlight).
Before Starting
- Read existing pages in
docs/src/content/docs/to understand patterns - Check
docs/astro.config.mjsfor sidebar structure - Understand the section you're adding to (getting-started, providers, cli, deployment, development)
Workflow
Adding a New Page
- Create
.mdxfile in the appropriate directory - Add required frontmatter (see below)
- Use existing pages as reference for component usage
- Run
cd docs && pnpm buildto verify
Updating an Existing Page
- Read the current page first
- Make changes, preserving existing patterns
- Run
cd docs && pnpm buildto verify
Frontmatter
Every page requires:
---
title: Page Title
description: One-line description for SEO
sidebar:
order: 1 # Position within section
---
Key Rules
Links Must Include Base Path
Internal links need /abacus/ prefix (GitHub Pages requirement):
[Quick Start](/abacus/getting-started/quick-start/) ✓
[Quick Start](/getting-started/quick-start/) ✗
Import Components Before Use
import { Steps, Aside } from '@astrojs/starlight/components';
<Steps>
1. First step
2. Second step
</Steps>
<Aside type="tip">Helpful note</Aside>
Code Blocks Need Language Tags
```bash
pnpm cli sync
## Build Verification
**Always verify before committing:**
```bash
cd docs && pnpm build
Common errors:
- Missing imports
- Invalid frontmatter
- Broken links (wrong path or missing
/abacus/)
Style Guidelines
- Imperative mood ("Run this" not "You should run")
- Code examples over abstract descriptions
- Keep paragraphs short - users skim
- Tables for reference data (env vars, options)