Skill v1.0.0
currentAutomated scan100/100version: "1.0.0" name: extend description: Extends a project's privacy blocklist by one data type — at the user's request or after a hook or an observation has reported a candidate. Use for "add X to the blocklist", "this should be protected too", or when a privacy notice names a candidate type.
Extending the blocklist (extend)
Goal: add a data type cleanly to .claude/privacy/config.json — as a catalog type or as a custom entry with its own regex.
⛔ Never run the scripts yourself — guard.py/scan.py are reserved for the user (the CLI refuses LLM sessions, exit 3). Claude only edits the config file and suggests terminal commands.
Procedure
- Catalog first: Take the type IDs via Read from
${CLAUDE_PLUGIN_ROOT}/catalog/catalog.json
— does the type already exist? Then just add its ID to enabled (Edit on .claude/privacy/config.json). Done.
- Otherwise build a custom entry:
``json { "id": "short_english_slug", "label": "Human-readable label", "regex": "\\bPATTERN\\b", "mode": "block", "placeholder": "last4" } ``
placeholder:last4(placeholder****+ last 4 characters) or
label (full replacement with [<LABEL> REMOVED], the label uppercased).
- Optionally
keywords+windowif the pattern alone is too unspecific
(a match only counts near a keyword).
- Never write the plaintext into the config. The regex describes the
structure (e.g. H \d{3}-\d{6} HFA), not the concrete value. If the user states a concrete value, derive the structure from it and repeat the value itself only in masked form. If the value has no regex structure (names, individual numbers), recommend a fingerprint: the user runs python3 "${CLAUDE_PLUGIN_ROOT}/scripts/guard.py" fingerprint --label "…" --hint "…" themselves and enters the value concealed — only a salted hash is stored, yet the value is still recognized in any formatting (12/345/67890 as well as 1234567890). Do not pull the value into the chat for this.
- Test the regex — done by the user, only with synthetic examples:
Give the user the ready-made command: python3 "${CLAUDE_PLUGIN_ROOT}/scripts/guard.py" try "REGEX" "made-up example" Never suggest real values as test input.
- Self-test: Ask the user to run
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/guard.py" test (expected: still PASS).
- Offer: check existing files for the new type and clean them up
(skill privacy:audit).
Ongoing suggestions (behavioral rule)
Even without a hook report: if anything in documents, outputs, or user messages looks like an identifier worth protecting and is not covered by any active type (contract, customer, or case numbers, health data, …), proactively suggest adding it — briefly, with a masked example and a regex proposal. The user decides.