CommunityResearch & Data Analysisgithub.com

grahama1970/anonymize-data

Anonymize supported CSV, JSON, UTF-8 text, and SQLite files using an explicit policy through the oai-trial project. Use for anonymize data, pseudonymize exports, redact policy literals, or discover and explicitly approve fuzzy name aliases. The skill is a thin CLI/Docker interface, not another engine.

What is anonymize-data?

anonymize-data is a Antigravity agent skill that anonymize supported CSV, JSON, UTF-8 text, and SQLite files using an explicit policy through the oai-trial project. Use for anonymize data, pseudonymize exports, redact policy literals, or discover and explicitly approve fuzzy name aliases. The skill is a thin CLI/Docker interface, not another engine.

Works with~Claude Code~Codex CLI~CursorAntigravity
npx skills add https://github.com/grahama1970/agent-skills/tree/main/skills/anonymize-data

Installed? Explore more Research & Data Analysis skills: obra/superpowers, affaan-m/quarkus-verification, affaan-m/uspto-database · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Anonymize data

Operate the canonical oai-trial project. Do not duplicate its matcher, format adapters, verifier, schemas or error handling in this skill. The project's existing argparse CLI is intentionally retained; this wrapper adds no Python CLI or service.

Setup and main operation

ANONYMIZE_DATA_ROOT overrides the default primary checkout above. Setup needs uv and installs the project's declared development/discovery extras. Runtime operations need no Memory, provider credentials, LLM, network or database service.

./run.sh setup
./run.sh --input /data/exports --policy /data/policy.json --output /data/release
./run.sh anonymize --input /data/export.sqlite --policy /data/policy.json --output /data/release

Input is one .csv, .json, .txt or .sqlite file, or a directory of those files. Policy must be a separate regular file. Use a dedicated empty output directory outside the inputs. Originals are copied into a private temporary snapshot; successful output contains only corpus/ and report.json.

The existing bundle interface remains available:

./run.sh run --input /data/bundle --output /data/release
./run.sh verify --input /data/bundle --output /data/release
./run.sh inspect /data/release

A bundle contains policy.json and corpus/. The policy, canonical identity, protected-value rules, typed failures and report schema are owned by the project. Read its README.md, docs/ANONYMIZATION_SEMANTICS.md and schemas/report.schema.json when interpreting them. Do not declare success from an exit code alone: read the actual report, validate its readiness fields, and inspect output for the requested format. Corrupt or missing reports are not READY.

Optional RapidFuzz discovery: never automatic replacement

./run.sh discover --input /data/exports --policy /data/policy.json --output /data/work/review.json
./run.sh approve-discovery --input /data/exports --policy /data/policy.json \
  --review /data/work/review.json --approve CANDIDATE_ID --output /data/work/approved-policy.json
./run.sh --input /data/exports --policy /data/work/approved-policy.json --output /data/release

Discovery compares whole structured string values and whole text lines against policy entries of type name. It is not NLP span extraction or a general PII scanner. Defaults: similarity threshold 90, separation margin 5; configurable with --threshold and --margin. Ties, near ties, protected values, values containing digits or identifier punctuation such as @, /, _, and already-known literals are not proposed. Apostrophes, hyphens and periods are allowed in name-shaped text; similarity is never proof that two people are one.

Ask the operator to approve specific candidate IDs. Never approve from the similarity score alone. Approval re-derives the proposals against the current policy/corpus, rejects stale/edited reviews, and compiles an exact-match policy. Unapproved proposals never affect anonymization. release_ready: false is mandatory on discovery/approval receipts.

Review and approved-policy files contain raw names: keep them outside releases, logs and shared reports. They are created mode 0600 and never overwrite an existing file. Temporary snapshots default to the artifact drive; override with ANONYMIZE_DATA_WORK_DIR when needed.

Docker remains the standalone interface

From the project checkout:

docker build -t anonymization-trial .
docker run --rm anonymization-trial
# Optional discovery-enabled image; default image keeps the exact engine dependency-free.
docker build --build-arg INCLUDE_DISCOVERY=1 -t anonymization-trial:discovery .

Mount only the requested input/policy read-only and a dedicated output directory. The same project CLI runs inside the image; the evaluator does not need this skill. See the project's docs/DISCOVERY.md for complete mounted command examples.

