Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
glebis avatar

Session Anonymizer

  • 126 installs
  • 339 repo stars
  • Updated August 4, 2026
  • glebis/claude-skills

Scrub PII, tokens, and customer identifiers from Claude Code session logs before sharing transcripts with reviewers, vendors, or support forums.

About

The session-anonymizer skill teaches Claude Code to sanitize coding session transcripts by removing or masking PII, API keys, and other sensitive strings so teams can share debugging history externally while meeting security and compliance expectations.

  • Redacts secrets, emails, and sensitive identifiers
  • Prepares session logs for safe external sharing
  • Supports compliance-friendly transcript export
  • Reduces accidental credential leakage from agent history

Session Anonymizer by the numbers

  • 126 all-time installs (skills.sh)
  • Ranked #935 of 2,203 Security skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/glebis/claude-skills --skill session-anonymizer

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs126
repo stars339
Last updatedAugust 4, 2026
Repositoryglebis/claude-skills

What it does

Scrub PII, tokens, and customer identifiers from Claude Code session logs before sharing transcripts with reviewers, vendors, or support forums.

Files

SKILL.mdMarkdownGitHub ↗

Therapy Anonymizer

Three-layer PII detection and anonymization for therapy session transcripts. Supports Russian and English. Fully local by default — no data leaves the machine.

Architecture

Three detection layers run in sequence, each catching what others miss:

LayerToolCatchesSizeSpeed
1NatashaRussian names, locations, organizations27 MBinstant
2OpenAI Privacy Filter (opf)Phones, accounts, addresses, emails2.8 GB~1.5s
3Ollama LLMMedications, dates, contextual IDs2.5-7 GB~10s

Spans from all layers are merged, overlaps resolved, and a unified redacted output is produced.

Prerequisites

pip install natasha setuptools pymorphy2-dicts-ru
pip install 'opf @ git+https://github.com/openai/privacy-filter.git'
ollama pull qwen3:4b

Each layer is optional — the script gracefully skips unavailable layers and warns.

Usage

Single file

python3 ~/.claude/skills/therapy-anonymizer/scripts/anonymize.py session.txt

Stdin pipe

cat session.txt | python3 ~/.claude/skills/therapy-anonymizer/scripts/anonymize.py

Batch processing

python3 ~/.claude/skills/therapy-anonymizer/scripts/anonymize.py --batch ~/sessions/ -o ~/sessions_clean/

JSON report

python3 ~/.claude/skills/therapy-anonymizer/scripts/anonymize.py session.txt --json

Pseudonyms instead of tags

python3 ~/.claude/skills/therapy-anonymizer/scripts/anonymize.py session.txt --pseudonyms

Select layers / model

# Fast — Natasha only
python3 ~/.claude/skills/therapy-anonymizer/scripts/anonymize.py session.txt --layers natasha

# LLM only — maximum coverage
python3 ~/.claude/skills/therapy-anonymizer/scripts/anonymize.py session.txt --layers ollama --model gemma4:e2b

Encrypt output (AES-256)

python3 ~/.claude/skills/therapy-anonymizer/scripts/anonymize.py session.txt -o clean.txt --encrypt "password"

Invoking from Claude Code

To anonymize text already in context, pipe it through the script:

echo '<text>' | python3 ~/.claude/skills/therapy-anonymizer/scripts/anonymize.py --json

For files, pass the path directly. Always recommend manual review after automated anonymization.

Limitations

  • Contextual identifiers ("the only red-haired architect in Kostroma") are NOT detected by any automated tool
  • OPF is English-focused — Russian coverage is partial
  • Medications detected only by Layer 3 (requires Ollama)
  • Does not assess re-identification risk from combinations of non-PII fields

Guardrails

  • NEVER send raw transcripts to cloud services
  • Cloud verification only on already-anonymized text
  • Always recommend manual review for therapy data
  • Never log original PII values

Related skills

Securitycompliancesecretsaudit

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.