Agent skill · Security

security-hardening

Application security covering input validation, auth, headers, secrets management, and dependency auditing

Rohit Ghumare73,165★ · +3,601/wk · 3 repos on radarProfile →
claude-codeApache-2.0
Install
npx skills add rohitg00/awesome-claude-code-toolkit --skill security-hardening --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 6 KB
Bundled scripts: none
Path: skills/security-hardening/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 2,438
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Security Hardening ## Input Validation Validate all input at the boundary. Never trust client-side validation alone. ```typescript import { z } from 'zod'; const CreateUserSchema = z.object({ email: z.string().email().max(255), name: z.string().min(1).max(100).regex(/^[a-zA-Z\s'-]+$/), age: z.number().int().min(13).max(150), }); function createUser(req: Request) { const result = CreateUserSchema.safeParse(req.body); if (!result.success) { return { status: 400, errors: result.error.flatten().fieldErrors }; } // result.data is typed and validated } ``` 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) ## Output Encoding ```typescript // Prevent XSS: encode output based on context // HTML context: use framework auto-escaping (React does this by default) // Never use dangerouslySetInnerHTML with user input // URL context: encode parameters const safeUrl = `/search?q=${encodeURIComponent(userInput)}`; // JSON context: use JSON.stringify (handles escaping)

What's inside
Steps it walks through
  1. Input Validation
  2. Output Encoding
  3. SQL Injection Prevention
  4. CSRF Protection
  5. Content Security Policy
  6. Security Headers
  7. Rate Limiting
  8. JWT Best Practices
  9. Secrets Management
  10. Dependency Auditing
  11. Checklist Before Deploy
Commands it runs
Check for secrets in git history
gitleaks detect --source . --verbose
Pre-commit hook to prevent secret commits
gitleaks protect --staged
Node.js
npm audit --production
npx better-npm-audit audit --level=high
Python
pip-audit
safety check
More from awesome-claude-code-toolkit
All skills →
About this skill
What does the security-hardening skill do?

Application security covering input validation, auth, headers, secrets management, and dependency auditing

How do I install it?

Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill security-hardening --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From rohitg00/awesome-claude-code-toolkit, a repository with 2,438 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going