Failure and proof boundary

The wrapper preserves project exit codes and sanitized error codes. Missing project/setup and wrong installed-package paths fail before processing. Use --help for the actual argument contract. Discovery is review material, not a release, anonymity guarantee, confidence probability, or human authorization.

./sanity.sh runs real positive, negative and adversarial CLI checks. The retained fixtures/agentic_eval.json repeats them and requires artifact readback. Prior trial qualification does not automatically qualify these post-trial extensions.

Representation rule (operator 2026-09-11)

PII must be matched against the value, not the string: before any JSON/SQL scalar is passed through unchanged, stringify it canonically (phone-shaped numbers in E.164 form) and run the policy match on the stringified form. Fixtures must include every PII class in every JSON scalar type. A phone number stored as an integer is the same phone number, including when the policy writes it as a formatted string such as 555-123-4567 and the corpus stores 5551234567. Leading-zero or float-precision lossy numeric conversions must fail closed unless a type-specific canonical rule proves safe equivalence. See $best-practices-skills "Value representation matrix".

Hardening lessons (do not relearn these the hard way)

The trial was disqualified because a phone stored as a JSON/SQLite integer passed the string-only matcher. The root cause was a process error: the acceptance check was authored from what the code did, not derived from the delivered spec. These rules exist so that class of miss cannot recur.

  1. Derive the check from the spec, not the code. policy.json lists the exact sensitive values. The correct acceptance check is "none of those values appears in the decoded output, in any representation" — read the values from the policy file, never a hand-authored list. Prove the check depends on the spec with a dependency probe (flip a policy value → the result must flip). Reference implementation: the project's scripts/spec_derived_check.py wired into scripts/verify.sh.

  2. The independent verifier must share no assumption with the transform. The original verifier had the same string-only blind spot as the producer, so nothing failed closed. The verification oracle must be representation-aware and independent: parse JSON (decode \uXXXX), expand numeric scalars to integer/decimal forms, NFC/NFD-normalize both sides, scan SQLite table+view cells AND sqlite_master DDL AND every header integer, and scan the whole released boundary including report.json — not just corpus/.

  3. The full representation class is a checklist, not a single bug. Each of these can carry a sensitive value past a naive matcher; the project fixes and retains a guard for every one: typed numeric scalars (int/float, scientific notation), SQLite BLOB (fail-closed), Unicode NFC/NFD, view reconstruction, freelist residue, hostile-DB schema (expression/partial indexes, non-deterministic views, computed DEFAULTs), schema-DDL literals, and persistent header integers. See the project's docs/SECURITY_REMEDIATION.md for the full table.

  4. Prove it through the real Docker path, deterministically. Verification must be a committed script that builds the image, runs the brief's exact commands, and reads back the released bytes with hard PASS/FAIL exits — not agent prose. Reference: security/docker_brief_contract.py (build + both brief commands + representation-aware leak scan + input precondition) and security/docker_hardening_matrix.py (adversarial holes through docker run). Record the git commit and built image id.

  5. Scope honestly. Deterministic public-namespace pseudonyms disclose equality/frequency and offer no external-linkage resistance; the run report states this in key_mode and does_not_establish. A policy value equal to a mandatory SQLite format constant is a degenerate input, not real PII; the pipeline fails closed on it and that residue is documented as scoped.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

grahama1970/acceptance-contract

Turn a client brief, zip bundle, directory, or single requirements file into a typed acceptance-contract bundle with extracted requirements, acceptance checks, open questions, an immutable-goal draft, and a create-report-backed decision report. Use when users say acceptance contract, brief to requirements, freeze the goal, create immutable goal, amend immutable goal, build a Battle requirements bundle, or extract requirements from this bundle.

grahama1970/agent-ecosystem

Canonical map and shared contracts for the agent-governance ecosystem: the pi.receipt_envelope.v1 boundary envelope, the component graph, and the rules for which component owns which schema. Use when wiring a skill or extension into the shared receipt world, when asking how shame, triage-error, tau, ask, project-watchdog, ops-herdr, ponytail, and Memory fit together, or when validating an envelope.

grahama1970/agentic-evals

