CRITICAL security skill teaching proper credential and password handling. NEVER store passwords, use bcrypt/argon2, NEVER accept third-party credentials. Use when handling authentication, passwords, API keys, or any sensitive credentials.
Enforces secure password handling by requiring bcrypt/argon2 for hashing and OAuth for third-party services. Activates when handling passwords, API keys, or authentication to prevent critical security vulnerabilities.
/plugin marketplace add djankies/claude-configs/plugin install typescript@claude-configsThis skill is limited to using the following tools:
references/correct-implementations.mdreferences/emergency-response.mdreferences/never-do-this.mdreferences/password-validation.mdTHIS IS A ZERO-TOLERANCE SECURITY SKILL. NO EXCEPTIONS. </role>
<when-to-activate> This skill activates when:RULE 1: NEVER STORE PASSWORDS
Store password HASHES only, using bcrypt or argon2. Passwords must be:
RULE 2: NEVER ACCEPT THIRD-PARTY CREDENTIALS
NEVER ask users for passwords to other services (PayPal, Google, etc.):
RULE 3: NEVER USE ENCODING AS ENCRYPTION
RULE 4: USE PROPER CRYPTOGRAPHY
❌ Base64 "Encryption": Buffer.from(password).toString("base64") is encoding, NOT encryption. Trivially reversible.
❌ Third-Party Passwords: Never accept PayPal/Google/etc passwords. Use OAuth.
❌ Plaintext Storage: Never store raw passwords. Always hash.
❌ Weak Hashing: MD5/SHA-1/SHA-256 too fast. Use bcrypt/argon2.
See references/never-do-this.md for detailed examples and failures.
</critical-anti-patterns>
import bcrypt from "bcrypt";
const SALT_ROUNDS = 12;
async function hashPassword(password: string): Promise<string> {
return await bcrypt.hash(password, SALT_ROUNDS);
}
async function verifyPassword(
password: string,
hash: string
): Promise<boolean> {
return await bcrypt.compare(password, hash);
}
interface User {
id: string;
email: string;
passwordHash: string;
}
Key Points:
import argon2 from "argon2";
async function hashPassword(password: string): Promise<string> {
return await argon2.hash(password, {
type: argon2.argon2id,
memoryCost: 2 ** 16,
timeCost: 3,
parallelism: 1
});
}
Advantages: Memory-hard, resists GPU attacks, latest standard.
import { google } from "googleapis";
const oauth2Client = new google.auth.OAuth2(
process.env.GOOGLE_CLIENT_ID,
process.env.GOOGLE_CLIENT_SECRET,
"http://localhost:3000/auth/callback"
);
function getAuthUrl(): string {
return oauth2Client.generateAuthUrl({
access_type: "offline",
scope: ["https://www.googleapis.com/auth/userinfo.email"]
});
}
Key Points: Token-based, never sees user password, revocable.
function loadConfig(): Config {
const apiKey = process.env.STRIPE_API_KEY;
if (!apiKey) {
throw new Error("Missing required API key");
}
return { apiKey };
}
See references/correct-implementations.md for complete examples.
</correct-patterns>
NEVER:
SHOULD:
See references/password-validation.md for complete implementation.
</password-requirements>
bcrypt:
npm install bcrypt
npm install -D @types/bcrypt
argon2:
npm install argon2
npm install -D @types/argon2
Note: Both require native compilation. Ensure build tools are available. </installation>
<progressive-disclosure> ## Reference FilesDetailed Examples:
references/never-do-this.md - Security failures and anti-patternsreferences/correct-implementations.md - Complete working examplesreferences/password-validation.md - Password strength validationreferences/emergency-response.md - Breach response and migrationRelated Skills:
Password Storage:
Third-Party Auth:
API Keys:
.env file in .gitignorePassword Requirements:
Additional Security:
"I need to retrieve the password later" → You never need to retrieve passwords. Use password reset instead.
"Base64 is encryption" → Base64 is encoding for transport, not security.
"I'll encrypt passwords" → If you can decrypt, so can attackers. Hash, don't encrypt.
"SHA-256 is secure" → SHA-256 is too fast. Use bcrypt/argon2.
"I need PayPal credentials to check balance" → Use PayPal's API with OAuth tokens. </common-mistakes>
<emergency-response> ## If You Find Insecure Password StorageIMMEDIATE ACTIONS:
See references/emergency-response.md for complete migration guide.
</emergency-response>
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.