euclidMCPPaper: Instructions file for Claude Code

CLAUDE.md

euclidMCPPaper CLAUDE.md is an instructions file for Claude Code from snegi26/euclidMCPPaper. It costs 1,315 tokens per session, scanned A, original, MIT.

Project instructions for developing Euclid-MCP, a Python service that exposes tools through the Model Context Protocol.

In plain words
What is it for?
They guide Python style, strict type checking, data models, milestone order, engine separation, and input sanitisation.
Why use it?
They keep the implementation consistent with the project specification and prevent unsafe or nondeterministic behaviour.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to snegi26/euclidMCPPaper. 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/snegi26/euclidMCPPaper/claude/code-repo-from-specs-emsar7/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/snegi26/euclidMCPPaper

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 euclidMCPPaper CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/snegi26/euclidmcppaper/claude-md/github.svg)](https://agentmods.dev/instructions/snegi26/euclidmcppaper/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/snegi26/euclidmcppaper/claude-md"><img src="https://agentmods.dev/badge/instructions/snegi26/euclidmcppaper/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 euclidMCPPaper CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/snegi26/euclidmcppaper/claude-md"><img src="https://agentmods.dev/badge/instructions/snegi26/euclidmcppaper/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,315 This file is loaded in full into every session.
When invoked 1,315 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01315 $0.01315
Opus 5.5 $0.00526 $0.00526
Sonnet 5.5 $0.00263 $0.00263
Haiku 4.5 $0.00131 $0.00131

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

Security

Grade A, and why

euclidMCPPaper CLAUDE.md scanned grade A 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 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Never `shell=True`. Pass argv lists to `subprocess.run`. Clean up temp files in
CLAUDE.md · 103 lines

How it starts

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

CLAUDE.md — Euclid-MCP project conventions

Binding guidelines for any agent working in this repo. Read alongside SPEC.md.

Golden rules

  1. Spec is the source of truth. Implement what SPEC.md + specs/*.md describe. If reality forces a deviation, note it in the PR and update the spec in the same change — never let code and spec drift.
  2. Milestone discipline. Build M0→M6 in order. A milestone is not "done" until ruff, mypy --strict, and that milestone's tests are green. Don't scaffold ahead.
  3. The IR boundary is sacred. Nothing above lowering/ may mention Prolog. ir/, tools/, and the MCP surface stay engine-agnostic so a second backend can be added later.
  4. Determinism over cleverness. Normalize ordering, avoid nondeterministic dict iteration in outputs, seed nothing random. Same input ⇒ same bytes.

Language & style (Python)

  • Python ≥ 3.11, src layout (src/euclid_mcp/).
  • Type hints everywhere; mypy runs in --strict. No Any unless justified with a comment.
  • Pydantic v2 for every tool I/O model and the IR AST. Use model_config = ConfigDict(extra="forbid", str_strip_whitespace=True). Use field_validator (not validator), model_dump() (not dict()).
  • Ruff for lint + format (line length 100). Rule sets: E,F,I,UP,B,SIM,RUF.
  • Module-level constants in UPPER_CASE (MAX_INPUT_BYTES = 500_000, DEFAULT_TIMEOUT_S = 30, DEFAULT_MAX_SOLUTIONS = 5, DEFAULT_MAX_DEPTH = 30).
  • Group imports: stdlib / third-party / local. Prefer specific exceptions over bare Exception.
  • DRY: shared parse→lower→run pipeline lives in one place; the four tools call it, they do not each re-implement it.
  • Docstrings on every public function; for tools, the docstring is the MCP description — make it precise and include the return schema.

MCP conventions (from MCP best practices)

  • Server name: euclid_mcp ({service}_mcp, lowercase, no versions/dates).
  • Tool names: exactly reason, diagnose, what_if, check_kb (snake_case, paper-defined — do not rename or prefix).
  • Every @mcp.tool sets name and annotations. All four tools are read-only:
    annotations={
        "title": "...",
        "readOnlyHint": True,
        "destructiveHint": False,
        "idempotentHint": True,
        "openWorldHint": False,
    }
    
  • Tool inputs are a single Pydantic model argument with Field(...) descriptions and constraints. Let Pydantic validate; don't hand-roll validation.
  • Errors are feedback, not exceptions across the boundary. Backend/parse errors are returned as readable text in the result payload so the LLM can self-correct — never leak a stack trace or crash the tool call. Messages must be actionable ("Undefined predicate mortal/1; add a fact or rule with head mortal(...)").
  • Prefer structured returns (Pydantic models) so FastMCP emits an output schema; also include a rendered human-readable field where the paper shows one (conclusion, proof-tree text).

Read the full file on GitHub · 103 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 · 103 lines · 1,315 tokens per session scan A 9af1e2cbf425

Subscribe to this mod's changes

euclidMCPPaper CLAUDE.md is an instructions file published in the GitHub repository snegi26/euclidMCPPaper (0 stars, last pushed 3mo ago), licensed MIT. It adds 1,315 tokens to every session, about $0.0053 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

euclidMCPPaper CLAUDE.md compared with instructions from other repositories

euclidMCPPaper CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
euclidMCPPaper CLAUDE.mdsnegi26/euclidMCPPaperInstructions file03mo agoMITA1,315Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA8,130Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,153GitHub Copilot
generative-ai-for-beginners AGENTS.mdmicrosoft/generative-ai-for-beginnersInstructions file124ktodayMITA2,981Codex, OpenCode