Agentic evaluation of skills using multi-trial fixtures, deterministic command assertions, trajectory checks, safety constraints, and evidence-backed readiness scoring. Use when users ask for agentic evals, multi-trial skill evaluation, skill trajectory validation, or readiness scoring for a skill workflow.

grahama1970/agent-inbox

File-based inter-agent messaging with headless dispatch. Check inbox, send bugs/requests to other projects, automatically spawn headless agents to fix bugs, and track progress via task-monitor.

grahama1970/agents-registry

Generate and query the centralized agent identity registry. Scans .pi/agents/*/AGENTS.md, parses frontmatter, outputs agents-registry.json and optionally syncs to /memory for semantic search.

grahama1970/agent-status

Artifact-driven status surfaces for long-running project-agent work. Maintains status.json, events.jsonl, proof manifests, and a stale-aware STATUS.html so humans can tell where the agent is, what passed, what is still unproven, and what decision or action is next — without dashboard theater.

grahama1970/align

Round-based context alignment before execution. Use when the human, project agent, WebGPT, scillm, ask, dogpile, memory, or project-knowledge may each hold different facts about a task; especially before ambiguous design, infographic, product workflow, high-stakes implementation, plan-iterate, project-infographic, or multi-review work.

grahama1970/analytics

Flexible data science analytics for any dataset. Auto-discovers schema, recommends charts, exports to create-figure. Works with JSONL, JSON, CSV from any source.

grahama1970/analyze-chatterbox-emotions

Evaluate generated Chatterbox voice files as voice-quality artifacts: affect match, arousal/valence proxies, pause placement, intelligibility inputs, clipping, loudness, and discontinuity flags. Use when reviewing Chatterbox emotional tags, pauses, Turbo/base affect delivery, Persona Dream utterance renders, or whether generated speech matches an intended product-facing affect.

grahama1970/analyze-elf

Reverse-engineer features from ELF binaries. Extracts CLI commands, state machines, protocols, Zod schemas, and data models. Automatically generates a /create-walkthrough prosecution brief with Mermaid diagrams. Uses /treesitter for AST analysis of bundled JS/TS source.

grahama1970/animation-vocabulary

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.

grahama1970/anvil

Heavy-duty "No-Vibes" debugging and hardening orchestrator. Use this for complex, stubborn bugs where `review-code` has failed, or for "Red Teaming" (hardening) a codebase. Runs multiple agents in parallel (Thunderdome) using git worktree isolation.

grahama1970/apple-design

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

grahama1970/argue

Multi-persona structured debate orchestrator. Personas research via /dogpile, consult colleagues via /ask, and argue toward nuanced synthesis on complex questions.

grahama1970/arxiv

Search arXiv for papers and extract knowledge into memory. Use `search` to find papers, `learn` to extract knowledge.

grahama1970/ask

Use when the user asks to query project memory, ask an oracle, use supported browser-backed reviewers, run Tau roundtable/single-handler workflows, ask Pi-native subagents from within Pi, run persona/deep-review workflows, generate image prompts, check OS/project health through composed skills, or run an ask DAG. This skill is the executable /ask runtime; do not replace it with an informal subagent, plain web search, or hand-written review; inside Pi, explicit Pi-native subagent targets are routed through the pi-subagents tool as an Ask target type.

grahama1970/assess

Step back and critically reassess project state. Use when asked to "assess", "step back", "fresh eyes", "check alignment", "sanity check", "health check", "prune documentation", or "evaluate what's working". Offers documentation pruning and doc-code alignment analysis. Offer to run after major changes (don't auto-run).

grahama1970/assistant

Shared GPT + classifier inference gateway for persona monitor tasks. Routes validation and classification through a 4-tier cascade: heuristic → classifier → local GPT → scillm.

grahama1970/assistant-lab

Self-improvement workbench for /assistant. All the tools needed to diagnose, train, evaluate, and promote models in a continuous loop. The "warm pond" where /assistant evolves its own inference stack.

grahama1970/batch-quality

Pre-flight validation and quality gates for batch LLM operations. ACTUALLY tests samples through LLM before burning tokens. Uses SPARTA contracts for DuckDB validation queries. Integrates with task-monitor for enforced quality gates.

Related Skills