Back to Skills

security-and-hardening

Hardens code against vulnerabilities. Use when handling user input, authentication, data storage, or external integrations. Use when building any feature that accepts untrusted data, manages user sessions, or interacts with third-party services.

42,994stars4,732forksUpdated 5/18/2026

Security Assessment

Critical Risk(25/100)

Detected risks:

Remote Code Execution([SKILL.md] eval()
Secret Exposure([SKILL.md] Password =, [SKILL.md] API_KEY =)
Sensitive File Access([SKILL.md] .env)
Security Score25/100

About security-and-hardening

The security-and-hardening skill is designed to help developers fortify their web applications against common vulnerabilities and security risks. It emphasizes a proactive security mindset, ensuring that every interaction with user data, authentication mechanisms, and external services is handled safely. By embedding security practices into the development process, this skill minimizes the risk of data breaches, unauthorized access, and exploitation of software weaknesses, particularly when dealing with untrusted input or sensitive information.

The skill provides a structured approach to security through clear guidelines, including the three-tier boundary system: actions that must always be performed, actions that require human approval, and practices that should never be done. Key capabilities include input validation, parameterized database queries, output encoding to prevent XSS, HTTPS enforcement, secure password hashing, security header configuration, safe session management, and audit checks. It also provides specific examples and code snippets for preventing top OWASP threats like injection attacks, broken authentication, XSS, and broken access control, helping developers implement these best practices consistently.

This skill is particularly valuable for developers building applications that handle user input, authentication, sensitive data, or integrate with external APIs. Target users include backend developers, full-stack engineers, and security-conscious teams working on web applications, APIs, or services that require robust defenses against common attacks. Use cases span from implementing secure authentication flows and session management to safely processing user-generated content and managing integrations with third-party services.

FAQ

When should I use the security-and-hardening skill?

Use it whenever you are handling user input, authentication, storing sensitive data, integrating with external services, or adding features like file uploads and webhooks. Essentially, any feature that touches untrusted data or sensitive information.

Which programming languages and frameworks are compatible?

The skill provides guidance primarily in web application contexts and includes examples in JavaScript/TypeScript. It is applicable to frameworks that support these languages, such as Node.js, React, and Express.

Does the skill replace the need for code reviews or security audits?

No, it complements them. While it provides structured practices and preventative measures, human review and formal security audits are still necessary for comprehensive security assurance.

Are there any limitations to the types of attacks it prevents?

The skill focuses on common web vulnerabilities like injection, XSS, broken authentication, and access control issues. It may not cover highly specialized or emerging attack vectors without additional security measures.

Install security-and-hardening

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill