better-ccusage
CLAUDE.md91 starsChanged 16 months agoMITView on GitHub
This directory contains the VitePress-based documentation website for better-ccusage. Name: @better-ccusage/docs Description: Documentation for better-ccusage Type: VitePress documentation site (private package) Documentation Development: Documentation Structure: Screenshot Usage: Content Organization: Key Dev Dependencies: VitePress Plugins:
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
The file
We split this CLAUDE.md into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
Placement: Always place screenshots immediately after main headings (H1)
- Very specific: line 53
Image Path: Use relative paths like /screenshot.png for images in /docs/public/
- Distinctive: line 54
Alt Text: Always include descriptive alt text for accessibility
- Distinctive: line 97
Accessibility: Always include alt text for images and screenshots
- Distinctive: line 99
Consistency: Follow established patterns for new documentation pages
- Distinctive: line 102
Document Model Support: When adding guides for new AI providers/models:
- Distinctive: line 103
Document that models work automatically without configuration
- Distinctive: line 106
Update the feature comparison tables in root CLAUDE.md
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md - Documentation
This directory contains the VitePress-based documentation website for better-ccusage.
Package Overview
Name: @better-ccusage/docs
Description: Documentation for better-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 better-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 better-ccusage TypeScript source - Schema Copy:
config-schema.jsonis copied from the better-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 toolbetter-ccusage- 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<!-- eslint-skip -->before the code block - Document Model Support: When adding guides for new AI providers/models:
- Document that models work automatically without configuration
- Explain that both
"model-name"and"provider/model-name"formats are supported - List any known limitations or special pricing considerations
- Update the feature comparison tables in root CLAUDE.md
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 fileDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

