All skills
Skillintermediate
CLAUDE.md - Documentation
This directory contains the VitePress-based documentation website for ccusage.
Claude Code Knowledge Pack7/10/2026
Overview
CLAUDE.md - Documentation
This directory contains the VitePress-based documentation website for ccusage.
Package Overview
Name: @ccusage/docs
Description: Documentation for ccusage
Type: VitePress documentation site (private package)
Development Commands
Documentation Development:
pnpm run dev- Start development server with API docs generation and schema copypnpm run build- Build documentation site for productionpnpm run preview- Preview built documentation locallypnpm run docs:api- Generate API documentation from TypeScript sourcepnpm run lint- Lint documentation files using ESLintpnpm run format- Format and auto-fix documentation files with ESLintpnpm typecheck- Type check TypeScript files
Deployment:
pnpm run deploy- Deploy to Cloudflare using Wrangler
Architecture
Documentation Structure:
guide/- User guides and tutorials with screenshotsapi/- Auto-generated API documentation from TypeScript sourcepublic/- Static assets including screenshots and config schema.vitepress/- VitePress configuration and theme customization
Key Files:
update-api-index.ts- Script to generate API documentation indextypedoc.config.mjs- TypeDoc configuration for API docs generationpublic/config-schema.json- JSON schema copied from ccusage package during build
Documentation Guidelines
Screenshot Usage:
- Placement: Always place screenshots immediately after main headings (H1)
- Purpose: Provide immediate visual context before textual explanations
- Guides with Screenshots:
/docs/guide/index.md- Main usage screenshot/docs/guide/daily-reports.md- Daily report output screenshot/docs/guide/live-monitoring.md- Live monitoring dashboard screenshot/docs/guide/mcp-server.md- Claude Desktop integration screenshot
- Image Path: Use relative paths like
/screenshot.pngfor images in/docs/public/ - Alt Text: Always include descriptive alt text for accessibility
Content Organization:
- User-facing guides in
guide/directory - Auto-generated API reference in
api/directory - Static assets and schemas in
public/directory
Build Process
- API Documentation:
./update-api-index.tsgenerates API docs from ccusage TypeScript source - Schema Copy:
config-schema.jsonis copied from the ccusage package to public directory - VitePress Build: Standard VitePress build process creates static site
- Deployment: Built site is deployed to Cloudflare using Wrangler
Dependencies
Key Dev Dependencies:
vitepress- Static site generatortypedoc- API documentation generationtypedoc-plugin-markdown- Markdown output for TypeDoctypedoc-vitepress-theme- VitePress theme for TypeDocwrangler- Cloudflare deployment toolccusage- Main package (workspace dependency for API docs)
VitePress Plugins:
vitepress-plugin-group-icons- Group icons in navigationvitepress-plugin-llms- LLM-specific enhancements@ryoppippi/vite-plugin-cloudflare-redirect- Cloudflare redirect handling
Development Workflow
- Start Development:
pnpm run devautomatically generates API docs and starts dev server - Edit Content: Modify markdown files in
guide/or update source code for API changes - Preview Changes: Development server automatically reloads on changes
- Build for Production:
pnpm run buildgenerates final static site - Deploy:
pnpm run deploypushes to Cloudflare
Content Guidelines
- No console.log: Documentation scripts should use appropriate logging
- Accessibility: Always include alt text for images and screenshots
- Visual First: Lead with screenshots, then explain with text
- Consistency: Follow established patterns for new documentation pages
- Cross-References: Link between related guides and API documentation
- ESLint in Markdown: For code blocks that should skip ESLint parsing (e.g., containing
...syntax), add `` before the code block
File Organization
docs/
├── guide/ # User guides and tutorials
├── api/ # Auto-generated API docs
├── public/ # Static assets (screenshots, schemas)
├── .vitepress/ # VitePress configuration
├── package.json # Dependencies and scripts
└── CLAUDE.md # This file