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/kid-sid/claude-spellbook/security-scangit clone --depth 1 https://github.com/kid-sid/claude-spellbookWrote 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/kid-sid/claude-spellbook/security-scan)<a href="https://agentmods.dev/commands/kid-sid/claude-spellbook/security-scan"><img src="https://agentmods.dev/badge/commands/kid-sid/claude-spellbook/security-scan.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.00000 | $0.00916 |
| Opus 5 | $0.00000 | $0.00458 |
| Sonnet 5 | $0.00000 | $0.00183 |
| Haiku 4.5 | $0.00000 | $0.00092 |
Grade A, and why
security-scan 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 — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Audit code against the security skill checklist and OWASP best practices.
Instructions
-
Determine scope:
- If the user specifies files/directories, scan those
- If no scope given, scan
git diff(staged + unstaged changes) - If no changes, scan the
src/directory
-
For each file in scope, check against these categories:
A. Injection (OWASP A03)
- SQL queries use parameterized statements, not string concatenation
- No
eval(),exec(),Function()with dynamic input - No
shell=Trueor backtick execution with user input - Template rendering uses auto-escaping (XSS prevention)
- LDAP, XML, and OS command inputs are sanitized
B. Authentication & Session (OWASP A07)
- Passwords hashed with bcrypt/scrypt/argon2 (not MD5/SHA1)
- Session tokens are cryptographically random, sufficient length
- JWT secrets are not hardcoded
- Token expiration is enforced
- Failed login attempts are rate-limited
C. Authorization (OWASP A01)
- Every endpoint checks authorization, not just authentication
- Resource access verifies ownership (IDOR prevention)
- Admin endpoints have explicit role checks
- No privilege escalation through parameter manipulation
- Default deny — new endpoints require explicit permission grants
D. Data Exposure (OWASP A02)
- No hardcoded secrets, API keys, passwords, or tokens
- Sensitive data not logged (passwords, tokens, PII)
- Error responses don't leak stack traces or internal paths
- PII is encrypted at rest
- API responses don't over-expose fields (use DTOs/serializers)
E. Security Misconfiguration (OWASP A05)
- CORS is restrictive (not
*in production) - Security headers set (CSP, HSTS, X-Frame-Options, etc.)
- Debug mode disabled in production configs
- Default credentials changed
- Unnecessary HTTP methods disabled
F. Dependencies (OWASP A06)
- No known vulnerable dependencies (check lock files)
- Dependencies are pinned to specific versions
- No unnecessary dependencies with large attack surface
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 · 104 lines · 0 tokens per session scan A ae9cb1adcdcc
security-scan is a command published in the GitHub repository kid-sid/claude-spellbook (187 stars, last pushed 29d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 916 tokens. 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.