Secure coding practices and defensive programming patterns for building security-first applications. Use when implementing authentication, handling user input, managing sensitive data, or conducting secure code reviews.
/plugin marketplace add NickCrew/claude-cortex/plugin install nickcrew-claude-ctx-2@NickCrew/claude-cortexThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/authentication.mdreferences/cryptography.mdreferences/dependencies.mdreferences/error-handling.mdreferences/input-validation.mdreferences/output-encoding.mdreferences/secure-defaults.mdvalidation/rubric.yamlComprehensive guidance for implementing security-first development patterns with defensive programming techniques and proactive threat mitigation strategies.
Apply multiple layers of security controls - never rely on a single protection mechanism.
When errors occur, default to the secure state (deny access, reject input, log event).
Grant minimum necessary permissions - users, services, and databases should have only required access.
Validate all input, encode all output, verify all sources, authenticate all requests.
| Task | Load reference |
|---|---|
| Input validation & sanitization | skills/secure-coding-practices/references/input-validation.md |
| Output encoding & XSS prevention | skills/secure-coding-practices/references/output-encoding.md |
| Authentication & sessions | skills/secure-coding-practices/references/authentication.md |
| Cryptography & key management | skills/secure-coding-practices/references/cryptography.md |
| Dependencies & supply chain | skills/secure-coding-practices/references/dependencies.md |
| Error handling & logging | skills/secure-coding-practices/references/error-handling.md |
| Secure defaults & configuration | skills/secure-coding-practices/references/secure-defaults.md |
Input Validation:
Output Encoding:
Authentication & Authorization:
Cryptography:
Dependencies:
Error Handling & Logging:
Watch for these patterns in code reviews:
OWASP Resources:
Standards & Guidelines:
Tools:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.