shell-audit

shell-audit is a skill for Claude Code, Codex from akasecurity/claude-tools. It costs 112 tokens per session (606 once invoked), scanned A, original, MIT.

A read-only checker for shell startup files such as `.zshrc` and `.bashrc`, including the files they load. It looks for exposed credentials, suspicious persistence, alias problems, and changes from Git.

In plain words
What is it for?
Use it to review, secure, clean up, or maintain shell aliases and startup configuration.
Why use it?
It helps reveal secrets, unwanted startup behavior, broken aliases, and unrecognized file changes without modifying your files or printing secret values.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/akasecurity/claude-tools/shell-audit
Any agent
npx skills add akasecurity/claude-tools --skill shell-audit
Clone the repo
git clone --depth 1 https://github.com/akasecurity/claude-tools

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for shell-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/akasecurity/claude-tools/shell-audit.svg)](https://agentmods.dev/skills/akasecurity/claude-tools/shell-audit)
Your own site
<a href="https://agentmods.dev/skills/akasecurity/claude-tools/shell-audit"><img src="https://agentmods.dev/badge/skills/akasecurity/claude-tools/shell-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 606 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00112 $0.00606
Opus 5 $0.00056 $0.00303
Sonnet 5 $0.00022 $0.00121
Haiku 4.5 $0.00011 $0.00061

Measured 4d ago against content hash 231af26dc8b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

shell-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (audit.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

config/skills/shell-audit/SKILL.md · 48 lines

What it actually says

shell-audit

Run the bundled read-only auditor and present its findings clearly and honestly.

Run it

bash "$CLAUDE_CONFIG_DIR/skills/shell-audit/audit.sh" [rc-file]

No argument → it picks the rc from $SHELL. It walks that rc and every file reachable through its source / . chain (cycle-safe via a visited-set) and prints four sections: credentials, persistence patterns, alias hygiene, git drift.

Present the results

  • Credentials first (highest severity). NEVER print secret values — the script redacts them; keep them redacted. Recommend moving any secret out of startup files into a keychain / credential helper, and rotating anything that was exposed (these files are often git-tracked and world-readable to the user).
  • Persistence patterns = "eyeball these". Most are legit (setup scripts); for each, confirm it fetches/execs only what's intended and that nothing writes into another rc.
  • Alias hygiene — offer to dedupe (decide which definition wins) and note any launcher alias whose target dir is missing.
  • Git drift — confirm each change is the user's. A modified-vs-HEAD or untracked startup file is the strongest tamper signal available here.
  • Partial coverage — if the run prints "COVERAGE IS PARTIAL", a source line used a variable the auditor couldn't resolve without running the shell (e.g. source "$DOTFILES/x"); that file was not audited. Surface it and offer to re-run pointed at the resolved path.
  • State the scope limit every time: this covers the shell-startup slice only — not launchd/LaunchAgents, cron, login items, ssh authorized_keys/config, or git hooks. Don't present it as comprehensive persistence detection.

Don't

  • Don't modify any startup file as part of the audit — it's read-only. If the user wants fixes, propose them and let the user apply: their dotfiles are Edit/Write-denied by design, so hand edits over via a ! <cmd> prompt.
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 48 lines · 112 tokens per session scan A 231af26dc8b8

Subscribe to this mod's changes

shell-audit is a skill published in the GitHub repository akasecurity/claude-tools (10 stars, last pushed 1mo ago), licensed MIT. It adds 112 tokens to every session and 606 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.