check-shell-history

Detects wiped or tampered shell history and login records across all users using metadata only.

2|Updated Jun 14, 2026
One-click install
npx skills add https://github.com/odysseyalive/claude-watchman --skill check-shell-history-odysseyalive
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: check-shell-history
Source: https://github.com/odysseyalive/claude-watchman/tree/main/skills/grammar/check-shell-history
Command: npx skills add https://github.com/odysseyalive/claude-watchman --skill check-shell-history-odysseyalive

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After a compromise, attackers often erase their tracks by clearing shell history, redirecting it to /dev/null, disabling history in shell rc files, or truncating login records like wtmp. This Skill detects those tamper indicators across every login user and root without ever reading the contents of anyone's history, so you can spot a possible breach while respecting user privacy. ## Core Features & Use Cases - Tamper detection via metadata only: Judges wiping from file size, symlink targets, permissions, ownership, immutable bits, and shell rc settings — never reads what users typed. - Stable fingerprinting and regression alerts: Journals each finding in SQLite with a stable per-user/per-path fingerprint, so a re-wiped trail regresses loudly on the next audit run. - Read-only and safe: Never modifies history files, permissions, rc files, or logs; destructive actions are blocked by a prime directive and handed to the operator. - Use Case: During a routine /watchman audit on a Linux server, the Skill flags that root's .bash_history is a symlink to /dev/null and wtmp was truncated — a classic post-compromise signal — and records it for the operator to investigate. ## Quick Start Ask the AI to run the check-shell-history audit to verify whether shell history and login records on this machine show signs of tampering.

Frequently Asked Questions about check-shell-history

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect if shell history was deleted on Linux?▼

Check for history files symlinked to /dev/null, history disabled in shell rc files, zero-length history files, or truncated /var/log/wtmp. This Skill automates that scan across every login user and root using metadata only, flagging each tamper indicator as a journaled finding.

How to check for signs of compromise after a server breach?▼

Look for wiped forensic trails: cleared shell history, truncated wtmp login records, and history disabled in rc files. This Skill detects exactly those post-compromise indicators and pairs with log-retention checks to distinguish wiped evidence from logs never kept.

Does this tool read the contents of users' shell history?▼

No. It judges tampering purely from metadata — file size, symlink target, mode, owner, immutable bit, and rc settings — and never reads what users typed. This is both privacy-respecting and more reliable than grepping for suspicious commands.

Can it detect tampering if the attacker had root access?▼

Partially. A root-level attacker can also tamper with the local journal, which the Skill states honestly. The durable protection is the loop's regression email that leaves the host, plus steering operators toward append-only logging like auditd or remote syslog.

Will it automatically restore or fix wiped history files?▼

No. Wiped history is detect-and-explain only; findings are tiered manual for operator investigation. The only auto-fixable case is a permission correction (chmod 600), and it never re-enables history, removes immutable bits, or restores files itself.