Presidio is an open-source privacy framework that finds sensitive personal information in text, images, and structured data, then redacts, masks, or anonymizes it. Developers use it to build customizable data-protection and de-identification pipelines.
Borrowing it
Nothing to install: this file belongs to data-privacy-stack/presidio. 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/data-privacy-stack/presidio/main/AGENTS.mdgit clone --depth 1 https://github.com/data-privacy-stack/presidioWrote 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/data-privacy-stack/presidio/agents-md)<a href="https://agentmods.dev/instructions/data-privacy-stack/presidio/agents-md"><img src="https://agentmods.dev/badge/instructions/data-privacy-stack/presidio/agents-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/data-privacy-stack/presidio/agents-md"><img src="https://agentmods.dev/badge/instructions/data-privacy-stack/presidio/agents-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.01478 | $0.01478 |
| Opus 5.5 | $0.00591 | $0.00591 |
| Sonnet 5.5 | $0.00296 | $0.00296 |
| Haiku 4.5 | $0.00148 | $0.00148 |
Grade A, and why
presidio AGENTS.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 today.
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 — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Presidio — Agent Guidelines
Presidio is a Python SDK for detecting (presidio-analyzer) and anonymizing (presidio-anonymizer) PII in text and images, plus CLI, structured-data, and image-redaction components. It is a widely used library: users depend on current detection behavior, and configuration files written years ago must keep working. Correctness and backward compatibility outrank cleverness.
The review-side versions of these rules — which the Copilot PR review agent
also enforces — live in .github/copilot-instructions.md and
.github/instructions/*.instructions.md. Follow them at authoring time so the
review finds nothing.
Working in this repo
cd presidio-analyzer # or presidio-anonymizer, presidio-cli, ...
uv sync --locked --all-extras --group dev
uv run python -m spacy download en_core_web_lg # analyzer/CLI only
uv run pytest -xvv
uv run ruff check . && uv run ruff format .
- Python
>=3.11,<3.15; code must run on every version in range. - Dependencies are managed with uv, not pip/Poetry. If you touch a
package's
pyproject.tomldependencies, runuv lockin that package and commit the updateduv.lockin the same change — CI fails on drift. - Do not edit
CHANGELOG.md; release entries are generated from merged PRs. - Never log PII values (
entity.text) — only entity types and positions. - Modules that process records are stateless; do not add state.
- Terminology: "threshold", not "cutoff"; ISO 639-1 language codes everywhere.
Adding a PII recognizer
The full rulebook — score bands, context-word rules, validation-hook
semantics, the configuration-path test template, and the test-quality bar —
is .github/instructions/recognizers.instructions.md. Read it before
starting; those rules apply at authoring time, not just in review. The
workflow, in order:
- Place and name it under
predefined_recognizers/: full lowercase country name for new country directories (south_africa, notza; don't imitate the pre-existing short formsus/uk/thai), orgeneric/,nlp_engine_recognizers/,ner/,third_party/as appropriate. - Use ISO 639-1 language codes (
kofor Korean, neverkr) — a mismatch loads nothing, silently. - Make the constructor loader-compatible: accept the YAML loader's
kwargs (
name,supported_entity,context, ...) and forward them to the base class, or the recognizer crashes the whole registry the moment a user enables it. - Design the pattern for accuracy first — this is the top review priority: as specific as the format allows, score calibrated to the pattern alone, unambiguous context words, the correct checksum if one exists (and none invented if it doesn't), and the pattern's source documented in the docstring, preferably an official specification.
- Register it everywhere: exports in
predefined_recognizers/__init__.pyand the country/category__init__.py; an entry inconf/default_recognizers.yaml(country-specific shipsenabled: false); a row indocs/supported_entities.md. - Write the configuration-path test — the most-missed step and the one
that matters most: enable the recognizer in a YAML config, load it through
RecognizerRegistryProvider, and assert detection (template in the instructions file). Non-English recognizers must set the top-levelsupported_languagesin the test config — it defaults to["en"]and silently filters everything else.
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.
- today Changed d0f464949799
- 1mo ago First seen · 117 lines · 1,478 tokens per session scan A 8023c1fec5f7
presidio AGENTS.md is an instructions file published in the GitHub repository data-privacy-stack/presidio (11,528 stars, last pushed yesterday), licensed MIT. It adds 1,478 tokens to every session, about $0.0059 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-31.
Other instructions, from other repositories
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).
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.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.