Audit

From glebis/claude-skills · View interactive version

Audit is an AI agent skill from the GitHub repository glebis/claude-skills. Run a corpus-scale, STATS-ONLY PII audit over a folder of session transcripts LOCALLY and produce an aggregate report — counts by type and by layer, the per-session redaction-rate distribution, document lengths, and a coarse residual proxy. Use when the user says "audit my sessions", "scan folder fo

How to use this skill

Skill file

confide:audit — corpus-scale, stats-only PII audit

Measure how much PII lives across a whole folder of sessions, without ever exposing any

of it. The audit runs the layered LOCAL detector stack from shared/confide_core.py

(regex → Natasha → local LLM) over each file and emits only aggregates. This mirrors

the real_session_eval privacy contract: read text only in-process, emit counts.

Privacy invariants (do not violate)

counts and rates — never a transcript substring, never a detected PII value.

The original path/name is never written or printed. On an unreadable file, only the

index + exception class name is recorded.

with a cloud agent or pasted into a chat. The PII stays on the machine.

What it reports

(min / median / mean / max)

corpus, a leakage signal on a GREEN corpus.

Run it

Point it at a folder (recurses, processes every .md/.txt; skips confide's own

*.green.md / *.stats.json outputs):

python3 skills/audit/scripts/audit.py FOLDER

Options:

Use --layers regex for a fully offline, deterministic pass (no models/network).

Writes the markdown + json report (and optional HTML) and prints the aggregate summary —

all counts only.

RED vs GREEN

whether redaction is holding at scale.

After running

  1. Report the aggregate summary (file count, span totals by type/layer, redaction-rate

distribution, residual proxy) — never paste PII.

  1. If residual is non-trivial on a GREEN corpus, point the user at confide:anon to

re-redact and confide:red to probe re-identification risk.

Setup

Layer availability (Natasha, local LLM via Ollama) comes from config — run

confide:setup if they aren't installed. --layers regex always works offline.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.