Use when implementing authentication/authorization, securing user input, or preventing OWASP Top 10 vulnerabilities โ including custom security implementations such as hashing passwords with bcrypt/argon2, sanitizing SQL queries with parameterized statements, configuring
Installs just this skill. Get the whole plugin for auto-invocation.
โก How it fires
How this skill gets triggered: by you, by Claude, or both.
Fires itselfClaude auto-loads it when your prompt matches the work.
You can call itInvoke it directly when you want it.
Slash command/secure-code-guardian
๐๏ธ Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when implementing authentication/authorization, securing user input, or preventing OWASP Top 10 vulnerabilities โ including custom security implementations such as hashing passwords with bcrypt/argon2, sanitizing SQL queries with parameterized statements, configuring
๐ Stats
Stars10,698
Forks973
LanguagePython
LicenseMIT
๐ฆ Ships with fullstack-dev-skills
</> SKILL.md
secure-code-guardian.SKILL.md
---name: secure-code-guardian
description: Use when implementing authentication/authorization, securing user input, or preventing OWASP Top 10 vulnerabilities โ including custom security implementations such as hashing passwords with bcrypt/argon2, sanitizing SQL queries with parameterized statements, configuring CORS/CSP headers, validating input with Zod, and setting up JWT tokens. Invoke for authentication, authorization, input validation, encryption, OWASP Top 10 prevention, secure session management, and security hardening. For pre-built OAuth/SSO integrations or standalone security audits, consider a more specialized skill.
license: MIT
metadata:
author: https://github.com/Jeffallan
version: "1.1.0"
domain: security
triggers: security, authentication, authorization, encryption, OWASP, vulnerability, secure coding, password, JWT, OAuth
role: specialist
scope: implementation
output-format: code
related-skills: fullstack-guardian, security-reviewer, architecture-designer
---# Secure Code Guardian
## Core Workflow
1. **Threat model** โ Identify attack surface and threats
2. **Design** โ Plan security controls
3. **Implement** โ Write secure code with defense in depth; see code examples below
4. **Validate** โ Test security controls with explicit checkpoints (see below)
5. **Document** โ Record security decisions
- **Authentication**: Test brute-force protection (lockout/rate limit triggers), session fixation resistance, token expiration, and invalid-credential error messages (must not leak user existence).
- **Authorization**: Verify horizontal and vertical privilege escalation paths are blocked; test with tokens belonging to different roles/users.
- **Input handling**: Confirm SQL injection payloads (`' OR 1=1--`) are rejected; confirm XSS payloads (`<script>alert(1)</script>`) are escaped or rejected.
- **Headers/CORS**: Validate with a security scanner (e.g., `curl -I`, Mozilla Observatory) that security headers are present and CORS origin allowlist is correct.
## Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|-------|-----------|-----------|
| OWASP | `references/owasp-prevention.md` | OWASP Top 10 patterns |