anafpy: Instructions file for Claude Code

CLAUDE.md

anafpy CLAUDE.md is an instructions file for Claude Code from robert-malai/anafpy. It costs 9,947 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for anafpy, a typed asynchronous Python client for Romania's ANAF tax-authority services, plus a local MCP server. ANAF handles services such as electronic invoicing.

In plain words
What is it for?
Use them when developing the ANAF client, electronic-invoicing features, documentation, or MCP tools, and when checking the required architecture and dependencies.
Why use it?
They explain the project's boundaries and conventions so changes preserve its stateless transport design and documented service behavior.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to robert-malai/anafpy. 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/robert-malai/anafpy/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/robert-malai/anafpy

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/robert-malai/anafpy/claude-md"><img src="https://agentmods.dev/badge/instructions/robert-malai/anafpy/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9,947 This file is loaded in full into every session.
When invoked 9,947 The same file — it is already loaded in full.
Security scan A 2 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.09947 $0.09947
Opus 5.5 $0.03979 $0.03979
Sonnet 5.5 $0.01989 $0.01989
Haiku 4.5 $0.00995 $0.00995

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

Security

Grade A, and why

anafpy CLAUDE.md scanned grade A with 2 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

# timeout (DUK JVM + platform curl)

Runs shell commandslowCapability

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

_transport/subprocess.py # bounded async runner; kills the process group on
CLAUDE.md · 609 lines

How it starts

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

CLAUDE.md

Guidance for working in this repository. DESIGN.md is the decision record — rationale, dates, and reversals live there; this file states only the current rules. docs/anaf-reference/ is the compiled local reference of ANAF's APIs. docs/ is also the MkDocs source of the public docs site (Read the Docs, https://anafpy.readthedocs.io).

What this is

anafpy — typed async Python clients for Romania's ANAF tax-authority services, plus a local stdio MCP server (anafpy.mcp, extra anafpy[mcp]) exposing the same operations as Claude tools and skills. It is a thin, stateless transport client — no persistence, no accounting logic; client methods map 1:1 onto MCP tools. Python 3.12+ (dev pin 3.13), httpx2, Pydantic v2.

The service strands:

  • e-Factura (electronic invoicing). Outbound has two shapes (DESIGN.md §1): XML pass-through is strongly recommended when the caller runs invoicing software — bring its complete UBL XML; anafpy never re-composes an upstream document, and ANAF's SPV is not invoice storage (it purges filed messages after ~60 days, so the durable record lives upstream). Structured authoring (efactura.authoring) is the first-class path without one: a bidirectional InvoiceDocument covers invoice + credit note (kind picks the render target), totals/VAT computed with explicit overrides preserved, a hand-translated EN 16931 + CIUS-RO rule set (validate(), findings with official BR-* ids; ANAF stays authoritative), byte-stable render/read round-trips, EFacturaClient.upload_invoice. The same model backs the inbox — but not the same contract: the construction checks are authoring's, and nothing the caller did not author is judged by them (_DERIVED_CONTEXT — a document read off the wire, or a value compute_* derives), so the reader never rejects a document ANAF accepted and a read one always renders back. DownloadedMessage.view never raises (None when not representable — a missing mandatory element or off-list code; cause on view_error + a warning; raw bytes + full UBL model are the fallback tiers).
  • e-Transport (goods transport) — fully translated: bidirectional flat models author a filing and view a parsed one, covering all four operations (declaration/correction, deletion, confirmation, vehicle change); XML input remains supported. UIT presentation (extra anafpy[cards], DESIGN.md §13) renders a filed declaration into two PDFs — a phone-shaped driver card and an A4 detail document — locally, informative, never issued by ANAF. Validity is ANAF's data_exp_uit when the caller has one and the statutory OUG 41/2022 window otherwise (ANAF discloses the date only to the transport organizer, so that is the common case) — the two are never rendered alike.
  • Public no-auth services (anafpy.public) — registry lookups, financial statements, and the stateless e-Factura validare/transformare.
  • Exchange rates (anafpy.bnr, DESIGN.md §17) — the one non-ANAF publisher: BNR's reference-rate XML on curs.bnr.ro, for the lei figures ANAF filings need from foreign-currency documents. A rate source, not a ruling: it returns what BNR published on a day; which day a filing must use is the caller's (and the workflow skill's) call.
  • SPV (anafpy.spv) — read-only mailbox over a certificate cookie session.
  • Declarations (anafpy.declaratii, DESIGN.md §12) — local authoring + validation via ANAF's DUKIntegrator (managed-installed from ANAF's update feed), official-PDF rendering, qualified signing (the raw op delegated to the OS token — no key material or PIN in-process), portal filing (production-only; opt-out ANAFPY_DECLARATII_UPLOAD=off), and no-auth StareD112 status/recipisa tracking.

Read the full file on GitHub · 609 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. 1mo ago Changed · +3 lines · +47 tokens per session 2e0ec943e8f2
  2. 2mo ago Changed · +13 lines · +221 tokens per session 1983f3b54ffc
  3. 2mo ago First seen · 593 lines · 9,679 tokens per session scan A d2091b5acc86

Subscribe to this mod's changes

anafpy CLAUDE.md is an instructions file published in the GitHub repository robert-malai/anafpy (33 stars, last pushed 4d ago), licensed Apache-2.0. It adds 9,947 tokens to every session, about $0.0398 per session on Opus 5.5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

anafpy CLAUDE.md compared with instructions from other repositories

anafpy CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
anafpy CLAUDE.mdrobert-malai/anafpyInstructions file334d agoApache-2.0A9,947Claude 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