Borrowing it
Nothing to install: this file belongs to SallaApp/ZATCA. 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/SallaApp/ZATCA/master/CLAUDE.mdgit clone --depth 1 https://github.com/SallaApp/ZATCAWrote 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/sallaapp/zatca/claude-md)<a href="https://agentmods.dev/instructions/sallaapp/zatca/claude-md"><img src="https://agentmods.dev/badge/instructions/sallaapp/zatca/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/sallaapp/zatca/claude-md"><img src="https://agentmods.dev/badge/instructions/sallaapp/zatca/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.01882 | $0.01882 |
| Opus 5.5 | $0.00753 | $0.00753 |
| Sonnet 5.5 | $0.00376 | $0.00376 |
| Haiku 4.5 | $0.00188 | $0.00188 |
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 26d 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.
How it starts
The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ZATCA (salla/zatca)
A pure-PHP Composer library that implements ZATCA (Fatoora) e-invoicing primitives for Saudi Arabia:
Phase 1 TLV-encoded QR code generation, and Phase 2 CSR generation, certificate handling, and XAdES
signing of UBL 2.1 invoices with the QR code embedded. It does not build the UBL XML (that is
salla/einvoicing) and does not call the ZATCA API (that is services/zatca-einvoicing).
Stack
- PHP >= 8.0 ·
ext-mbstring·ext-dom·ext-opensslwith EC support (used at runtime byGenerateCSR) phpseclib/phpseclib ~3.0— EC keys, ECDSA signing, X.509 parsingrobrichards/xmlseclibs ^3.1— XML digital-signature helpersjosemmo/uxml ^0.1.4— UBL XML DOM/XPath manipulationchillerlan/php-qrcode ^5.0— QR image rendering (v5 since release 4.0.0)phpunit/phpunit ~8.0(dev) · no Laravel, no framework coupling
Run / test / build
composer install
composer test # = phpunit, config in phpunit.xml
./vendor/bin/phpunit --filter SignInvoiceTest
This repo has no unit-test workflow (.github/workflows/ only has lint-pr.yaml). The suite also runs in
services/zatca-einvoicing CI, whose phpunit.xml includes vendor/salla/zatca/tests as the zatca
testsuite, so run that service's tests against your branch before tagging a release.
Architecture
src/GenerateQrCode.php—fromArray(Tag[])thentoTLV(),toBase64(), orrender($options, $file)(image via chillerlan).src/Tag.php— base TLV tag (tag id + UTF-8 value, packed binary in__toString).src/Tags/—Seller(1),TaxNumber(2),InvoiceDate(3),InvoiceTotalAmount(4),InvoiceTaxAmount(5),InvoiceHash(6),InvoiceDigitalSignature(7),PublicKey(8),CertificateSignature(9, simplified invoices only).src/GenerateCSR.php—GenerateCSR::fromRequest(CSRRequest)->initialize()->generate()returnsModels/CSR(secp256k1 private key + CSR). Writes a temp OpenSSL config tosys_get_temp_dir(), swaps the certificate-template string per environment, then deletes it.src/Models/CSRRequest.php— fluent CSR subject builder (make(),setUID(),setSerialNumber(),setInvoiceType(),setCurrentZatcaEnv(), …); throwsException/CSRValidationExceptionon the few checks it has. Those checks are shallow:setUID()checks only length 15 and a leading/trailing3(it does not check that the value is all digits), andsetCountryName()checks only length 2. ThesetOrganizationalUnitName()"11th digit is1, so OU must be 10 digits" rule never fires, becausestrpos($uid, '1', 10) == 1can never be true. Callers must enforce the ZATCA rules themselves: the UID (VAT number) is exactly 15 digits, starting and ending with3; if its 11th digit is1(a VAT group), the organizational unit name must be the 10-digit TIN of the group member.src/Models/InvoiceSign.php—(new InvoiceSign($xml, Certificate))->sign(): removesext:UBLExtensions,cac:Signature, and the QRAdditionalDocumentReference; hashes the C14N XML (SHA-256); ECDSA-signs; buildsUBLExtensions; rebuilds the QR; returnsModels/Invoice(getInvoice(),getHash(),getQRCode(),getCertificate()).src/Helpers/Certificate.php— wraps the CSID certificate + private key;getHash(),getPlainPublicKey(),getAuthorizationHeader()(Basic auth for the ZATCA API),getCertificateSignature(),getFormattedIssuerDN().src/Helpers/UXML.php— UXML wrapper;toTagsArray()reads UBL fields and returns the 8 or 9Tag[]for the QR.src/Helpers/UblExtension.php— builds the<ext:UBLExtensions>XAdES signature block.- Namespace
Salla\ZATCA\maps tosrc/; testsSalla\ZATCA\Test\map totests/(fixtures intests/Unit/files/).
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.
- 26d ago Changed · +14 lines · +800 tokens per session dc45fde16d4c
- 2mo ago First seen · 48 lines · 1,082 tokens per session scan A 0976deacd894
ZATCA CLAUDE.md is an instructions file published in the GitHub repository SallaApp/ZATCA (168 stars, last pushed 7d ago), licensed MIT. It adds 1,882 tokens to every session, about $0.0075 per session on Opus 5.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.
ZATCA CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ZATCA CLAUDE.mdSallaApp/ZATCA | Instructions file | 168 | 7d ago | MIT | A | 1,882 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |