security-patterns

security-patterns is a skill for Claude Code from yonatangross/orchestkit. It costs 56 tokens per session (5,620 once invoked), scanned B, original, MIT.

A collection of application-security rules for authentication, input validation, protection against common web attacks, AI prompt-injection defence, and personal-data redaction. It also covers dependency and code scanning.

In plain words
What is it for?
Use it when building login flows, validating input, handling file uploads, securing AI features, masking personal information, or scanning code and dependencies.
Why use it?
It helps prevent common security defects and gives developers checks for protecting users, secrets, and data.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ork plugin — 106 skills, 35 commands, 36 agents, 32 hooks shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add yonatangross/orchestkit
Claude Code
/plugin install ork

Made for: Claude Code.

Or install ork, the plugin that ships this one along with the rest of its 106 skills, 35 commands, 36 agents, 32 hooks.

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 security-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/yonatangross/orchestkit/security-patterns.svg)](https://agentmods.dev/skills/yonatangross/orchestkit/security-patterns)
Your own site
<a href="https://agentmods.dev/skills/yonatangross/orchestkit/security-patterns"><img src="https://agentmods.dev/badge/skills/yonatangross/orchestkit/security-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,620 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.1 $0.00056 $0.05620
Opus 5 $0.00028 $0.02810
Sonnet 5 $0.00011 $0.01124
Haiku 4.5 $0.00006 $0.00562

Measured today against content hash 78d032799c79, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

security-patterns scanned grade B with 2 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 today.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/auth-middleware-template.py, scripts/prompt_builder.py, scripts/safe_llm_call.py, …), 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.

Reaches for credential filesmediumPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

"files": [{ "path": "~/.aws/credentials", "mode": "deny" }],

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

| 3. User (`~/.claude/settings.json`) | Personal preferences | Final authority |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

plugins/ork/skills/security-patterns/SKILL.md · 413 lines

How it starts

The opening of the file, as written. The whole thing — 413 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security Patterns

Comprehensive security patterns for building hardened applications. Each category has individual rule files in rules/ loaded on-demand.

Quick Reference

Category Rules Impact When to Use
Authentication upstream CRITICAL JWT tokens, OAuth 2.1/PKCE, RBAC/permissions
Defense-in-Depth 1 CRITICAL Multi-layer security, zero-trust architecture
Input Validation 2 HIGH Schema validation (Zod/Pydantic), output encoding, file uploads
OWASP Top 10 1 CRITICAL Injection prevention, broken authentication fixes
LLM Safety refs HIGH Prompt injection defense, output guardrails, content filtering
PII Masking refs HIGH PII detection/redaction with Presidio, Langfuse, LLM Guard
Scanning upstream HIGH Dependency audit, SAST (Semgrep/Bandit), secret detection
Advanced Guardrails 2 CRITICAL NeMo/Guardrails AI validators, red-teaming, OWASP LLM

Total: 6 rule files across 4 categories. Topics marked "upstream" or "refs" keep only the ork delta here: floors and key decisions in this file, scars and house decisions in references/ork-delta.md, and first-party sources in Upstream coverage.

Quick Start

# Argon2id password hashing
from argon2 import PasswordHasher
ph = PasswordHasher()
password_hash = ph.hash(password)
ph.verify(password_hash, password)
# JWT access token (15-min expiry)
import jwt
from datetime import datetime, timedelta, timezone
payload = {
    'sub': user_id, 'type': 'access',
    'exp': datetime.now(timezone.utc) + timedelta(minutes=15),
}
token = jwt.encode(payload, SECRET_KEY, algorithm='HS256')
// Zod v4 schema validation
import { z } from 'zod';
const UserSchema = z.object({
  email: z.email(),
  name: z.string().min(2).max(100),
  role: z.enum(['user', 'admin']).default('user'),
});
const result = UserSchema.safeParse(req.body);

Read the full file on GitHub · 413 lines

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. today First seen · 413 lines · 56 tokens per session scan B 78d032799c79

Subscribe to this mod's changes

security-patterns is a skill published in the GitHub repository yonatangross/orchestkit (228 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 5,620 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (reaches for credential files, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

auth0-docs

Auth0 — identity platform: auth flows, Universal Login, SSO, identity providers, MFA, RBAC, Actions, tokens.

pledgeandgrow/pledge-skills · 32 tokens

auth-patterns

Use when implementing authentication (JWT, sessions, OAuth), authorization (RBAC, ABAC), password hashing, MFA, or security best practices for backend services.

MadAppGang/claude-code · 36 tokens

security-review

Security Code Review: Reviews code for security vulnerabilities including authentication (OAuth2, JWT), authorization (RBAC, roles), API security, data protection, payment security, and common attack vectors. Use whenever the user wants a security review, penetration test analysis, threat model, or mentions OAuth2…

camilooscargbaptista/cto-toolkit · 119 tokens

testing-api-authentication-weaknesses

Tests API authentication mechanisms for weaknesses including broken token validation, missing authentication on endpoints, weak password policies, credential stuffing susceptibility, token leakage in URLs or logs, and session management flaws. The tester evaluates JWT implementation, API key handling, OAuth flows, and…

xalgorix/xalgorix · 102 tokens

security-hardening

Use when writing code that handles user input, auth, sessions, or external data. Covers OWASP prevention patterns. Do NOT use for general code quality or performance — see dedicated skills.

juanmhidalgo/claude-plugins · 41 tokens

JWT Security Testing

Comprehensive JWT token security testing including signature verification, expiration checks, algorithm confusion attacks, and claim validation.

PramodDutta/qaskills · 25 tokens