← ClaudeAtlas

session-bash-auditlisted

Use when asked to audit, measure, or re-check how agent sessions are using the Bash tool — command chaining (&&, ;, |), cd into the session's own repo, head/tail truncation, sed -n/cat/heredoc instead of Read/Edit, git commit/push inside chains or behind git -C — or when deciding whether a permission prompt, an allowlist rule, a ~/AGENTS.md Bash rule, or the permission mode (acceptEdits vs auto) needs changing and wants evidence from real transcripts rather than a hunch. Runs a stdlib script over ~/.claude/projects/*.jsonl, prints per-model and per-session rates plus samples, and carries the dated research that explains why each pattern happens and where the fix belongs. Also the place to record a newly noticed Bash anti-pattern so the next audit measures it.
TheodoreAD/agent-skills · ★ 0 · AI & Automation · score 75
Install: claude install-skill TheodoreAD/agent-skills
# Session Bash audit Measures how Claude Code sessions actually use the Bash tool, against whatever Bash rules the always-loaded instructions file states, and turns the numbers into a decision about _where_ a fix belongs. The first run (2026-08-24, 3,956 calls over four days) is written up in [`references/research.md`](references/research.md) — read its "Root causes" and "Mode comparison" sections before interpreting a new run; most of the reasoning transfers and doesn't need re-deriving. Reads `~/.claude/` — the transcript store at `~/.claude/projects/*.jsonl` and, for the permission replay, `~/.claude/settings.json`. Both are Claude Code's own, read-only and never written, so this works on any machine running Claude Code and needs nothing installed. On any other harness there is nothing to read and the script says so rather than reporting zeros. The measured numbers and baselines shipped here are one author's machine under one set of rules — treat them as a reference point to compare against, not as your own baseline; save your own on the first run. **Every pattern here is a POSIX-shell idiom** — `&&`, `;`, `|`, `cd`, `sed -n`, a heredoc — so the audit describes a session whose Bash tool runs a POSIX shell. On Windows that is a Git Bash or WSL session, where it applies unchanged; a PowerShell session generates commands none of these patterns match, and the report then reads as "no problems found" when it means "wrong tool for this transcript". Until someone runs it again