Agent skill
security-first-design
Install this agent skill to your Project
npx add-skill https://github.com/ilude/claude-code-config/tree/main/skills/security-first-design
SKILL.md
Security-First-Design Skill
Auto-activate when: User mentions authentication, authorization, API security, sensitive data, user input, secrets management, encryption, security review, or when working with .env$ (actual env files, not examples), credentials.json, secrets.yaml, API keys, authentication systems, or security-critical features.
Systematically evaluate security implications before implementation.
When to Activate
- Designing new authentication/authorization systems
- Building APIs that handle sensitive data
- Implementing user input handling
- Reviewing security concerns in existing code
- Planning features with security requirements
Framework
Five-phase security analysis framework:
- Attack Surface Mapping - Identify all external inputs, resource access, privileges, data handling, and authentication needs
- Threat Modeling - Evaluate injection attacks, authentication bypass, authorization bypass, data exposure, and denial of service vectors
- Secret Management Audit - Verify API keys, credentials, .gitignore rules, logging, and encryption
- Input Validation Design - Establish whitelist validation, type/length/format checks, sanitization, and escaping
- Security Checklist - Verify no secrets in code, input validation coverage, least privilege, safe error messages, dependency scanning, and documented risks
Usage
Apply this framework when security is a primary design concern. Work through phases sequentially, documenting findings and mitigations at each stage.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
python-testing
Python-specific testing practices with pytest, fixtures, mocking, async testing, coverage configuration, and uv execution rules. Activate when working with pytest files, conftest.py, test directories, pyproject.toml testing configuration, or Python test-related tasks.
archive-reprocessing
Flexible, version-tracked reprocessing system for archive transformations using design patterns (Strategy, Template Method, Observer). Activate when working with tools/scripts/lib/, reprocessing scripts, transform versions, archive transformations, metadata transformers, or incremental processing workflows.
structured-analysis
typescript-testing
TypeScript/JavaScript testing practices with Bun's test runner. Activate when working with bun test, .test.ts, .test.js, .spec.ts, .spec.js, testing TypeScript/JavaScript, bunfig.toml, testing configuration, or test-related tasks in Bun projects.
python-workflow
Python project workflow guidelines. Triggers: .py, pyproject.toml, uv, pip, pytest, Python. Covers package management, virtual environments, code style, type safety, testing, configuration, CQRS patterns, and Python-specific development tasks.
hanami-workflow
Hanami framework workflow guidelines. Activate when working with Hanami projects, Hanami CLI, or Hanami-specific patterns.
Didn't find tool you were looking for?