claude-sonar: Instructions file for Claude Code

CLAUDE.md

claude-sonar CLAUDE.md is an instructions file for Claude Code from vylasaven/claude-sonar. It costs 1,525 tokens per session, scanned A, original, MIT.

Repository instructions for claude-sonar, an accessibility plugin that turns Claude Code output into shorter summaries suitable for screen readers or text-to-speech software.

In plain words
What is it for?
Use them when changing the plugin, improving spoken summaries, fixing accessibility issues, or running its TypeScript build and Vitest tests.
Why use it?
They keep spoken output understandable for blind and low-vision developers and describe the project's build, tests, and known status.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is vylasaven/claude-sonar's own configuration. It tells Claude Code how to work on claude-sonar 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 claude-sonar configures →

Reuse

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.

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

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 claude-sonar CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/vylasaven/claude-sonar/claude-md/github.svg)](https://agentmods.dev/instructions/vylasaven/claude-sonar/claude-md)
Your own site
<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.

agentmods 80×15 button for claude-sonar CLAUDE.md

Your own site · 80×15
<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>
Per session 1,525 This file is loaded in full into every session.
When invoked 1,525 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01525 $0.01525
Opus 5.5 $0.00610 $0.00610
Sonnet 5.5 $0.00305 $0.00305
Haiku 4.5 $0.00153 $0.00153

Measured 2mo ago against content hash 7659454fc794, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

CLAUDE.md · 124 lines

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

Read the full file on GitHub · 124 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. 2mo ago First seen · 124 lines · 1,525 tokens per session scan A 7659454fc794

Subscribe to this mod's changes

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.

Related

claude-sonar CLAUDE.md compared with instructions from other repositories

claude-sonar CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
claude-sonar CLAUDE.mdvylasaven/claude-sonarInstructions file128mo agoMITA1,525Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode