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 skills add monkilabs/opencastle --skill security-hardeninggit 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/skills/monkilabs/opencastle/security-hardening)<a href="https://agentmods.dev/skills/monkilabs/opencastle/security-hardening"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/security-hardening/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/skills/monkilabs/opencastle/security-hardening"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/security-hardening.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00056 | $0.00541 |
| Opus 5.5 | $0.00022 | $0.00216 |
| Sonnet 5.5 | $0.00011 | $0.00108 |
| Haiku 4.5 | $0.00006 | $0.00054 |
Grade A, and why
security-hardening scanned grade A with 1 finding 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 17d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
Least privilege: allow only the origins each directive needs, and nonces or hashes in production instead of `'unsafe-inline'` or `'unsafe-eval'`. Check what actually ships with `curl -I` against a preview URL: CSP, `Stri How it starts
The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Security Hardening
These hold whatever the stack. The stack's own rules — its auth library, its database's access policies, its framework's middleware — are in the skills bound to the database and framework slots of .opencastle/agents/skill-matrix.json.
Authentication and sessions
- Sign-in, sign-up and sign-out go through server-side handlers with CSRF protection: POST only, Origin checked.
- Sessions live in HTTP-only,
Secure,SameSitecookies, and are refreshed and checked on the server for every protected route — never only in the client. - Roles and permissions are stored server-side, where the client cannot write them.
Authorization and data access
- Check on the server, for every read and write, who is asking and whether they may touch this record. Hiding a button is not access control.
- Identity comes from the verified session, never from a request parameter.
- Where the data layer has policies (row-level security, rules), enable them on every table, deny by default and allow explicitly — and keep a test that proves another user reads nothing.
Input and output
- Validate every handler's input with a schema before it reaches the database or another service. Client-side validation is feedback, not protection.
- Parameterized queries only. Sanitize user-supplied HTML (DOMPurify or the equivalent) before rendering it.
- Errors sent to the client carry no stack trace, query or internal id.
Headers and CSP
Least privilege: allow only the origins each directive needs, and nonces or hashes in production instead of 'unsafe-inline' or 'unsafe-eval'. Check what actually ships with curl -I against a preview URL: CSP, Strict-Transport-Security, X-Content-Type-Options: nosniff, Referrer-Policy.
Secrets and scheduled routes
- Secrets live in environment variables — never in code, logs or the client bundle. A value the browser needs is public.
- A cron or webhook route checks a shared secret (
authorization: Bearer <secret>, generated withopenssl rand -hex 32) or the provider's signature, and answers 401 otherwise. - Check a new dependency's audit (
npm audit, or the project's equivalent) before adding it.
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.
- 17d ago Changed · +1 lines · +6 tokens per session 316684be9bf4
- 19d ago Changed · -12 tokens per session cc7cd18fdc09
- 1mo ago First seen · 36 lines · 62 tokens per session scan A 8a85980a2431
security-hardening is a skill published in the GitHub repository monkilabs/opencastle (80 stars, last pushed 3d ago), licensed MIT. It adds 56 tokens to every session and 541 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
transactional-patterns
Use when defining or debugging Spring Boot 3 database transaction boundaries, rollback, propagation, optimistic-lock retries, or commit-bound events. For duplicate HTTP commands use idempotency-patterns; for reactive transactions use webflux-reactive-patterns.
flyway-migrations
Use when creating database migrations, schema changes, seed data, or any SQL that modifies database structure. Covers Flyway naming conventions, versioning, and safe migration patterns.
spring-data-redis
Use when implementing caching, session storage, rate limiting, or any Redis integration. Covers cache-aside pattern, key naming, TTL strategy, and serialization config.
spring-data-jpa
Use when generating JPA entities, repositories, queries, or anything touching the persistence layer. Covers entity conventions, N+1 prevention, projections, and query patterns.
idempotency-patterns
Use when making retried HTTP commands or message processing safe against duplicate effects, including database-backed request keys, payload conflicts and concurrent retries. Do not apply caching as a substitute for business idempotency.
multi-tenancy
Use when implementing tenant resolution, database or schema isolation, tenant-aware JPA, reactive tenant context, migrations, caching, jobs, or authorization in Spring Boot 3.