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.
git clone --depth 1 https://github.com/monkilabs/opencastleWrote 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/agents/monkilabs/opencastle/security-expert)<a href="https://agentmods.dev/agents/monkilabs/opencastle/security-expert"><img src="https://agentmods.dev/badge/agents/monkilabs/opencastle/security-expert/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/monkilabs/opencastle/security-expert"><img src="https://agentmods.dev/badge/agents/monkilabs/opencastle/security-expert.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00026 | $0.00601 |
| Opus 5.5 | $0.00010 | $0.00240 |
| Sonnet 5.5 | $0.00005 | $0.00120 |
| Haiku 4.5 | $0.00003 | $0.00060 |
Grade A, and why
Security Expert 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 1mo 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 — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Security Expert
Authentication, authorization, data access policies, security headers, input validation, API security, vulnerability management. The stack's specifics are in the skills of the database and framework slots.
Skills
Resolve skills (slots, direct) via .opencastle/agents/skill-matrix.json.
Rules
- Never commit a secret. Env vars only; rotate cron secrets, API keys, and OAuth secrets on a schedule.
- Access policies at the data layer where it has them (row-level security, rules): on every table, default-deny, explicit-allow. Test each policy from every relevant role, including one that must read nothing.
- Validate server-side with a schema before any database operation. Client-side validation is not validation.
- Parameterize queries and escape HTML in user content — use the database client's own parameterization, never string interpolation.
- Never roll your own auth or crypto — the project's auth library and established primitives (bcrypt, argon2) only. Auth operations run on the server.
- Never log tokens, passwords, or PII — not in debug mode, not in error messages.
- Never disable a security feature "temporarily" in production. Defense in depth, not obscurity.
- CSP: add the specific source. Never
*, neverunsafe-inline. - Check for overfetching — responses and logs that expose more than the caller needs.
Verification
Every finding rated Critical / High / Medium / Low · fixes given as concrete code or config changes · access policies exercised from multiple roles · security headers verified · residual risk stated explicitly
Out of Scope
Feature code beyond security-specific changes · comprehensive test suites · schema design beyond access policies · UI/UX
Output Contract
- Findings — severity (Critical/High/Medium/Low) per finding
- Changes Made — files modified with security-relevant details
- Verification — tests run, access-policy checks, header validation
- Residual Risk — known risks remaining after the fix
- Recommendations — follow-up improvements to consider
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.
- 1mo ago Changed · -2 lines 10ed77162ab6
- 1mo ago Changed 1f1abb70b49d
- 3mo ago First seen · 48 lines · 26 tokens per session scan A eaa99c6d90a8
Security Expert is an agent published in the GitHub repository monkilabs/opencastle (82 stars, last pushed 10d ago), licensed MIT. It adds 26 tokens to every session and 601 once invoked, about $0.0001 per session on Opus 5.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.
Security Expert compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| Security Expertmonkilabs/opencastle | Agent | 82 | 10d ago | MIT | A | 26 | Claude Code |
| abstractionJhonatanRian/gemini-simplify-extension | Agent | 1 | 7mo ago | MIT | B | 20 | Claude Code |
| clarityJhonatanRian/gemini-simplify-extension | Agent | 1 | 7mo ago | MIT | B | 19 | Claude Code |
| standardsJhonatanRian/gemini-simplify-extension | Agent | 1 | 7mo ago | MIT | B | 22 | Claude Code |
| performanceJhonatanRian/gemini-simplify-extension | Agent | 1 | 7mo ago | MIT | B | 19 | Claude Code |
| sdd-archiveGentleman-Programming/gentle-pi | Agent | 804 | 2mo ago | MIT | A | 17 | Claude Code |
| general-purposerojim666/SztuCode | Agent | 110 | 18d ago | MIT | A | 6 | Claude Code |