Borrowing it
Nothing to install: this file belongs to MercurieVV/ScalaSemantic. 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/MercurieVV/ScalaSemantic/master/CLAUDE.mdgit clone --depth 1 https://github.com/MercurieVV/ScalaSemanticWrote 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/mercurievv/scalasemantic/claude-md)<a href="https://agentmods.dev/instructions/mercurievv/scalasemantic/claude-md"><img src="https://agentmods.dev/badge/instructions/mercurievv/scalasemantic/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/mercurievv/scalasemantic/claude-md"><img src="https://agentmods.dev/badge/instructions/mercurievv/scalasemantic/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.01726 | $0.01726 |
| Opus 5 | $0.00863 | $0.00863 |
| Sonnet 5 | $0.00345 | $0.00345 |
| Haiku 4.5 | $0.00173 | $0.00173 |
Grade C, and why
ScalaSemantic CLAUDE.md scanned grade C 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 5d 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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
core/ ….semanticdb SemanticIndex — loads/indexes *.semanticdb (no JSON, no MCP) analysis/ ….analysis, ….model Analyzer + upickle result models; dependsOn core mcp/ ….mcp, Main stdio JSON-RPC server + entrypoint; depe How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ScalaSemantic
MCP server doing deep semantic analysis on Scala projects via SemanticDB — capabilities beyond standard LSP/Metals.
Stack
- Scala 3.8.4, Mill 1.1.7 (build tool;
build.sbt/project/deleted — Sonatype publish and stryker4s mutation testing are deferred, disabled in CI (if: false) until each has a working Mill path, seedocs/MILL_MIGRATION.md) org.scalameta:scalameta:4.13.9— SemanticDB protobuf API (scala.meta.internal.semanticdb)com.lihaoyi:upickle:4.2.1— JSON for MCP wire protocolorg.scalameta:munit:1.2.3— testssemanticdbEnabled := true— project emits its own SemanticDB; analyzer dogfoods on this repo.
Layout
Three Mill modules (layer per module), package base com.github.mercurievv.scalasemantic:
core/ ….semanticdb SemanticIndex — loads/indexes *.semanticdb (no JSON, no MCP)
analysis/ ….analysis, ….model Analyzer + upickle result models; dependsOn core
mcp/ ….mcp, Main stdio JSON-RPC server + entrypoint; dependsOn analysis (test->test too)
SemanticDB is emitted per module under out/<module>/compile.dest/classes/META-INF/semanticdb/**.
Dogfood tests load SemanticIndex.fromProject(".") (repo root) so they see every module's output;
unforked tests run with cwd = repo root. mcp test-depends on analysis so fixtures compile first.
Architecture
3 layers: MCP stdio JSON-RPC → analysis engine → SemanticIndex.
- No Scala MCP SDK exists — JSON-RPC is hand-rolled over stdin/stdout with upickle.
- Signature rendering is a custom
Type/Signatureprinter; implicit params detected viaSymbolInformation.Property.IMPLICITbitmask. - Call graph: edges from
SymbolOccurrencereferences within a method's definition range; BFS for path-find.
MCP tools (target surface)
find-usages, method-signature, class-hierarchy, resolve-implicits, trait-vs-local-members, type-at-position, cross-file-refs, find-overloads, trace-implicit-chain, call-graph-path, rename-plan, move-plan, extract-method-plan.
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.
- 5d ago Changed · +6 tokens per session 4f2148fd4418
- 10d ago First seen · 107 lines · 1,720 tokens per session scan C 5a6de607667a
ScalaSemantic CLAUDE.md is an instructions file published in the GitHub repository MercurieVV/ScalaSemantic (21 stars, last pushed 2d ago), licensed MIT. It adds 1,726 tokens to every session, about $0.0086 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vibetags com-example-service-NewAnnotationsShowcase-DraftKafkaIntegrationSpike.instructions.md
Instructions for PIsberg/vibetags, covering copilot instructions for draftkafkaintegrationspike and experimental prototype.
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).