ZATCA CLAUDE.md

ZATCA CLAUDE.md is an instructions file for coding agents from SallaApp/ZATCA. It costs 1,082 tokens per session, scanned A, original, MIT.

Project-specific instructions for SallaApp/ZATCA, a PHP library for Saudi Arabia's electronic-invoicing requirements. The project handles QR codes, certificates, and digitally signed invoice XML.

In plain words
What is it for?
Use them when developing or testing the ZATCA library, including QR-code generation, certificate onboarding, invoice signing, and XML handling.
Why use it?
They provide the repository's technology choices, architecture, and commands before coding begins. This reduces the risk of changing the library in a way that breaks its invoicing workflow.

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/sallaapp/zatca/claude-md
Clone the repo
git clone --depth 1 https://github.com/SallaApp/ZATCA

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sallaapp/zatca/claude-md.svg)](https://agentmods.dev/instructions/sallaapp/zatca/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/sallaapp/zatca/claude-md"><img src="https://agentmods.dev/badge/instructions/sallaapp/zatca/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,082 This file is loaded in full into every session.
When invoked 1,082 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.01082 $0.01082
Opus 5 $0.00541 $0.00541
Sonnet 5 $0.00216 $0.00216
Haiku 4.5 $0.00108 $0.00108

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

Security

Grade A, and why

ZATCA 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 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.

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 · 48 lines

How it starts

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

ZATCA

A PHP composer library (salla/zatca) that implements ZATCA (Fatoora) e-invoicing for Saudi Arabia: Phase 1 TLV-encoded QR code generation and Phase 2 CSR/certificate onboarding + XML invoice signing with embedded QR.

Stack

  • PHP >= 8.0 (no Laravel/artisan — pure composer library)
  • phpseclib/phpseclib ~3.0 — EC key handling and X.509 certificate parsing
  • robrichards/xmlseclibs ^3.1 — XML digital signature support
  • josemmo/uxml ^0.1.4 — UBL XML parsing/manipulation
  • chillerlan/php-qrcode ^5.0 — QR code image rendering
  • phpunit/phpunit ~8.0 (dev)

Run / test / build

composer install
composer test          # runs: phpunit

Architecture

  • src/GenerateQrCode.php — entry point for QR generation; accepts Tag[], encodes as TLV, outputs base64 string or rendered image via chillerlan/php-qrcode.
  • src/Tag.php — base TLV tag: tag ID + value → hex-packed binary string (__toString).
  • src/Tags/ — nine concrete tag types: Seller, TaxNumber, InvoiceDate, InvoiceTotalAmount, InvoiceTaxAmount, InvoiceHash, InvoiceDigitalSignature, PublicKey, CertificateSignature (Phase 2 simplified invoices only).
  • src/GenerateCSR.php — generates secp256k1 EC private key + CSR using PHP OpenSSL with a dynamically written temp config; env-aware (sandbox/simulation/production) to set the correct OID signing string.
  • src/Models/CSRRequest.php — fluent builder for CSR subject fields; validates UID (15 digits, starts/ends with 3), country code (2 chars), and branch naming rules.
  • src/Models/InvoiceSign.php — signs a UBL XML invoice: strips unwanted nodes, computes SHA-256 C14N hash, creates ECDSA digital signature, builds UBLExtensions, embeds QR code node, returns Invoice.
  • src/Helpers/Certificate.php — wraps plaintext certificate + private key (phpseclib3 EC); exposes getHash(), getPlainPublicKey(), getAuthorizationHeader(), getCertificateSignature(), getFormattedIssuerDN().
  • src/Helpers/UXML.php — DOM/XPath wrapper over josemmo/uxml; provides toTagsArray() which reads UBL fields and builds the 8–9 element Tag[] array for QR encoding.
  • src/Helpers/UblExtension.php — builds the <ext:UBLExtensions> block with the XAdES signature for inclusion in the signed invoice XML.

Read the full file on GitHub · 48 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. 5d ago First seen · 48 lines · 1,082 tokens per session scan A 0976deacd894

Subscribe to this mod's changes

ZATCA CLAUDE.md is an instructions file published in the GitHub repository SallaApp/ZATCA (165 stars, last pushed 3d ago), licensed MIT. It adds 1,082 tokens to every session, about $0.0054 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

qrcodly CLAUDE.md

Instructions for FloB95/qrcodly, covering claude.md, project overview, monorepo structure, commands and development.

FloB95/qrcodly · 2,265 tokens

mcp-server-qrcode CLAUDE.md

Instructions for jwalsh/mcp-server-qrcode, covering claude's development notes for mcp qr code server, freebsd/bsd compatibility, development commands, code style guidelines and server entry points.

jwalsh/mcp-server-qrcode · 600 tokens

quality-qr-mcp CLAUDE.md

Claude Code instructions for silly-geese/quality-qr-mcp: When the user's request matches an available skill, ALWAYS invoke it using the Skill tool as your FIRST action. Do NOT answer directly, do NOT use other tools first. The skill has specialized workflows that produce better results than ad-hoc answers.

silly-geese/quality-qr-mcp · 198 tokens

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).

microsoft/vscode · 6,785 tokens

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.

github/spec-kit · 7,104 tokens

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.

openai/codex · 5,182 tokens