Borrowing it
Nothing to install: this file belongs to vylasaven/claude-sonar. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/vylasaven/claude-sonar/main/CLAUDE.mdgit clone --depth 1 https://github.com/vylasaven/claude-sonarWrote 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.
[](https://agentmods.dev/instructions/vylasaven/claude-sonar/claude-md)<a href="https://agentmods.dev/instructions/vylasaven/claude-sonar/claude-md"><img src="https://agentmods.dev/badge/instructions/vylasaven/claude-sonar/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/vylasaven/claude-sonar/claude-md"><img src="https://agentmods.dev/badge/instructions/vylasaven/claude-sonar/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01525 | $0.01525 |
| Opus 5.5 | $0.00610 | $0.00610 |
| Sonnet 5.5 | $0.00305 | $0.00305 |
| Haiku 4.5 | $0.00153 | $0.00153 |
Grade A, and why
claude-sonar CLAUDE.md scanned grade A with 0 findings 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 2mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md — Instructions for AI agents working on claude-sonar
This file tells Claude Code (and any AI coding agent) how to work on this project effectively. If you are a blind or low-vision developer using Claude Code to contribute to claude-sonar, this file is written with you in mind.
What This Project Is
claude-sonar is a screen reader accessibility plugin for Claude Code. It intercepts tool output via hooks and reformats it into concise, spoken-friendly summaries. The people who use this project may not be able to see your code changes — they will hear them through a screen reader or TTS engine. Keep that in mind with every line you write.
Project Status
This project was released as a seed for the community. The scaffolding, architecture, and test suite are solid (545 tests, 42 test files), but there may be bugs in edge cases, especially around screen reader output quality. If you are fixing a bug, add a test for it. If you are improving spoken output, test it with a screen reader if you can.
Build and Test
npm run build # Build with tsup (dual ESM/CJS)
npm test # Run all tests (vitest)
npm run test:coverage # Tests with V8 coverage
npm run lint # ESLint
npm run typecheck # tsc --noEmit
Always run npm test after changes. All 545+ tests should pass. Do not skip this.
Architecture — The Short Version
The core is a pure pipeline with no I/O:
stdin JSON -> parseHookEvent() -> formatToolUse() -> classifySignificance() -> applySignificance() -> buildHookOutput() -> stdout JSON
The CLI layer (src/cli/) is a thin wrapper that handles stdin, stdout, TTS, and earcons. The pipeline (src/core/pipeline.ts) is a pure function: string in, structured result out. This separation is what makes the project testable.
Key Source Locations
| Directory | What It Contains |
|---|---|
src/core/pipeline.ts |
Main entry point. Routes hook events to handlers. Start here. |
src/core/types.ts |
All hook event type definitions |
src/core/significance.ts |
Classifies events as noise, routine, notable, or important |
src/core/apply-significance.ts |
Adjusts output based on significance level |
src/core/digest.ts |
Accumulates events for end-of-turn summary |
src/core/progress.ts |
Tracks tool elapsed time |
src/core/history.ts |
JSONL event log per session |
src/core/code-summarizer.ts |
Extracts function, class, and interface declarations from code |
src/formatters/ |
One file per tool (bash.ts, edit.ts, read.ts, etc.) |
src/formatters/index.ts |
Formatter registry with conflict detection |
src/formatters/types.ts |
FormattedOutput (contextText + ttsText), Formatter interface |
src/config/types.ts |
All config interfaces (SonarConfig and sub-interfaces) |
src/config/defaults.ts |
Default config values |
src/earcon/sounds.ts |
Earcon IDs and OS sound mappings |
src/settings/index.ts |
Claude Code settings.json hook management |
src/cli/index.ts |
CLI entry point (all commands registered here) |
src/output/index.ts |
Builds the final HookJsonOutput JSON for stdout |
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.
- 2mo ago First seen · 124 lines · 1,525 tokens per session scan A 7659454fc794
claude-sonar CLAUDE.md is an instructions file published in the GitHub repository vylasaven/claude-sonar (12 stars, last pushed 8mo ago), licensed MIT. It adds 1,525 tokens to every session, about $0.0061 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
claude-sonar CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| claude-sonar CLAUDE.mdvylasaven/claude-sonar | Instructions file | 12 | 8mo ago | MIT | A | 1,525 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |