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.
npx agentmods add skills/kpshinnik/docs_masked/docs-maskednpx skills add kpshinnik/docs_masked --skill docs-maskedgit clone --depth 1 https://github.com/kpshinnik/docs_maskedWrote 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/skills/kpshinnik/docs_masked/docs-masked)<a href="https://agentmods.dev/skills/kpshinnik/docs_masked/docs-masked"><img src="https://agentmods.dev/badge/skills/kpshinnik/docs_masked/docs-masked.svg" alt="Measured on agentmods" 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.00296 | $0.01714 |
| Opus 5 | $0.00148 | $0.00857 |
| Sonnet 5 | $0.00059 | $0.00343 |
| Haiku 4.5 | $0.00030 | $0.00171 |
Grade A, and why
docs-masked 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 6d 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 — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.
docs-masked — обезличивание документов до отправки в модель
Зачем
Когда в модель уходит договор или выгрузка клиентов, туда уходят и чужие персональные данные. Скилл превращает это в контролируемую операцию: данные заменяются тегами на локальной машине, наружу уходит текст без людей, а ответ модели восстанавливается обратно по сейфу, который тоже никуда не уезжает.
документ ──▶ маска ──▶ контроль утечки ──▶ модель ──▶ обратная подстановка
локально локально сеть локально
Порядок работы
Он всегда один и тот же — не пропускай шаги, даже если документ выглядит безобидно. Пропуск второго шага и есть та ситуация, ради которой скилл нужен.
1. Посмотреть, что внутри. Локально, без сети:
python3 -m pii_shield.cli scan договор.docx
Вывод показывает типы и количество находок. Если ожидал персональные данные, а находок нет — это повод разобраться, а не идти дальше.
2. Обезличить и убедиться, что чисто.
python3 -m pii_shield.cli mask договор.docx
Рядом появятся договор.masked.docx и договор.docx.vault.json (права 0600).
Команда сама прогоняет контроль утечки и завершается с ненулевым кодом, если
что-то осталось.
3. Отправить в модель только замаскированный текст. Либо полным кругом:
python3 -m pii_shield.cli ask договор.docx -p "Найди риски по срокам оплаты"
Эта команда сама маскирует, проверяет, отправляет и восстанавливает ответ.
Провайдер задаётся флагом --provider anthropic|openai|deepseek|ollama.
4. Восстановить. Для ответа модели подстановка уже сделана. Замаскированный файл возвращается к исходному виду так:
python3 -m pii_shield.cli unmask договор.masked.docx --vault договор.docx.vault.json
Если работаешь из кода, а не из терминала
Когда нужно вплести обезличивание в свой пайплайн, важно одно: между текстом и
сетью обязан стоять assert_clean.
from pii_shield import mask_text, assert_clean, unmask_text
r = mask_text(raw_text) # r.text — с тегами, r.vault — сейф
assert_clean(r.text) # LeakGuardError, если что-то осталось
answer = call_model(r.text) # наружу уходит только маска
final, unknown = unmask_text(answer, r.vault, mode="canonical")
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago First seen · 159 lines · 296 tokens per session scan A 527999ef097c
docs-masked is a skill published in the GitHub repository kpshinnik/docs_masked (15 stars, last pushed 18d ago), licensed MIT. It adds 296 tokens to every session and 1,714 once invoked, about $0.0015 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.
Other skills, from other repositories
pii-safe-documents
Processes sensitive local documents through PII Guard and a local Ollama model into a reversible redacted copy without allowing the non-open-source main agent to read the original, restoration map, or restored contents. Use whenever the user asks to de-identify or redact a private file, create a reversible sanitized…
docx
Read, create, and convert Microsoft Word (.docx) documents — extract text and tables, build reports from markdown/JSON, and export to PDF.
docx-editor
Full MS Office DOCX capabilities (read, edit, format, tables, rendering). Use for surgical manipulation or batch operations on .docx files.
dcf-model
Build discounted cash flow valuation workbooks in Excel.
comps-analysis
Build comparable-company valuation workbooks in Excel.
box
Box manages cloud files, sharing, search, and metadata.