security-best-practices
Skill1 starsChanged 11 months agoMITView on GitHub
Security best practices and vulnerability prevention. Auto-activates when writing code that handles auth, user input, or sensitive data.
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 33 edited versions we read keep these.
2
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
- could be automatic: a setting could enforce it
- Distinctive: line 52
Never commit secrets to git
- Distinctive: line 55
Use secrets manager in production
“Common” is measured: kept by at least 6 in 10 of the 33 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 Best Practices
OWASP Top 10 Prevention
1. Injection Prevention
// SQL - Use parameterized queries
const user = await db.query('SELECT * FROM users WHERE id = $1', [userId]);
// NoSQL - Sanitize input
const user = await User.findOne({ email: sanitize(email) });2. Authentication
// Password hashing
import bcrypt from 'bcrypt';
const hash = await bcrypt.hash(password, 12);
const valid = await bcrypt.compare(input, hash);
// JWT with short expiry
const token = jwt.sign({ userId }, secret, { expiresIn: '15m' });3. XSS Prevention
// React auto-escapes, but avoid dangerouslySetInnerHTML
// If needed, use DOMPurify
import DOMPurify from 'dompurify';
const clean = DOMPurify.sanitize(userHtml);4. CSRF Protection
// Use CSRF tokens
app.use(csrf());
res.cookie('XSRF-TOKEN', req.csrfToken());5. Security Headers
import helmet from 'helmet';
app.use(helmet());Secrets Management
- Never commit secrets to git
- Use environment variables
- Rotate keys regularly
- Use secrets manager in production
Checklist
- Input validation on all user data
- Output encoding for XSS prevention
- Parameterized queries for SQL
- HTTPS enforced
- Security headers set
- Rate limiting implemented
- Logging without sensitive data
Other versions34 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 34
- openai/skills★ 27ksame name
- deadlock-mod-manager/deadlock-mod-manager★ 559same name
- JetBrains/skills★ 386same name
- Mindrally/skills★ 275same name
- z91772524-ai/pojia-next-mac★ 39same name
- sampleXbro/agentsmesh★ 24same name
- PracticalSwan/agent-skills★ 22same name
- ckorhonen/claude-skills★ 17same name
- svngoku/coding-agents-skills★ 12same name
- cogine-ai/cogine-dev-skillset★ 4same name
24 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.
Used alongsideProjects with it also use supabase-postgres-best-practices, better-auth-best-practices and 8 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.
JetBrainsSkillsupabase-postgres-best-practices
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.
Also in 5 projects that use this
anasahmed07Skillbetter-auth-best-practices
Skill for integrating Better Auth - the comprehensive TypeScript authentication framework.
Also in 3 projects that use this
LLl0k0laDSkillidea-refine
Refine ideas through structured divergent and convergent thinking. Use "idea-refine" or "ideate" to trigger.
Also in 3 projects that use this
LLl0k0laDSkillshipping-and-launch
Use when preparing to deploy to production. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.
Also in 3 projects that use this
HK-hubSkillcode-simplification
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.
Also in 3 projects that use this
barisariburnuSkillperformance-optimization
Complete performance optimization guide for Next.js applications including frontend, backend, database, caching, and general optimization strategies. Use when improving performance, reducing bundle size, optimizing queries, or implementing caching.
Also in 3 projects that use this
In this repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-integrationSkill
- authenticationSkill
- caching-strategiesSkill
- ci-cd-pipelinesSkill
- clean-architectureSkill
- code-patternsSkill
- database-designSkill
- docker-composeSkill
- error-handlingSkill
- frontend-designSkill
- git-workflowSkill
- logging-monitoringSkill
- microservicesSkill
- performance-tuningSkill
- project-setupSkill
- systematic-debuggingSkill
- tddSkill
- testing-strategiesSkill
- websockets-realtimeSkill
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.

