distributions/claude/skills/shell-history-hygiene/SKILL.md
Dry-run audit + targeted cleanup for shell command history. Currently wraps atuin (stats today, prune, dedup with dated preview artifacts); extensible to zsh/bash/mcfly backends. Always previews before applying — apply commands are echoed for the human to run, never auto-executed. Triggers on "/shell-history-hygiene", "audit atuin", "audit shell history", "clean shell history", "atuin prune", "atuin dedup", "shell history hygiene", "history cleanup". Replaces ad-hoc one-liners (e.g. `... | tee cmd > file.txt` which wrote two files, swallowed dedup output, and left a junk `cmd` file).
npx skillsauth add organvm-iv-taxis/a-i--skills shell-history-hygieneInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
atuin stats / prune / dedup one-liner and asked for review or improvementatuin stats today, atuin history prune, atuin history dedup.zsh_history line dedup, size limits.bash_history line dedupThis skill currently ships the atuin backend at scripts/atuin-audit.sh. Add sibling scripts under scripts/ as backends are added.
The audit is dry-run only. It produces three things:
atuin stats today + counts.The skill never runs the apply commands itself. Separation of audit from apply is deliberate — it's the kill-switch against accidental history destruction.
${CLAUDE_SKILL_ROOT}/scripts/atuin-audit.sh # dedup --before defaults to today
${CLAUDE_SKILL_ROOT}/scripts/atuin-audit.sh 2026-05-01 # dedup --before <date>
If ${CLAUDE_SKILL_ROOT} isn't resolved by the harness, use the absolute path:
/Users/4jp/Code/organvm/a-i--skills/skills/tools/shell-history-hygiene/scripts/atuin-audit.sh
Preview artifacts land alongside the script:
atuin-prune-preview-YYYY-MM-DD.txtatuin-dedup-preview-YYYY-MM-DD.txtDated filenames preserve a trail — re-runs don't clobber prior previews.
| Headline | Meaning |
|---|---|
| prune entries: N | atuin's own "Found N entries to prune" — structural no-ops (empty commands, repeated clear, paste-glitch duplicates). Almost always safe to prune. |
| dedup duplicates: M | atuin's own "Found M duplicates to delete" — exact-string repeats older than --before. Inspect a sample before applying; large M (10K+) is normal across months of history. |
| (N lines in preview, multi-line commands expand) | The preview file may have more lines than the entity count because multi-line commands (HEREDOCs, for loops) take multiple lines each. Trust the headline number, use the line count for file-size context. |
After the human eyeballs the preview and approves:
atuin history prune # apply prune
atuin history dedup --before "$BEFORE_DATE" --dupkeep 1 # apply dedup (keep 1 copy per duplicate string)
Run in that order. Prune first removes the structural no-ops; dedup then collapses the remaining exact-string repeats. Reverse order works but does redundant scanning.
--dupkeep 0 is destructive (removes ALL copies). Never recommend it — --dupkeep 1 is the right default.
set -euo pipefail, never invokes apply commands.atuin not on PATH — script exits 1 with clear error. No partial action.wc -l) so the count is accurate even when multi-line commands inflate the line total.--before date in the future — atuin accepts it; dedup just considers all history. Inspect preview before applying.Triggered by a 2026-05-21 review of an ad-hoc one-liner that had a tee cmd > file.txt bug — wrote two files, swallowed dedup output. The fix evolved into a dated-preview script, then into this skill so the workflow lives somewhere discoverable rather than as scratch material under ~/_dot-config/scratch/. Per Rule #34 ("merge into ideal form") the function clarified beyond scratch/'s purpose, so it migrated here.
Original artifact birthplace: ~/_dot-config/scratch/atuin-audit.sh (worktree commit 6d6ef39 on _dot-config main). This skill's scripts/atuin-audit.sh is the canonical-from-here copy.
development
Optimize resumes and CVs for impact, ATS compatibility, and audience targeting. Supports multiple formats (chronological, functional, hybrid), accomplishment framing (STAR/XYZ), and tailoring for specific roles. Triggers on resume review, CV update, job application prep, or career document requests.
testing
Transfer context between AI agent sessions with structured handoff protocols, state serialization, and decision log preservation. Covers multi-agent coordination, context compression, and continuity patterns. Triggers on agent handoff, session transfer, or multi-agent continuity requests.
tools
Craft compelling fiction and creative nonfiction with attention to structure, voice, prose style, and revision. Supports short stories, novel chapters, essays, and hybrid forms. Triggers on creative writing, fiction writing, story craft, prose style, or literary technique requests.
devops
Transform AI conversations and chat transcripts into publishable content including blog posts, documentation, tutorials, and knowledge base entries. Covers extraction, restructuring, and editorial refinement. Triggers on conversation-to-content, transcript processing, or chat-to-doc requests.