security-hardening
Skill0 starsChanged 4 months agoMITView on GitHub
Application security covering input validation, auth, headers, secrets management, and dependency auditing. Use when hardening an app, reviewing code for security issues, configuring security headers/CSP, managing secrets, or auditing dependencies before deploy.
- Reads credentials
26 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- swap-cameroon/kuro-antigravity-configtheir own version, first seen Nov 15, 2026
- valentinesamuel/claude-skillsedited, first seen Nov 8, 2026
- Mehul72/skillstheir own version, first seen Nov 8, 2026
- looties-io/looties-skillstheir own version, first seen Nov 1, 2026
- Kin9Zeus/senior-engineer-skillstheir own version, first seen Nov 1, 2026
- DevelopersGlobal/ai-agent-skillstheir own version, first seen Oct 25, 2026
Used with
Projects with it also use coordinate, incident-response and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
swyxioSkillcoordinate
Coordinate focused Luna helpers for bounded work and Astra advisers for difficult design questions while doing the main work yourself.
Also in 3 projects that use this
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 5 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 4 projects that use this
barisariburnuSkillperformance-optimization
Complete performance optimization guide for Next.js applications including frontend, backend, database, caching, and general optimization strategies. Use when improving performance, reducing bundle size, optimizing queries, or implementing caching.
Also in 4 projects that use this
GitHubSkillaccessibility-audit
Audits actual components and routes against applicable WCAG 2.2 A/AA criteria using consumer-owned design-system evidence and repository tools. Use when asked for an accessibility audit, a11y check, keyboard or focus review, contrast check, or screen-reader verification.
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 5 projects that use this
Other versions26 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- valentinesamuel/claude-skills★ 153% same
Wrote their own version · 25
- duyet/clickhouse-monitoring★ 303same name
- DevelopersGlobal/ai-agent-skills★ 216same name
- swyxio/skills★ 199same name
- mn-youssef/security-skills★ 47same name
- wulaosiji/skills★ 28same name
- khuynh22/agent-dev-team★ 9same name
- alexderz/agentic-toolbox★ 5same name
- juanitourquiza/shipframe★ 5same name
- jx1100370217/my-openclaw-skills★ 4same name
- thejordanleopold/claude-code-skills-distilled★ 4same name
15 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- git-advancedSkill
- python-best-practicesSkill
- tdd-masterySkill
- testing-strategiesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 10 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 16
Use allowlists over denylists (accept known good, reject everything else)
- Distinctive: line 24
Never construct HTML strings with user input.
- Distinctive: line 44
Use an ORM or query builder.
- Very specific: line 54
Start strict, relax as needed.
- Very specific: line 70
Use a sliding-window algorithm.
- Distinctive: line 74
Use short expiry (15 minutes) for access tokens
- Distinctive: line 75
Use refresh tokens (7-30 days) stored in httpOnly cookies
- Distinctive: line 77
Never store sensitive data in JWT payload (it is base64 encoded, not encrypted)
- Very specific: line 85
Never commit secrets to version control (use .gitignore for .env)
- Distinctive: line 86
Use environment variables for runtime secrets
- Distinctive: line 87
Use a secrets manager in production (AWS Secrets Manager, HashiCorp Vault, Doppler)
- Very specific: line 89
Use different secrets per environment (dev/staging/prod)
- Distinctive: line 96
Run dependency audits in CI on every PR.
- Distinctive: line 100
All inputs validated with schema validation
“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Security Hardening
Long code examples for several sections live in
reference.md(extract-to-reference). This file keeps the rules and the deploy checklist.
Input Validation
Validate all input at the boundary. Never trust client-side validation alone.
Rules:
- Validate type, length, format, and range on every input
- Use allowlists over denylists (accept known good, reject everything else)
- Validate file uploads: check MIME type, file extension, and magic bytes
- Limit request body size at the server/proxy level (e.g., 1MB max)
Schema-validation example (Zod, with typed safe output): see reference.md → Input Validation.
Output Encoding
Never construct HTML strings with user input. Use templating engines with auto-escaping enabled. Encode output based on context: HTML (framework auto-escaping, never dangerouslySetInnerHTML with user input), URL (encodeURIComponent), JSON (JSON.stringify). Per-context examples: see reference.md → Output Encoding.
SQL Injection Prevention
# NEVER do this
cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
# Always use parameterized queries
cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))// NEVER do this
db.query(`SELECT * FROM users WHERE email = '${email}'`);
// Always use parameterized queries
db.query("SELECT * FROM users WHERE email = $1", [email]);Use an ORM or query builder. If writing raw SQL, always parameterize.
CSRF Protection
Generate a per-session CSRF token and validate it (timing-safe compare) on every state-changing request (POST/PUT/PATCH/DELETE); reject with 403 on mismatch. Token-generation + middleware example: see reference.md → CSRF Protection.
For APIs with token-based auth (Bearer tokens), CSRF is not needed since the token is not auto-sent by browsers.
Content Security Policy
Start strict, relax as needed. Use nonce for inline scripts instead of unsafe-inline. Report violations with the report-uri directive. Test with Content-Security-Policy-Report-Only first. Full directive set: see reference.md → Content Security Policy.
Security Headers
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()Set these on every response. Use helmet (Node.js) or equivalent middleware.
Rate Limiting
Use a sliding-window algorithm. Store counters in Redis. Return 429 with a Retry-After header. Apply stricter limits to authentication endpoints (e.g. login 5/15m, register 3/1h) than to general API traffic. Per-endpoint config example: see reference.md → Rate Limiting.
JWT Best Practices
- Use short expiry (15 minutes) for access tokens
- Use refresh tokens (7-30 days) stored in httpOnly cookies
- Sign with RS256 (asymmetric) for microservices, HS256 (symmetric) for monoliths
- Never store sensitive data in JWT payload (it is base64 encoded, not encrypted)
- Validate
iss,aud,exp, andnbfclaims on every request - Implement token revocation via a denylist or short expiry + rotation
Full verification call (algorithms, issuer, audience, clock tolerance): see reference.md → JWT Verification.
Secrets Management
- Never commit secrets to version control (use
.gitignorefor.env) - Use environment variables for runtime secrets
- Use a secrets manager in production (AWS Secrets Manager, HashiCorp Vault, Doppler)
- Rotate secrets regularly (90-day maximum for API keys)
- Use different secrets per environment (dev/staging/prod)
- Scan for leaked secrets in CI:
trufflehog,gitleaks,git-secrets
Scanning commands (gitleaks detect / gitleaks protect --staged): see reference.md → Secrets Scanning.
Dependency Auditing
Run dependency audits in CI on every PR. Block merges on critical/high vulnerabilities. Pin dependency versions. Update dependencies weekly with automated PRs (Dependabot, Renovate). Per-ecosystem commands (npm / pip-audit / govulncheck): see reference.md → Dependency Auditing.
Checklist Before Deploy
- All inputs validated with schema validation
- SQL queries parameterized
- Security headers configured
- HTTPS enforced with HSTS
- Secrets externalized, not in code
- Dependencies audited, no critical vulnerabilities
- Rate limiting on all public endpoints
- Authentication tokens expire and rotate
- Error messages do not leak internal details
- Logging captures security events without sensitive data
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

