security-patterns

security-patterns is a skill for Claude Code from yonatangross/orchestkit. It costs 56 tokens per session (5,601 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.

Part of the ork plugin — 83 skills, 39 commands, 36 agents, 32 hooks shipped together

Good fit Use it when building login flows, validating input, handling file uploads, securing AI features, masking personal information, or scanning code and dependencies.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yonatangross/orchestkit/security-patterns
Install

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.

Any agent
npx skills add yonatangross/orchestkit --skill security-patterns
Clone the repo
git clone --depth 1 https://github.com/yonatangross/orchestkit

Made for: Claude Code.

Or install ork, the plugin that ships this one along with the rest of its 83 skills, 39 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/github.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/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.

agentmods 80×15 button for security-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/yonatangross/orchestkit/security-patterns"><img src="https://agentmods.dev/badge/skills/yonatangross/orchestkit/security-patterns.svg" alt="Reviewed on agentmods" width="80" 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,601 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 12 Oct 2026
  • Snyk pass 12 Oct 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 14 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 62
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 105
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 143
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 149
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 156
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 380
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 149
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 149
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Agent Snooping · line 292
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Privilege Escalation · line 298
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Excessive Agency · line 16
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • medium Rogue Agent · line 156
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 298
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 365
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.05601
Opus 5.5 $0.00022 $0.02240
Sonnet 5.5 $0.00011 $0.01120
Haiku 4.5 $0.00006 $0.00560

Measured 1mo ago against content hash ee4dafdfe469, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

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 · 406 lines

How it starts

The opening of the file, as written. The whole thing — 406 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 · 406 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. 1mo ago Changed · -1 lines ee4dafdfe469
  2. 2mo ago Changed · -5 lines 0dfae2d5fcc4
  3. 2mo ago Changed · -1 lines 16929ad80e82
  4. 2mo ago Changed ef44e922393c
  5. 2mo ago Changed 01eb2b29ed97
  6. 2mo ago Changed 1ece05e5ea62
  7. 2mo ago 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 (312 stars, last pushed today), licensed MIT. It adds 56 tokens to every session and 5,601 once invoked, about $0.0002 per session on Opus 5.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

security-patterns compared with skills from other repositories

security-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
security-patternsyonatangross/orchestkitSkill312todayMITB56Claude Code
Agent Workflow Buildereddiebelaval/squireSkill213mo agoMITA19Claude Code, Codex
implement-outlinehumanlayer/humanlayerSkill13k8d agoApache-2.0A15Claude Code, Codex
web-researchshibing624/agenticaSkill368yesterdayApache-2.0A24Claude Code, Codex
stall-resetSnowflake-Labs/cocoplusSkill72924d agoMITA14Claude Code, Codex
time-steppingHeshamFS/materials-simulation-skillsSkill9515d agoApache-2.0A108Claude Code
ai-multi-agent-systemsj4flmao/agent-skillsSkill4614d agoMITA88Claude Code, Codex