security-and-hardening
Skill1 starsChanged 5 months agoMITView on GitHub
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.
45 other projects use a version of this, 34 of them edited.
Adopted by
Most recently taken up by
- GuillemRoca/agent-skills-androidtheir own version, first seen Oct 3, 2026
- addyosmani/agent-skillsedited, first seen Oct 3, 2026
- weisser-dev/agentic-skillsedited, first seen Oct 3, 2026
- Rvey/agent-engineering-kitedited, first seen Oct 1, 2026
- fworks-tech/agenthoodtheir own version, first seen Sep 28, 2026
- lintangknitto/agent-skillsedited, first seen Sep 23, 2026
Used with
Projects with it also use constraint-driven-development, observability-and-instrumentation and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
vinvcnSkillconstraint-driven-development
把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。
Also in 4 projects that use this
borhen68Skillobservability-and-instrumentation
Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.
Also in 13 projects that use this
az9713Skilldeprecation-and-migration
Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.
Also in 20 projects that use this
galandoSkillsource-driven-development
Version-aware, source-driven development — fetch official docs before writing framework code
Also in 22 projects that use this
mycelium-hqSkilldoubt-driven-development
Use when correctness matters more than speed: about to commit non-trivial code, make an architectural call under uncertainty, work in unfamiliar code, or assert what the compiler cannot check (''this is safe'', ''thread-safe'', ''this scales'', ''matches the spec''). Strongest on high-stakes surfaces (production deploys, security-sensitive logic, data migrations, irreversible operations) and when the user asks to sanity-check, red-team, double-check, or get a second opinion on a decision.
Also in 17 projects that use this
luischanciSkillinterview-me
Interactive interview to formalize a research idea into a structured specification with hypotheses and empirical strategy.
Also in 16 projects that use this
Other versions45 projects use a version of this.
Word for word · 0
None found.
Edited · 34
- addyosmani/agent-skills★ 101k18% same
- shashankswe2020-ux/whoop-mcp★ 16544% same
- az9713/addyosmani-agent-skills★ 3844% same
- jmxt3/gitscape.ai★ 3244% same
- sampleXbro/agentsmesh★ 2544% same
- ishandutta2007/Awesome-Agent-Skills★ 2124% same
- HiAi-gg/hiai-opencode★ 1845% same
- borhen68/SkillEngine★ 1717% same
- kevinnft/ai-agent-skills★ 1344% same
- lza6/claw-code-tingfeng★ 445% same
24 more not listed
Wrote their own version · 11
- thiientv/godmode★ 96same name
- vinvcn/addyosmani-agent-skills-zh★ 38same name
- dzevs/zynk★ 4same name
- fworks-tech/agenthood★ 3same name
- momentmaker/kaijutsu★ 3same name
- GuillemRoca/agent-skills-android★ 2same name
- sohaibdevv/AI-AGENT-SKILLS★ 2same name
- celestialdust/achilles-skills★ 1same name
- Chrike/coding-agent-skills★ 1same name
- iancleary/skills★ 1same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- add-buildpadSkill
- add-external-oauthSkill
- add-filesSkill
- add-i18nSkill
- add-microappSkill
- add-microfrontendSkill
- add-microfrontend-zonesSkill
- add-multitenancySkill
- add-usersSkill
- amplify-env-varsSkill
- authentication-proxySkill
- buildpad-debugSkill
- buildpad-discoverySkill
- buildpad-implSkill
- buildpad-referenceSkill
- buildpad-reviewSkill
- buildpad-spec-batchSkill
- buildpad-spec-designSkill
- buildpad-spec-initSkill
- buildpad-spec-quickSkill
- buildpad-spec-requirementsSkill
- buildpad-spec-statusSkill
- buildpad-spec-tasksSkill
- buildpad-steering-customSkill
- buildpad-steeringSkill
- buildpad-validate-designSkill
- buildpad-validate-gapSkill
- buildpad-validate-implSkill
- buildpad-verify-completionSkill
- code-simplificationSkill
- context-engineeringSkill
- create-api-routeSkill
- create-collectionSkill
- create-componentSkill
- create-cronSkill
- create-featureSkill
- create-form-builderSkill
- create-migrationSkill
- create-projectSkill
- create-rbacSkill
- create-serviceSkill
- create-testsSkill
- create-workflowSkill
- daas-platformSkill
- debugging-and-error-recoverySkill
- generate-docsSkill
- git-workflow-and-versioningSkill
- grant-module-accessSkill
- hooks-extensionsSkill
- idea-refineSkill
- incremental-implementationSkill
- manage-scopeSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- relational-permissionsSkill
- review-codeSkill
- spec-driven-developmentSkill
- subagent-delegationSkill
- worker-messagingSkill
The file
We split this skill into the rules it gives an agent
2 rules. 2 are common, 0 are distinctive, and 0 are very specific to this project.
2
Common
Most of the 44 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 162
No rate limiting on authentication endpoints
- Common: line 168
After implementing security-relevant code:
“Common” is measured: kept by at least 6 in 10 of the 44 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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(orpnpm audit) 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()orinnerHTMLwith user-provided data - Never store sessions in client-accessible storage (localStorage for auth tokens)
- Never expose stack traces or internal error details to users
DaaS-Specific Security
Proxy Pattern Enforcement
❌ Browser → DaaS Backend (CORS issues, token exposure)
❌ Browser → supabase.auth.signIn() (cookie issues)
✅ Browser → /api/auth/login → Supabase Auth
✅ Browser → /api/items/* → DaaS BackendEnvironment Variables
# Server-side only (NEVER prefix with NEXT_PUBLIC_)
SUPABASE_SERVICE_ROLE_KEY=...
# Client-safe (only non-sensitive values)
NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...
NEXT_PUBLIC_BUILDPAD_DAAS_URL=...CORS Configuration
// DaaS CORS must use explicit origins when credentials: 'include' is used
// NEVER use cors_origins: ["*"] with credentials
{
cors_origins: [
"http://localhost:3000",
"https://main.d1234abcde.amplifyapp.com"
],
cors_allow_credentials: true,
cors_max_age: 0 // bust cached preflight during changes
}Input Validation
import { z } from 'zod';
const CreateTaskSchema = z.object({
title: z.string().min(1).max(200).trim(),
description: z.string().max(2000).optional(),
priority: z.enum(['low', 'medium', 'high']).default('medium'),
dueDate: z.string().datetime().optional(),
});
// Validate at the route handler
export async function POST(req: NextRequest) {
const result = CreateTaskSchema.safeParse(await req.json());
if (!result.success) {
return NextResponse.json(
{ error: { code: 'VALIDATION_ERROR', details: result.error.flatten() } },
{ status: 422 }
);
}
// result.data is now typed and validated
}Security Review Checklist
Authentication
- Passwords hashed with bcrypt/scrypt/argon2 (salt rounds ≥ 12)
- Session tokens are httpOnly, secure, sameSite
- Login has rate limiting
- Password reset tokens expire
Authorization
- Every endpoint checks user permissions
- Users can only access their own resources
- Admin actions require admin role verification via DaaS RBAC
Input
- All user input validated at the boundary
- SQL queries are parameterized
- HTML output is encoded/escaped
Data
- No secrets in code or version control
- Sensitive fields excluded from API responses
- PII encrypted at rest (if applicable)
Infrastructure
- Security headers configured (CSP, HSTS, etc.)
- CORS restricted to known origins
- Dependencies audited for vulnerabilities
- Error messages don't expose internals
Common Rationalizations
| Rationalization | Reality |
| "This is an internal tool, security doesn't matter" | Internal tools get compromised. Attackers target the weakest link. |
| "We'll add security later" | Security retrofitting is 10x harder than building it in. Add it now. |
| "No one would try to exploit this" | Automated scanners will find it. Security by obscurity is not security. |
| "The framework handles security" | Frameworks provide tools, not guarantees. You still need to use them correctly. |
| "It's just a prototype" | Prototypes become production. Security habits from day one. |
Red Flags
- User input passed directly to database queries, shell commands, or HTML rendering
- Secrets in source code or commit history
- API endpoints without authentication or authorization checks
- Missing CORS configuration or wildcard (
*) origins with credentials - No rate limiting on authentication endpoints
- Stack traces or internal errors exposed to users
- Dependencies with known critical vulnerabilities
Verification
After implementing security-relevant code:
pnpm auditshows no critical or high vulnerabilities- No secrets in source code or git history
- All user input validated at system boundaries
- Authentication and authorization checked on every protected endpoint
- Security headers present in response (check with browser DevTools)
- Error responses don't expose internal details
- Rate limiting active on auth endpoints
See Also
For detailed checklists, see references/security-checklist.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

