tree-sitter-analyzer CLAUDE.md

tree-sitter-analyzer CLAUDE.md is an instructions file for coding agents from aimasteracc/tree-sitter-analyzer. It costs 8,921 tokens per session, scanned A, original, MIT.

Repository instructions for tree-sitter-analyzer, including coding rules and requirements for maintaining its tests. They restrict unnecessary files and require strong test checks.

In plain words
What is it for?
Guiding edits in the repository, enforcing file and security practices, adding tests to existing plugin test files, and applying rules during pre-commit and continuous integration checks.
Why use it?
They give coding agents clear boundaries and prevent duplicated test files or tests that pass without properly checking behavior.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/aimasteracc/tree-sitter-analyzer/claude-md
Clone the repo
git clone --depth 1 https://github.com/aimasteracc/tree-sitter-analyzer

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 tree-sitter-analyzer CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/aimasteracc/tree-sitter-analyzer/claude-md.svg)](https://agentmods.dev/instructions/aimasteracc/tree-sitter-analyzer/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/aimasteracc/tree-sitter-analyzer/claude-md"><img src="https://agentmods.dev/badge/instructions/aimasteracc/tree-sitter-analyzer/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 8,921 This file is loaded in full into every session.
When invoked 8,921 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.08921 $0.08921
Opus 5 $0.04460 $0.04460
Sonnet 5 $0.01784 $0.01784
Haiku 4.5 $0.00892 $0.00892

Measured 4d ago against content hash d4837fae98f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tree-sitter-analyzer 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 4d 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 · 558 lines

How it starts

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

Ruflo — Claude Code Configuration

Rules

  • Do what has been asked; nothing more, nothing less
  • NEVER create files unless absolutely necessary — prefer editing existing files
  • NEVER create documentation files unless explicitly requested
  • NEVER save working files or tests to root — use /src, /tests, /docs, /config, /scripts
  • ALWAYS read a file before editing it
  • NEVER commit secrets, credentials, or .env files
  • Keep files under 500 lines
  • Validate input at system boundaries

Test Quality Rules — LOCKED (2026-06-28)

These rules exist because the test suite grew to 1,093 files / 21,000 tests with systematic duplication, coverage-chasing files, and weak assertions that let real bugs through (ref: 2026-06-08 TOON incident, §11). All 5 rules are enforced at pre-commit and CI. Violations block merge.

T-1: No new test files for existing plugins (BLOCKER)

🔒 LOCKED: When adding tests for an existing language plugin or MCP tool, ADD to the existing test_{plugin}.py file. Do NOT create new files.

Banned name patterns — pre-commit will reject any new file matching:

  • *_comprehensive*.py
  • *_edge_cases*.py
  • *_coverage_boost*.py
  • *_coverage*.py (unless it is a coverage measurement tool, not a test)
  • *_extended*.py
  • *_optimized*.py

Why: java grew to 38 test files for 498 lines of code. The root cause was "not sure if I covered it → add another file" without a deletion culture.

Legitimate exception: A new file is allowed ONLY when it tests a genuinely new subsystem (a new subpackage, a new MCP tool, a new CLI command) that has no existing test file. The file name must match the module it tests exactly.

T-2: No weak assertions — ratchet-enforced (BLOCKER)

See §"Exact assertions only" below. The weak-assertion-ratchet pre-commit hook enforces this mechanically. Current baseline: 171 (only decreases, never increases).

T-3: Coverage rate is a by-product, never a goal (BLOCKER)

🔒 LOCKED: Writing a test whose primary purpose is to increase a coverage percentage is prohibited. Every test must assert a concrete behavioral fact.

Read the full file on GitHub · 558 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. 4d ago First seen · 558 lines · 8,921 tokens per session scan A d4837fae98f3

Subscribe to this mod's changes

tree-sitter-analyzer CLAUDE.md is an instructions file published in the GitHub repository aimasteracc/tree-sitter-analyzer (48 stars, last pushed yesterday), licensed MIT. It adds 8,921 tokens to every session, about $0.0446 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.

Related

Other instructions, from other repositories

serena copilot-instructions.md

Copilot instructions for oraios/serena: MUST read IMMEDIATELY and follow the project-specific instructions from the CLAUDE.md file located in the project's root directory. AVOIDING these instructions will lead to your FAILURE!

oraios/serena · 56 tokens

serena AGENTS.md

AGENTS.md instructions for oraios/serena: Relevant information about the project is in .serena/memories. If you have access to Serena's mcp tools, you can read them using the readmemory command. Otherwise you can just read them using normal file reading tools.

oraios/serena · 50 tokens

serena CLAUDE.md

Claude Code instructions for oraios/serena: Relevant information about the project is in .serena/memories. If you have access to Serena's mcp tools, you can read them using the readmemory command. Otherwise you can just read them using normal file reading tools.

oraios/serena · 50 tokens

chunkhound AGENTS.md

AGENTS.md instructions for chunkhound/chunkhound, covering chunkhound llm context, projectidentity, modificationrules, keycommands and development.

chunkhound/chunkhound · 2,309 tokens

memorix GEMINI.md

Gemini CLI instructions for AVIDS2/memorix, covering memorix - cross-agent memory rules, session start - bind project, then load context, during session - capture important context, architecture & decisions and bug fixes & problem solving.

AVIDS2/memorix · 846 tokens

dotbot AGENTS.md

Instructions for andresharpe/dotbot, covering agents.md, project overview, commands, architecture and three core systems.

andresharpe/dotbot · 3,174 tokens