atuin-history-cleanup
Use when auditing Atuin shell history for noisy duplicates or high-confidence typo/retry pairs and when preparing safe preview-first cleanup steps without editing the SQLite database directly.
What this skill does
# Atuin History Cleanup ## Overview Audit first, delete second. Use the bundled script to summarize duplicate pressure and high-confidence typo-like retries. For typo cleanup, prefer the transactional `cleanup-typos` command so the flow snapshots `history.db`, uploads the current host history store, deletes candidates, verifies the result, and rolls back automatically if verification fails. Read `references/atuin-cli.md` when you need the exact delete, dedup, or prune behavior. ## Use When - Reviewing a noisy Atuin `history.db` before removing anything. - Estimating how much `atuin history dedup` would remove while still keeping the newest repeated entries. - Looking for typo-like retries such as `gti status` followed by `git status`. - Running a transactional typo cleanup with backup, verification, and rollback. - Rechecking an Atuin cleanup plan without mutating the database directly. ## Guardrails - Always run `atuin info` and the audit script before any destructive step. - Treat duplicate cleanup as global. `atuin history dedup` is not a single-command delete tool. - `atuin search --delete` is query-wide and follows Atuin's active search semantics. Do not use it manually for typo cleanup. - `cleanup-typos` is the only approved automation path for typo deletion. It may use `atuin search --delete` only after a strict uniqueness gate; any ambiguous match must fall back to the interactive inspector path. - `cleanup-typos` must snapshot `history.db` before deletion and delay the final remote sync until verification passes. - Rollback is whole-database restore, not selective row restore. - Re-confirm every destructive command immediately before running it. - Do not delete rows directly from SQLite. - Do not edit Atuin config as part of this skill. `history_filter` and `cwd_filter` tuning is out of scope for v1. ## Workflow 1. Resolve the active database: ```bash atuin info ``` 2. Run the audit: ```bash uv run python skills/deprecated/atuin-history-cleanup/scripts/atuin_history_cleanup.py audit ``` Useful flags: ```bash uv run python skills/deprecated/atuin-history-cleanup/scripts/atuin_history_cleanup.py audit --db-path ~/.local/share/atuin/history.db --dupkeep 3 --before now --typo-window-seconds 300 --max-typos 20 ``` 3. Review the `duplicates` section first. Use the reported `atuin history dedup --dry-run ...` command. If the dry run matches expectations, rerun the same command without `--dry-run`. 4. Review the `typos` section second and choose one path: Preferred transactional path: ```bash uv run python skills/deprecated/atuin-history-cleanup/scripts/atuin_history_cleanup.py cleanup-typos ``` Useful flags: ```bash uv run python skills/deprecated/atuin-history-cleanup/scripts/atuin_history_cleanup.py cleanup-typos --db-path ~/.local/share/atuin/history.db --before now --typo-window-seconds 300 --max-typos 20 --backup-dir ~/.local/share/atuin/cleanup-backups/manual-run ``` Manual review path: Start with the suggested `atuin search -i --search-mode prefix ...` preview command. The audit will also add `--cwd <cwd>` when it knows the original working directory, so review stays narrow even if your default Atuin config uses `skim` or another fuzzy mode. In the TUI inspector, use `Ctrl+O`, confirm the exact entry, then `Ctrl+D` to delete that one row. 5. Stop after the cleanup you actually verified. Do not keep expanding the scope. ## What The Audit Does - Resolves the database path from `atuin info` unless `--db-path` is provided. - Opens the SQLite database in read-only mode and inspects only `id`, `timestamp`, `exit`, `command`, `cwd`, `session`, and `hostname`. - Groups duplicates by `(command, cwd, hostname)` and reports how many rows exceed `--dupkeep`. - Emits typo review commands with an explicit `--search-mode prefix` override and never emits `atuin search --delete`. - `cleanup-typos` first runs the same typo audit, then creates a snapshot, writes `pre_audit.json`, `plan.json`, and `post_verify.json`, and only commits the deletion to remote sync after verification succeeds. - Detects typo candidates only when all of these are true: - same session - within the configured window - arguments after the first token are identical - previous command exited non-zero - the first token looks rare - the corrected token is much more common - the token change is a single-edit or adjacent-transposition typo - Excludes path- or script-like first tokens from typo suggestions. ## Output Expectations - `duplicates` gives one global preview/apply pair for `history dedup`. - `typos` gives per-row review data: id, time, cwd, original command, suggested correction, reason, and shell-safe preview commands for inspector review only. - `--format json` is preferable when another tool needs to post-process the audit. - `cleanup-typos` prints a text summary and leaves its backup and verification artifacts in the chosen backup directory.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.