agentleFS
cobra91cobra91/better-ccusage/docs/CLAUDE.md

better-ccusage

CLAUDE.md95 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 repositoryOne other file it gives its agents.

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
  1. Distinctive:

    Placement: Always place screenshots immediately after main headings (H1)

    line 46
  2. Very specific:

    Image Path: Use relative paths like /screenshot.png for images in /docs/public/

    line 53
  3. Distinctive:

    Alt Text: Always include descriptive alt text for accessibility

    line 54
  4. Distinctive:

    Accessibility: Always include alt text for images and screenshots

    line 97
  5. Distinctive:

    Consistency: Follow established patterns for new documentation pages

    line 99
  6. Distinctive:

    Document Model Support: When adding guides for new AI providers/models:

    line 102
  7. Distinctive:

    Document that models work automatically without configuration

    line 103
  8. Distinctive:

    Update the feature comparison tables in root CLAUDE.md

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 28,633 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 copy
  • pnpm run build - Build documentation site for production
  • pnpm run preview - Preview built documentation locally
  • pnpm run docs:api - Generate API documentation from TypeScript source
  • pnpm run lint - Lint documentation files using ESLint
  • pnpm run format - Format and auto-fix documentation files with ESLint
  • pnpm typecheck - Type check TypeScript files

Deployment:

  • pnpm run deploy - Deploy to Cloudflare using Wrangler

Architecture

Documentation Structure:

  • guide/ - User guides and tutorials with screenshots
  • api/ - Auto-generated API documentation from TypeScript source
  • public/ - Static assets including screenshots and config schema
  • .vitepress/ - VitePress configuration and theme customization

Key Files:

  • update-api-index.ts - Script to generate API documentation index
  • typedoc.config.mjs - TypeDoc configuration for API docs generation
  • public/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.png for 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

  1. API Documentation: ./update-api-index.ts generates API docs from better-ccusage TypeScript source
  2. Schema Copy: config-schema.json is copied from the better-ccusage package to public directory
  3. VitePress Build: Standard VitePress build process creates static site
  4. Deployment: Built site is deployed to Cloudflare using Wrangler

Dependencies

Key Dev Dependencies:

  • vitepress - Static site generator
  • typedoc - API documentation generation
  • typedoc-plugin-markdown - Markdown output for TypeDoc
  • typedoc-vitepress-theme - VitePress theme for TypeDoc
  • wrangler - Cloudflare deployment tool
  • better-ccusage - Main package (workspace dependency for API docs)

VitePress Plugins:

  • vitepress-plugin-group-icons - Group icons in navigation
  • vitepress-plugin-llms - LLM-specific enhancements
  • @ryoppippi/vite-plugin-cloudflare-redirect - Cloudflare redirect handling

Development Workflow

  1. Start Development: pnpm run dev automatically generates API docs and starts dev server
  2. Edit Content: Modify markdown files in guide/ or update source code for API changes
  3. Preview Changes: Development server automatically reloads on changes
  4. Build for Production: pnpm run build generates final static site
  5. Deploy: pnpm run deploy pushes 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 file

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.