Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/kevinnft-security-and-hardening
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/security-and-hardening
What's inside
- Skill name
security-and-hardening- Description
- 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.
- License
- MIT
- Instructions
- 346 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- files: referenced but missing: references/security-checklist.md
Files (1)
- SKILL.md
SKILL.md (first lines)
# Security and Hardening
## Overview
Security-first development practices for web applications. Treat every external input as hostile, every secret as sacred, and every authorization check as mandatory. Security isn't a phase — it's a constraint on every line of code that touches user data, authentication, or external systems.
## When to Use
- Building anything that accepts user input
- Implementing authentication or authorization
- Storing or transmitting sensitive data
- Integrating with external APIs or services
- Adding file uploads, webhooks, or callbacks
- Handling payment or PII data
## The Three-Tier Boundary System
### Always Do (No Exceptions)
- **Validate all external input** at the system boundary (API routes, form handlers)
- **Parameterize all database queries** — never concatenate user input into SQL
- **Encode output** to prevent XSS (use framework auto-escaping, don't bypass it)
- **Use HTTPS** for all external communication
- **Hash passwords** with bcrypt/scrypt/argon2 (never store plaintext)
- **Set security headers** (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)
- **Use httpOnly, secure, sameSite cookies** for sessions
- **Run `npm audit`** (or equivalent) before every release
### Ask First (Requires Human Approval)
- Adding new authentication flows or changing auth logic
- Storing new categories of sensitive data (PII, payment info)
- Adding new external service integrations
- Changing CORS configuration
- Adding file upload handlers
- Modifying rate limiting or throttling
- Granting elevated permissions or roles
### Never Do
- **Never commit secrets** to version control (API keys, passwords, tokens)
- **Never log sensitive data** (passwords, tokens, full credit card numbers)
- **Never trust client-side validation** as a security boundary
- **Never disable security headers** for convenience
- **Never use `eval()` or `innerHTML`** with user-provided data
- **Never store sessions in client-accessible storage** (localStorage for auth tokens)
- **Never expose stack traces** or internal error details to users
## OWASP Top 10 Prevention
### 1. Injection (SQL, NoSQL, OS Command)
```typescript
// BAD: SQL injection via string concatenation
const query = `SELECT * FROM users WHERE id = '${userId}'`;
// GOOD: Parameterized query
const user = await db.query('SELECT * FROM users WHERE id = $1', [userId]);
// GOOD: ORM with parameterized input
const user = await prisma.user.findUnique({ where: { id: userId } });
```
### 2. Broken Authentication
```typescript
// Password hashing
import { hash, compare } from 'bcrypt';
const SALT_ROUNDS = 12;
const hashedPassword = await hash(plaintext, SALT_ROUNDS);
const isValid = await compare(plaintext, hashedPassword);
// Session management
app.use(session({
secret: process.env.SESSION_SECRET, // From environment, not code
resave: false,
saveUninitialized: false,
cookie: {
httpOnly: true, // Not accessible via JavaScript
secure: true, // HTTPS only
sameSite: 'lax', // CSRF protection
maxAge: 24 * 60 * 60 * 1000, // 24 hours
},
}));
```
### 3. Cross-Site Scripting (XSS)
```typescript
// BAD: Rendering user input as HTML
element.innerHTML = userInput;
// GOOD: Use framework auto-escaping (React does this by default)
return <div>{userInput}</div>;
// If you MUST render HTML, sanitize first
import DOMPurify from 'dompurify';
const clean = DOMPurify.sanitize(userInput);
```
### 4. Broken Access Control
```typescript
// Always check authorization, not just authentication
app.patch('/api/tasks/:id', authenticate, async (req, res) => {
const task = await taskService.findById(req.params.id);
// Check that the authenticated user owns this resource
if (task.ownerId !== req.user.id) {
return res.status(403).json({
error: { code: 'FORBIDDEN', message: 'Not authorized to modify this task' }
});
}
// Proceed with update
const updated = await taskService.update(req.params.id, req.body);
return res.json(updated);
});From kevinnft/ai-agent-skills, MIT.
More from kevinnft/ai-agent-skills
- 0.549score
idea-refine
kevinnft
Refines ideas iteratively.
SkillCFreshness: C★ 14Claude Code +9 - 0.547score
planning-and-task-breakdown
kevinnft
Breaks work into ordered tasks.
SkillCFreshness: C★ 14Claude Code +9 - 0.547score
spec-driven-development
kevinnft
Creates specs before coding.
SkillCFreshness: C★ 14Claude Code +9 - 0.547score
source-driven-development
kevinnft
Grounds every implementation decision in official documentation.
SkillCFreshness: C★ 14Claude Code +9 - 0.547score
using-agent-skills
kevinnft
Discovers and invokes agent skills.
SkillCFreshness: C★ 14Claude Code +9 - 0.547score
git-workflow-and-versioning
kevinnft
Structures git workflow practices.
SkillCFreshness: C★ 14Claude Code +9 - 0.547score
incremental-implementation
kevinnft
Delivers changes incrementally.
SkillCFreshness: C★ 14Claude Code +9 - 0.546score
drawio-headless
kevinnft
Generate architecture diagrams with draw.io in headless/server environments (WSL2, VPS, Docker)
SkillCFreshness: C★ 14Claude Code +9 - 0.543score
creative-ideation
kevinnft
Generate project ideas via creative constraints.
SkillCFreshness: C★ 14Claude Code +9 - 0.543score
frontend-ui-engineering
kevinnft
Builds production-quality UIs.
SkillCFreshness: C★ 14Claude Code +9 - 0.543score
performance-optimization
kevinnft
Optimizes application performance.
SkillCFreshness: C★ 14Claude Code +9 - 0.543score
shipping-and-launch
kevinnft
Prepares production launches.
SkillCFreshness: C★ 14Claude Code +9
Signals
- Stars
- 14
- Forks
- 2
- Open issues
- 1
- Last commit (this folder)
- May 15, 2026 (5 months ago)
- Last release
- Jul 22, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/kevinnft/ai-agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.341score
security-and-hardening
Wang200935
Hardens code against vulnerabilities.
SkillBFreshness: B★ 4Claude Code +9 - 0.336score
security-and-hardening
Zwin-ux
Hardens code against vulnerabilities.
SkillAFreshness: AClaude Code +9 - 0.319score
security-and-hardening
Undermybelt
Hardens code against vulnerabilities.
SkillCFreshness: C★ 10Claude Code +9 - 0.312score
security-and-hardening
LongLiveSocialism
Hardens code against vulnerabilities.
SkillBFreshness: BClaude Code +9 - 0.300score
security-and-hardening
503496348-ops
Hardens code against vulnerabilities.
SkillCFreshness: C★ 2Claude Code +9 - 0.279score
security-and-hardening
CodeCrafterAdi2006
Hardens code against vulnerabilities.
SkillCFreshness: CClaude Code +9
More from kevinnft
- 0.549score
idea-refine
kevinnft
Refines ideas iteratively.
SkillCFreshness: C★ 14Claude Code +9 - 0.547score
planning-and-task-breakdown
kevinnft
Breaks work into ordered tasks.
SkillCFreshness: C★ 14Claude Code +9 - 0.547score
git-workflow-and-versioning
kevinnft
Structures git workflow practices.
SkillCFreshness: C★ 14Claude Code +9 - 0.547score
source-driven-development
kevinnft
Grounds every implementation decision in official documentation.
SkillCFreshness: C★ 14Claude Code +9 - 0.547score
using-agent-skills
kevinnft
Discovers and invokes agent skills.
SkillCFreshness: C★ 14Claude Code +9 - 0.547score
incremental-implementation
kevinnft
Delivers changes incrementally.
SkillCFreshness: C★ 14Claude Code +9
Cite this page
security-and-hardening skill. Agent Mart. https://agentmart.dev/skills/kevinnft-security-and-hardening (last updated 2026-10-24)