Secure Coding
techygarg/lattice
Apply security-conscious thinking when generating or modifying code.
Application security covering input validation, auth, headers, secrets management, and dependency auditing
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill security-hardening -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rohitg00/awesome-claude-code-toolkit security-hardening --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/security-hardening .claude/skills/security-hardening && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "security-hardening" agent skill from https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/security-hardening into .claude/skills/security-hardening/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "security-hardening", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/security-hardeningType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill security-hardening -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rohitg00/awesome-claude-code-toolkit security-hardening --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/security-hardening .agents/skills/security-hardening && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "security-hardening" agent skill from https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/security-hardening into .agents/skills/security-hardening/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "security-hardening", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill security-hardening -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rohitg00/awesome-claude-code-toolkit security-hardening --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/security-hardening .cursor/skills/security-hardening && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "security-hardening" agent skill from https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/security-hardening into .cursor/skills/security-hardening/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "security-hardening", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/rohitg00/awesome-claude-code-toolkit.git --path skills/security-hardening--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill security-hardening -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rohitg00/awesome-claude-code-toolkit security-hardening --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/security-hardening .gemini/skills/security-hardening && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "security-hardening" agent skill from https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/security-hardening into .gemini/skills/security-hardening/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "security-hardening", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install rohitg00/awesome-claude-code-toolkit security-hardeningInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill security-hardening -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/security-hardening .github/skills/security-hardening && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "security-hardening" agent skill from https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/security-hardening into .github/skills/security-hardening/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "security-hardening", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill security-hardening -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install rohitg00/awesome-claude-code-toolkit security-hardening --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/security-hardening .opencode/skills/security-hardening && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "security-hardening" agent skill from https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/security-hardening into .opencode/skills/security-hardening/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "security-hardening", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
security-hardeningApplication security covering input validation, auth, headers, secrets management, and dependency auditing
Security Hardening is an agent skill from rohitg00/awesome-claude-code-toolkit. Application security covering input validation, auth, headers, secrets management, and dependency auditing
Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in DevOps & Cloud, covering Secrets management, Security review and Web application vulnerabilities. The repository describes itself as: The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills, 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 14 MCP configs, 26 companion apps, 52… The licence is Apache-2.0.
10 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit ebdf1d5. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitleaksnpmnpxFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npm and npx, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Security Hardening loads about 1.5k tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 373 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
o version control (use `.gitignore` for `.env`)Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from rohitg00/awesome-claude-code-toolkit at commit ebdf1d5, republished under its Apache-2.0 licence (© rohitg00). 373 words, ~1,511 tokens.
.claude/skills/security-hardening/SKILL.md (or your agent's skills folder).Validate all input at the boundary. Never trust client-side validation alone.
import { z } from 'zod';
const CreateUserSchema = z.object({
email: z.string().email().max(255),
name: z.string().min(1).max(100).regex(/^[a-zA-Z\s'-]+$/),
age: z.number().int().min(13).max(150),
});
function createUser(req: Request) {
const result = CreateUserSchema.safeParse(req.body);
if (!result.success) {
return { status: 400, errors: result.error.flatten().fieldErrors };
}
// result.data is typed and validated
}Rules:
// Prevent XSS: encode output based on context
// HTML context: use framework auto-escaping (React does this by default)
// Never use dangerouslySetInnerHTML with user input
// URL context: encode parameters
const safeUrl = `/search?q=${encodeURIComponent(userInput)}`;
// JSON context: use JSON.stringify (handles escaping)
const safeJson = JSON.stringify({ query: userInput });Never construct HTML strings with user input. Use templating engines with auto-escaping enabled.
# NEVER do this
cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
# Always use parameterized queries
cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))// NEVER do this
db.query(`SELECT * FROM users WHERE email = '${email}'`);
// Always use parameterized queries
db.query("SELECT * FROM users WHERE email = $1", [email]);Use an ORM or query builder. If writing raw SQL, always parameterize.
// Server: generate and validate CSRF tokens
import { randomBytes } from 'crypto';
function generateCsrfToken(): string {
return randomBytes(32).toString('hex');
}
// Middleware: validate on state-changing requests
function csrfMiddleware(req, res, next) {
if (['POST', 'PUT', 'PATCH', 'DELETE'].includes(req.method)) {
const token = req.headers['x-csrf-token'] || req.body._csrf;
if (!timingSafeEqual(token, req.session.csrfToken)) {
return res.status(403).json({ error: 'Invalid CSRF token' });
}
}
next();
}For APIs with token-based auth (Bearer tokens), CSRF is not needed since the token is not auto-sent by browsers.
Content-Security-Policy:
default-src 'self';
script-src 'self' 'nonce-{random}';
style-src 'self' 'unsafe-inline';
img-src 'self' data: https:;
font-src 'self';
connect-src 'self' https://api.example.com;
frame-ancestors 'none';
base-uri 'self';
form-action 'self';Start strict, relax as needed. Use nonce for inline scripts instead of unsafe-inline. Report violations with report-uri directive. Test with Content-Security-Policy-Report-Only first.
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()Set these on every response. Use helmet (Node.js) or equivalent middleware.
// Per-user, per-endpoint rate limiting
const rateLimits = {
'POST /auth/login': { window: '15m', max: 5 },
'POST /auth/register': { window: '1h', max: 3 },
'POST /api/*': { window: '1m', max: 60 },
'GET /api/*': { window: '1m', max: 120 },
};Use sliding window algorithm. Store counters in Redis. Return 429 with Retry-After header. Apply stricter limits to authentication endpoints.
iss, aud, exp, and nbf claims on every request// Verify JWT with all checks
const payload = jwt.verify(token, publicKey, {
algorithms: ['RS256'],
issuer: 'auth.example.com',
audience: 'api.example.com',
clockTolerance: 30,
});.gitignore for .env)trufflehog, gitleaks, git-secrets# Check for secrets in git history
gitleaks detect --source . --verbose
# Pre-commit hook to prevent secret commits
gitleaks protect --staged# Node.js
npm audit --production
npx better-npm-audit audit --level=high
# Python
pip-audit
safety check
# Go
govulncheck ./...Run dependency audits in CI on every PR. Block merges on critical/high vulnerabilities. Pin dependency versions. Update dependencies weekly with automated PRs (Dependabot, Renovate).
© rohitg00, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/security-hardening of rohitg00/awesome-claude-code-toolkit.
Open the folder on GitHubat commit ebdf1d5
Security Hardening next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Security Hardening this skillrohitg00/awesome-claude-code-toolkit | 2.7k | — | ~1.5k | Automated safety check: Notes | Apache-2.0 | |
| Secure Codingtechygarg/lattice | 199 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Security Scanericrisco/rsc-harness | 180 | — | ~2.8k | Automated safety check: Notes | MIT | |
| Security Baselinerampstackco/claude-skills | 945 | — | ~3k | Automated safety check: Pass | MIT | |
| Discover Securityrand/cc-polymath | 181 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Vercel Security Basicsjeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~1.9k | Automated safety check: Notes | MIT |
techygarg/lattice
Apply security-conscious thinking when generating or modifying code.
ericrisco/rsc-harness
A skill your agent uses when automated scanners drive a security sweep of a repo or app — SAST, dependency/lockfile CVEs, secrets in the tree or git history, IaC misconfig — and the raw output has…
rampstackco/claude-skills
Establish a security baseline for a website or web app. An agent skill from rampstackco/claude-skills.
rand/cc-polymath
Automatically discover security skills when working with authentication, authorization, input validation, security headers, vulnerability assessment, or secrets management.
jeremylongshore/tons-of-skills-marketplace
Apply Vercel security best practices for secrets, headers, and access control.
semgrep/skills
Security guidelines for writing secure code. An agent skill from semgrep/skills.
rohitg00/awesome-claude-code-toolkit
Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing
rohitg00/awesome-claude-code-toolkit
Route broad or ambiguous AgentKit SEO work to the right module while keeping context scoped.
rohitg00/awesome-claude-code-toolkit
REST API design with resource naming, pagination, versioning, and OpenAPI spec generation
rohitg00/awesome-claude-code-toolkit
Authentication and authorization patterns including OAuth2, JWT, RBAC, session management, and PKCE flows
rohitg00/awesome-claude-code-toolkit
AWS cloud patterns for Lambda, ECS, S3, DynamoDB, and Infrastructure as Code with CDK/Terraform
rohitg00/awesome-claude-code-toolkit
CI/CD pipeline patterns for GitHub Actions, GitLab CI, testing strategies, and deployment automation
Categories
Application security covering input validation, auth, headers, secrets management, and dependency auditing. Security Hardening is an agent skill from rohitg00/awesome-claude-code-toolkit.
Security Hardening fits situations like: tasks that involve Secrets management; tasks that involve Security review; tasks that involve Web application vulnerabilities.
Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill security-hardening -a claude-code`. Or copy the skill folder (skills/security-hardening in rohitg00/awesome-claude-code-toolkit) into .claude/skills/security-hardening in your project. Claude Code loads it when a task matches its description.
Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill security-hardening -a codex`. Or copy the skill folder (skills/security-hardening in rohitg00/awesome-claude-code-toolkit) into .agents/skills/security-hardening in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rohitg00/awesome-claude-code-toolkit --skill security-hardening -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/security-hardening, .gemini/skills/security-hardening, .github/skills/security-hardening and .opencode/skills/security-hardening in your project.
Going by SKILL.md and its folder, Security Hardening needs the command-line tools its instructions call (gitleaks, npm and npx). Our summary lists: Python 3; Node.js.
SKILL.md contains no URLs. Its commands use npm and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Security Hardening is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Security Hardening: Secure Coding (techygarg/lattice, 199 stars), Security Scan (ericrisco/rsc-harness, 180 stars), Security Baseline (rampstackco/claude-skills, 945 stars) and Discover Security (rand/cc-polymath, 181 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
rohitg00 (a GitHub user) maintains it in rohitg00/awesome-claude-code-toolkit, which has 2,686 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on May 12, 2026.
Source: rohitg00/awesome-claude-code-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.