Security checks for XSS, injection, auth, sessions, CSRF, CSP, secrets, and CVEs. Load before writing or reviewing code that handles auth, secrets, or user input, however small.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Security Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-security-patterns)
---
name: security-patterns
description: Security checks for XSS, injection, auth, sessions, CSRF, CSP, secrets, and CVEs. Load before writing or reviewing code that handles auth, secrets, or user input, however small.
---
# Security patterns
Default assumption: the OWASP Top 10 2025 and OWASP ASVS 5.0, per the OWASP project pages, and CSP Level 3, per the W3C Working Draft.
Every entry holds in any language and framework; code in one also follows that stack's pattern skill. A row or entry that names a browser, tool, or standard version applies at or above it.
## Reference files
Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.
| Before | Read |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| Upgrading npm, gitleaks, trufflehog, or OSV-Scanner, or moving to a newer standard | [reference/upgrades.md](reference/upgrades.md) |
| Writing or reviewing code that handles auth, sessions, secrets, or input | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Rating a security finding, setting a CSP, cookies, CORS, or security headers, choosing a session or token design, or handling a dependency or a leaked secret | [reference/practices.md](reference/practices.md) |
| Running or configuring gitleaks, trufflehog, OSV-Scanner, Semgrep, CodeQL, or a dependency audit | [reference/tooling.md](reference/tooling.md) |