Trace-Sanitizer Skill
THE RULE
Every trace-sanitizer command outputs next_steps. FOLLOW THEM.
Do not memorize the flow. Do not skip steps. Do not improvise.
Run the command -> read the output -> follow next_steps. That's it.
The CLI tracks your stage (1-3: configure -> review -> confirmed).
Getting Started
Run trace-sanitizer status (or trace-sanitizer prep for full details) and follow the next_steps.
Output Format
trace-sanitizer prep, trace-sanitizer config, trace-sanitizer status, and trace-sanitizer confirm output pure JSON
trace-sanitizer export outputs human-readable text followed by ---TRACE_SANITIZER_JSON--- and a JSON block
- Always parse the JSON and act on
next_steps
Key fields:
stage / stage_number / total_stages -- where you are
next_steps -- follow these in order
next_command -- the single most important command to run next (null if user input needed first)
PII Audit (Stage 2)
After trace-sanitizer export, follow the next_steps in the JSON output. The flow is:
- Ask the user their full name -- then grep the export for it
- Run the pii_commands from the JSON output and review results with the user
- Ask the user what else to look for -- company names, client names, employer names, private URLs, other people's names, custom domains, account/org names (Vercel teams, Supabase projects), geographic identifiers, social profiles (LinkedIn, GitHub linked to real names), and any hardware identifiers
- Deep manual scan -- sample ~20 sessions (beginning, middle, end) and look for anything sensitive the regex missed. Check for resume/CV content, browser history, Discord data, and system forensics that could defeat anonymization
- Fix and re-export if anything found:
trace-sanitizer config --redact "string" then trace-sanitizer export
- Run
trace-sanitizer confirm with text attestations -- pass --full-name, --attest-full-name, --attest-sensitive, and --attest-manual-scan. It runs PII scan, verifies attestations, shows project breakdown, and confirms the export.
- Donate -- the export folder contains trajectories.jsonl + CDLA-Permissive-2.0 license. Zip the folder, upload to Google Drive, and share with donate@traced.run
Commands Reference
trace-sanitizer status # Show current stage and next steps (JSON)
trace-sanitizer prep # Discover projects (JSON)
trace-sanitizer prep --source all # All sources (Claude + Codex + Gemini + OpenCode)
trace-sanitizer prep --source claude # Only Claude Code sessions
trace-sanitizer prep --source codex # Only Codex sessions
trace-sanitizer prep --source gemini # Only Gemini CLI sessions
trace-sanitizer prep --source opencode # Only OpenCode sessions
trace-sanitizer confirm --full-name "NAME" --attest-full-name "..." --attest-sensitive "..." --attest-manual-scan "..." # Scan PII, verify attestations, confirm export (JSON)
trace-sanitizer confirm --file /path/to/file.jsonl --full-name "NAME" --attest-full-name "..." --attest-sensitive "..." --attest-manual-scan "..." # Confirm a specific export file
trace-sanitizer list # List all projects with exclusion status
trace-sanitizer list --source all # List all sources
trace-sanitizer list --source codex # List only Codex projects
trace-sanitizer config # Show current config
trace-sanitizer config --source all # REQUIRED source scope: claude|codex|gemini|opencode|all
trace-sanitizer config --exclude "a,b" # Add excluded projects (appends)
trace-sanitizer config --redact "str1,str2" # Add strings to redact (appends)
trace-sanitizer config --redact-usernames "u1,u2" # Add usernames to anonymize (appends)
trace-sanitizer config --confirm-projects # Mark project selection as confirmed
trace-sanitizer export # Export locally
trace-sanitizer export --source all # Export all sources
trace-sanitizer export --source codex # Export only Codex sessions
trace-sanitizer export --source claude # Export only Claude Code sessions
trace-sanitizer export --source gemini # Export only Gemini CLI sessions
trace-sanitizer export --source opencode # Export only OpenCode sessions
trace-sanitizer export --all-projects # Include everything (ignore exclusions)
trace-sanitizer export --no-thinking # Exclude extended thinking blocks
trace-sanitizer export -o /path/to/file.jsonl # Custom output path
trace-sanitizer update-skill claude # Install/update the trace-sanitizer skill for Claude Code
Gotchas
--exclude, --redact, --redact-usernames APPEND -- they never overwrite. Safe to call repeatedly.
- Source selection is REQUIRED before export -- explicitly set
trace-sanitizer config --source claude|codex|gemini|opencode|all (or pass --source ... on export).
trace-sanitizer prep outputs pure JSON -- parse it directly.
- PII audit is critical -- automated redaction is not foolproof.
- Large exports take time -- 500+ sessions may take 1-3 minutes. Use a generous timeout.
Prerequisite
command -v trace-sanitizer >/dev/null 2>&1 && echo "trace-sanitizer: installed" || echo "NOT INSTALLED -- run: pip install trace-sanitizer"
1---
2name: trace-sanitizer
3description: >
4 Export Claude Code, Codex, Gemini CLI, and OpenCode conversation history for TRACED.
5 Use when the user asks about exporting conversations, donating to TRACED,
6 configuring trace-sanitizer, reviewing PII/secrets in exports, or managing their dataset.
7allowed-tools: Bash(trace-sanitizer *), Bash(pip install trace-sanitizer*)
8metadata:
9 source: https://skillmd.com/skills/aibot88/trace-sanitizer
10---
11
12<!-- trace-sanitizer-begin -->
13
14# Trace-Sanitizer Skill
15
16## THE RULE
17
18**Every `trace-sanitizer` command outputs `next_steps`. FOLLOW THEM.**
19
20Do not memorize the flow. Do not skip steps. Do not improvise.
21Run the command -> read the output -> follow `next_steps`. That's it.
22
23The CLI tracks your stage (1-3: configure -> review -> confirmed).
24
25## Getting Started
26
27Run `trace-sanitizer status` (or `trace-sanitizer prep` for full details) and follow the `next_steps`.
28
29## Output Format
30
31- `trace-sanitizer prep`, `trace-sanitizer config`, `trace-sanitizer status`, and `trace-sanitizer confirm` output pure JSON
32- `trace-sanitizer export` outputs human-readable text followed by `---TRACE_SANITIZER_JSON---` and a JSON block
33- Always parse the JSON and act on `next_steps`
34
35Key fields:
36- `stage` / `stage_number` / `total_stages` -- where you are
37- `next_steps` -- follow these in order
38- `next_command` -- the single most important command to run next (null if user input needed first)
39
40## PII Audit (Stage 2)
41
42After `trace-sanitizer export`, follow the `next_steps` in the JSON output. The flow is:
43
441. **Ask the user their full name** -- then grep the export for it
452. **Run the pii_commands** from the JSON output and review results with the user
463. **Ask the user what else to look for** -- company names, client names, employer names, private URLs, other people's names, custom domains, account/org names (Vercel teams, Supabase projects), geographic identifiers, social profiles (LinkedIn, GitHub linked to real names), and any hardware identifiers
474. **Deep manual scan** -- sample ~20 sessions (beginning, middle, end) and look for anything sensitive the regex missed. Check for resume/CV content, browser history, Discord data, and system forensics that could defeat anonymization
485. **Fix and re-export** if anything found: `trace-sanitizer config --redact "string"` then `trace-sanitizer export`
496. **Run `trace-sanitizer confirm` with text attestations** -- pass `--full-name`, `--attest-full-name`, `--attest-sensitive`, and `--attest-manual-scan`. It runs PII scan, verifies attestations, shows project breakdown, and confirms the export.
507. **Donate** -- the export folder contains trajectories.jsonl + CDLA-Permissive-2.0 license. Zip the folder, upload to Google Drive, and share with donate@traced.run
51
52## Commands Reference
53
54```bash
55trace-sanitizer status # Show current stage and next steps (JSON)
56trace-sanitizer prep # Discover projects (JSON)
57trace-sanitizer prep --source all # All sources (Claude + Codex + Gemini + OpenCode)
58trace-sanitizer prep --source claude # Only Claude Code sessions
59trace-sanitizer prep --source codex # Only Codex sessions
60trace-sanitizer prep --source gemini # Only Gemini CLI sessions
61trace-sanitizer prep --source opencode # Only OpenCode sessions
62trace-sanitizer confirm --full-name "NAME" --attest-full-name "..." --attest-sensitive "..." --attest-manual-scan "..." # Scan PII, verify attestations, confirm export (JSON)
63trace-sanitizer confirm --file /path/to/file.jsonl --full-name "NAME" --attest-full-name "..." --attest-sensitive "..." --attest-manual-scan "..." # Confirm a specific export file
64trace-sanitizer list # List all projects with exclusion status
65trace-sanitizer list --source all # List all sources
66trace-sanitizer list --source codex # List only Codex projects
67trace-sanitizer config # Show current config
68trace-sanitizer config --source all # REQUIRED source scope: claude|codex|gemini|opencode|all
69trace-sanitizer config --exclude "a,b" # Add excluded projects (appends)
70trace-sanitizer config --redact "str1,str2" # Add strings to redact (appends)
71trace-sanitizer config --redact-usernames "u1,u2" # Add usernames to anonymize (appends)
72trace-sanitizer config --confirm-projects # Mark project selection as confirmed
73trace-sanitizer export # Export locally
74trace-sanitizer export --source all # Export all sources
75trace-sanitizer export --source codex # Export only Codex sessions
76trace-sanitizer export --source claude # Export only Claude Code sessions
77trace-sanitizer export --source gemini # Export only Gemini CLI sessions
78trace-sanitizer export --source opencode # Export only OpenCode sessions
79trace-sanitizer export --all-projects # Include everything (ignore exclusions)
80trace-sanitizer export --no-thinking # Exclude extended thinking blocks
81trace-sanitizer export -o /path/to/file.jsonl # Custom output path
82trace-sanitizer update-skill claude # Install/update the trace-sanitizer skill for Claude Code
83```
84
85## Gotchas
86
87- **`--exclude`, `--redact`, `--redact-usernames` APPEND** -- they never overwrite. Safe to call repeatedly.
88- **Source selection is REQUIRED before export** -- explicitly set `trace-sanitizer config --source claude|codex|gemini|opencode|all` (or pass `--source ...` on export).
89- **`trace-sanitizer prep` outputs pure JSON** -- parse it directly.
90- **PII audit is critical** -- automated redaction is not foolproof.
91- **Large exports take time** -- 500+ sessions may take 1-3 minutes. Use a generous timeout.
92
93## Prerequisite
94
95`command -v trace-sanitizer >/dev/null 2>&1 && echo "trace-sanitizer: installed" || echo "NOT INSTALLED -- run: pip install trace-sanitizer"`
96
97<!-- trace-sanitizer-end -->