| name | codeclaw |
| description | Export Claude Code and Codex conversation history to Hugging Face as structured training data. Use when the user asks about exporting conversations, uploading to Hugging Face, configuring codeclaw, reviewing PII/secrets in exports, or managing their dataset.
|
| allowed-tools | Bash(codeclaw *), Bash(huggingface-cli login *), Bash(pip install codeclaw*), Bash(grep *) |
codeclaw Skill
THE RULE
Every codeclaw 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-4: auth -> configure -> review -> done).
codeclaw export (push) is gated -- you must run codeclaw confirm first or it will refuse.
Getting Started
Run codeclaw status (or codeclaw prep for full details) and follow the next_steps.
Output Format
codeclaw prep, codeclaw config, codeclaw status, and codeclaw confirm output pure JSON
codeclaw export outputs human-readable text followed by ---CODECLAW_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 3)
After codeclaw export --no-push, 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, private URLs, other people's names, custom domains
- Deep manual scan -- sample ~20 sessions (beginning, middle, end) and look for anything sensitive the regex missed
- Fix and re-export if anything found:
codeclaw config --redact "string" then codeclaw export --no-push
- Run
codeclaw 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 unlocks pushing.
- Push only after explicit user confirmation:
codeclaw export --publish-attestation "User explicitly approved publishing to Hugging Face."
Commands Reference
codeclaw status
codeclaw prep
codeclaw setup
codeclaw prep --source both
codeclaw prep --source codex
codeclaw prep --source claude
codeclaw confirm --full-name "NAME" --attest-full-name "..." --attest-sensitive "..." --attest-manual-scan "..."
codeclaw confirm --file /path/to/file.jsonl --full-name "NAME" --attest-full-name "..." --attest-sensitive "..." --attest-manual-scan "..."
codeclaw list
codeclaw projects
codeclaw projects --connect "proj1,proj2"
codeclaw projects --use-current
codeclaw diff
codeclaw stats --skill
codeclaw list --source both
codeclaw list --source codex
codeclaw config
codeclaw config --repo user/my-personal-codex-data
codeclaw config --source both
codeclaw config --exclude "a,b"
codeclaw config --redact "str1,str2"
codeclaw config --redact-usernames "u1,u2"
codeclaw config --confirm-projects
codeclaw config --encryption status
codeclaw export --publish-attestation "..."
codeclaw export --no-push
codeclaw export --source both --no-push
codeclaw export --source codex --no-push
codeclaw export --source claude --no-push
codeclaw export --dry-run
codeclaw export --all-projects
codeclaw export --no-thinking
codeclaw export -o /path/to/file.jsonl
codeclaw watch --status
codeclaw watch --logs --follow
codeclaw watch --monitor --follow
codeclaw watch --pause
codeclaw watch --resume
codeclaw watch --switch-project "project"
codeclaw console --source both
codeclaw
codeclaw tui --source both
codeclaw update-skill claude
Gotchas
- Never run bare
huggingface-cli login -- it's interactive and will hang. Always use --token.
--exclude, --redact, --redact-usernames APPEND -- they never overwrite. Safe to call repeatedly.
- Source selection is REQUIRED before export -- explicitly set
codeclaw config --source claude|codex|both (or pass --source ... on export).
codeclaw prep outputs pure JSON -- parse it directly.
- Always export with
--no-push first -- review before publishing.
codeclaw export (push) requires codeclaw confirm first -- it will refuse otherwise. Re-exporting with --no-push resets this.
- 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 codeclaw >/dev/null 2>&1 && echo "codeclaw: installed" || echo "NOT INSTALLED -- run: pip install codeclaw"