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 | $0.00763 | $0.00763 |
| Sonnet 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 10d 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.
- 10d 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 6mo ago), licensed MIT. It adds 1,525 tokens to every session, about $0.0076 per session on Opus 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.
Other instructions, from other repositories
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.
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.
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).
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.
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).
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.