microcharts: Instructions file for Claude Code

CLAUDE.md

microcharts CLAUDE.md is an instructions file for Claude Code from ganapativs/microcharts. It costs 5,706 tokens per session, scanned B, original, MIT.

Project instructions for microcharts, a React library of tiny charts that fit inside interface elements such as table cells or KPI cards.

In plain words
What is it for?
Use them when developing or reviewing microcharts and deciding whether a chart, interaction, or visual change fits the project.
Why use it?
They explain the project’s design rules and constraints so contributors and agents can change the charts without breaking their readability, accessibility, or intended data meaning.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is ganapativs/microcharts's own configuration. It tells Claude Code how to work on microcharts itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything microcharts configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ganapativs/microcharts. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ganapativs/microcharts/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ganapativs/microcharts

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for microcharts CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ganapativs/microcharts/claude-md.svg)](https://agentmods.dev/instructions/ganapativs/microcharts/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ganapativs/microcharts/claude-md"><img src="https://agentmods.dev/badge/instructions/ganapativs/microcharts/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,706 This file is loaded in full into every session.
When invoked 5,706 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.05706 $0.05706
Opus 5 $0.02853 $0.02853
Sonnet 5 $0.01141 $0.01141
Haiku 4.5 $0.00571 $0.00571

Measured 8d ago against content hash ee82980bc4e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade B, and why

microcharts CLAUDE.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

options. The craft shows in the output; the code and copy don't lecture about it.
CLAUDE.md · 263 lines

How it starts

The opening of the file, as written. The whole thing — 263 lines — stays where its author put it; the contents beside it link to each section on GitHub.

microcharts — contributor & agent guide

Word-sized charts for React: zero runtime dependencies, ~2–7 kB interactive · ~1–4 kB static per chart, accessible by default, handcrafted-feeling. They're built to sit inside an interface — a sentence, a table cell, a KPI card, a tab header, a streamed AI reply — and to be safe for a model to emit and a person to read. Package: @microcharts/react.

This file is the working contract for anyone (human or AI) changing the code. The rules below are not style preferences — several are enforced in CI, and violating them is a bug.

Design principles

  1. Earn every mark: each pixel must encode data, state, structure, or a useful interaction cue.
  2. First read instant, second read rewarding: clarity at a glance may reveal finer structure on inspection.
  3. Prefer uncommon questions over uncommon shapes: add a chart only when it answers a practical decision the catalog cannot already answer well.
  4. Delight without lying: motion, rhythm, texture, and direct manipulation may delight, but never change what the data means.
  5. Tiny size is a design material, not a limitation: composition, contrast, and summaries must survive the smallest supported context.

Charts must remain excellent in light, dark, print, and dense product contexts. "Modern" means sharper thinking and better behavior — not neon glow, glass, dashboard chrome, or decorative complexity.

Non-negotiables (violating any of these is a bug)

  1. Zero runtime dependencies. dependencies: {} forever, CI-enforced. React is a peer: "react": "^18.0.0 || ^19.0.0". Scales, paths, easing, color, stats, summaries — all in-house. All chart types ship in the one @microcharts/react package. Any third-party dev-dependency must be verified actively maintained before adoption.
  2. Budgets are CI gates, applied in this order. (1) Per-subpath budget: every subpath carries its own limit in scripts/size-budgets.json, set to measured + max(50 B, 2%); styles.css ≤ 12 kB. .size-limit.json is generated (scripts/gen-size-limits.mjs from that file), never hand-edited. (2) Regression diff: every PR is diffed against its base branch — scripts/size-snapshot.json records the measured gzip bytes of all 218 subpaths, CI re-measures against a fresh build (size-snapshot.mjs --check), and the size-diff job replies with a per-subpath table. Growth over 1% on any subpath fails; regenerate with pnpm build && pnpm size:snapshot, and label the PR size-increase-approved when an increase is deliberate. (3) Admission bar for a NEW chart: static ≤ 3 kB (≤ 2 kB target, "Delta-class" ≤ 1.5 kB), interactive ≤ static + 3.25 kB, ≤ ~6 SVG nodes typical, 0 client JS for static charts in RSC. (4) Catalog ceiling: static 4.35 kB / interactive 7 kB. The interactive wall is hard — no subpath crosses it, and no sign-off raises it, because "~2–7 kB interactive" is quoted in the README, the docs and the package description. sparkline defines the top of both scales (4256 / 6973 measured) and its interactive budget is pinned at the wall: 7000 B, 27 B of headroom. Growing that entry fails the gate on purpose — buy room by shrinking it, never by raising the number.

Read the full file on GitHub · 263 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 263 lines · 5,706 tokens per session scan B ee82980bc4e2

Subscribe to this mod's changes

microcharts CLAUDE.md is an instructions file published in the GitHub repository ganapativs/microcharts (172 stars, last pushed today), licensed MIT. It adds 5,706 tokens to every session, about $0.0285 per session on Opus 5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens