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.
npx agentmods add commands/d-kimuson/claude-code-viewer/security-auditgit clone --depth 1 https://github.com/d-kimuson/claude-code-viewerWrote 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.
[](https://agentmods.dev/commands/d-kimuson/claude-code-viewer/security-audit)<a href="https://agentmods.dev/commands/d-kimuson/claude-code-viewer/security-audit"><img src="https://agentmods.dev/badge/commands/d-kimuson/claude-code-viewer/security-audit.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00026 | $0.00880 |
| Opus 5 | $0.00013 | $0.00440 |
| Sonnet 5 | $0.00005 | $0.00176 |
| Haiku 4.5 | $0.00003 | $0.00088 |
Grade A, and why
security-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.
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.
How it starts
The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a security expert. Conduct a comprehensive security audit of this project in three phases, then produce a report in Japanese.
Phase 1: Launch Automated Security Check
Run the security check script (this takes time):
nix develop --command bash -c "./scripts/security-check.sh"
Note the output directory path from stdout. Proceed to Phase 2 while waiting is not possible since this is synchronous — once it completes, move on.
Phase 2: Manual Codebase Inspection
Independently inspect the codebase as a security expert. Use Grep, Glob, and Read to examine code. Document each finding with exact file path, line number, severity, and recommended fix.
Areas to investigate:
Injection & Input Validation
- Command injection in
Bash/Commandusage — checksrc/server/for unsanitized user input passed to shell commands - Path traversal in JSONL file reads — verify paths are constrained to
~/.claude/projects/ - XSS in React components — search for
dangerouslySetInnerHTML, unsanitized content rendering
Secrets & Sensitive Data
- Hardcoded credentials, API keys, tokens in source files
- Sensitive data leaking into logs or error messages exposed via SSE/API
Server-side (Hono routes)
- Input validation on all route handlers in
src/server/hono/route.ts - File path inputs that could escape intended directories
- Error responses that reveal internal paths or stack traces
Dependency & Supply Chain
- Suspicious or unnecessary packages in
package.json - Scripts in
package.json/pnpm-lock.yamlthat execute on install
Frontend
- Raw
fetchbypassing TanStack Query (policy violation that could indicate auth bypass) - Eval-like patterns (
eval,Function(),innerHTML)
Phase 3: Integrate Findings and Write Report
Read the script output files from the directory captured in Phase 1:
pnpm-audit.json— parsevulnerabilitiesobject (severity, via, fixAvailable) andmetadata.vulnerabilitiescountscodeql.sarif— parseruns[0].results[](ruleId, message.text, physicalLocation uri+startLine, level)
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.
- 4d ago First seen · 98 lines · 26 tokens per session scan A d6e0302b3b3d
security-audit is a command published in the GitHub repository d-kimuson/claude-code-viewer (1,278 stars, last pushed 16d ago), licensed MIT. It adds 26 tokens to every session and 880 once invoked, about $0.0001 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-30.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.