security-best-practices
Skill8 starsChanged 10 months agoMITView on GitHub
Security best practices, OWASP guidelines, secure coding patterns, and vulnerability prevention. Use when implementing authentication, handling user input, securing APIs, managing secrets, or reviewing code for security vulnerabilities.
25 other projects use a version of this.
Adopted by
Most recently taken up by
- hmjBill/skillstheir own version, first seen Oct 5, 2026
- z91772524-ai/pojia-next-mactheir own version, first seen Sep 28, 2026
- lklimek/claudiustheir own version, first seen Sep 23, 2026
- PracticalSwan/agent-skillstheir own version, first seen Sep 14, 2026
- AymanShams/codex-coding-ostheir own version, first seen Sep 12, 2026
- belentani7/manus-ai-skill-packtheir own version, first seen Sep 12, 2026
Used with
Projects with it also use supabase-postgres-best-practices, api-design and 7 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 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
VercelSkillvercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Also in 4 projects that use this
VercelSkillagent-browser
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
Also in 4 projects that use this
StrayDragonSkillui-ux-pro-max
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.
Also in 3 projects that use this
MicrosoftSkillmcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Also in 4 projects that use this
Other versions25 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 25
- openai/skills★ 28ksame name
- JetBrains/skills★ 360same name
- Mindrally/skills★ 266same name
- letitbk/claude-academic-setup★ 46same name
- sampleXbro/agentsmesh★ 25same name
- ckorhonen/claude-skills★ 18same name
- PracticalSwan/agent-skills★ 18same name
- autohandai/community-skills★ 11same name
- svngoku/coding-agents-skills★ 11same name
- z91772524-ai/pojia-next-mac★ 9same name
15 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 repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- api-rest-designSkill
- brandkitSkill
- industrial-brutalist-uiSkill
- bug-fixingSkill
- ci-cd-pipelinesSkill
- code-documentationSkill
- context7Skill
- design-an-interfaceSkill
- docker-patternsSkill
- feature-developmentSkill
- frontend-designSkill
- git-commitSkill
- git-releaseSkill
- git-team-workflowSkill
- go-conventionsSkill
- gpt-tasteSkill
- imagegen-frontend-mobileSkill
- imagegen-frontend-webSkill
- image-to-codeSkill
- issue-writingSkill
- kubernetes-patternsSkill
- microservices-patternsSkill
- minimalist-uiSkill
- mongodb-patternsSkill
- observability-monitoringSkill
- full-output-enforcementSkill
- performance-optimizationSkill
- postgresql-patternsSkill
- prdSkill
- pr-writingSkill
- python-patternsSkill
- redesign-existing-projectsSkill
- refactoring-safelySkill
- rust-patternsSkill
- skill-creatorSkill
- high-end-visual-designSkill
- spec-driven-developmentSkill
- sqlserver-patternsSkill
- stitch-design-tasteSkill
- task-managementSkill
- design-taste-frontendSkill
- testing-strategiesSkill
- ts-react-nextjsSkill
- ts-vue-svelteSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 24 edited versions we read keep these.
4
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
- Distinctive: line 16
Injection: - Use parameterized queries, never concatenate user input into SQL/commands
- Distinctive: line 23
Insecure Deserialization: - Use JSON instead of pickle, validate data
- Distinctive: line 100
Always include these headers:
- Distinctive: line 113
Use this skill when:
“Common” is measured: kept by at least 6 in 10 of the 24 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 Skill
Overview
This skill provides security guidelines following OWASP Top 10, secure coding patterns, authentication/authorization best practices, secrets management, and vulnerability prevention across multiple languages.
OWASP Top 10 Summary
- Injection - Use parameterized queries, never concatenate user input into SQL/commands
- Broken Authentication - Implement strong passwords, secure sessions, rate limiting
- Sensitive Data Exposure - Encrypt data at rest, use HTTPS, hash passwords
- XML External Entities (XXE) - Disable external entities in XML parsers
- Broken Access Control - Enforce authorization checks, implement resource-level controls
- Security Misconfiguration - Secure defaults, minimal privileges, regular updates
- Cross-Site Scripting (XSS) - Escape output, sanitize input, use CSP headers
- Insecure Deserialization - Use JSON instead of pickle, validate data
- Known Vulnerabilities - Regular dependency scanning, keep components updated
- Insufficient Logging - Log security events, monitor for anomalies
Quick Security Checklist
Input Validation
- Validate all user input on server side
- Use allowlists, not denylists
- Sanitize data before display (prevent XSS)
- Validate file uploads (type, size, extension)
Authentication
- Use strong password requirements (12+ chars, complexity)
- Hash passwords with bcrypt/Argon2 (not MD5/SHA1)
- Implement rate limiting on login endpoints
- Use secure session management (HttpOnly, Secure, SameSite)
Authorization
- Check permissions on every request
- Implement principle of least privilege
- Use resource-level access controls
- Never rely on client-side checks
Data Protection
- Encrypt sensitive data at rest
- Use TLS 1.2+ for all connections
- Set security headers (HSTS, CSP, X-Frame-Options)
- Never log sensitive data (passwords, tokens, PII)
Secrets Management
- Use environment variables or secret managers
- Never commit secrets to version control
- Rotate secrets regularly
- Use different secrets per environment
Common Vulnerabilities Prevention
SQL Injection
# ✅ SAFE: Parameterized query
cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))
# ❌ UNSAFE: String concatenation
query = f"SELECT * FROM users WHERE id = '{user_id}'"XSS Prevention
# ✅ SAFE: Template auto-escaping
return render_template('profile.html', username=username)
# ❌ UNSAFE: Raw HTML
return f"<div>{user_input}</div>"Command Injection
# ✅ SAFE: Use list, not shell
subprocess.run(["ls", "-la", directory], shell=False)
# ❌ UNSAFE: Shell with user input
os.system(f"ls -la {directory}")Language-Specific Patterns
See detailed guides in references/:
- OWASP Top 10 Details - Comprehensive prevention for all 10 categories
- Secure Coding - Python - Python-specific security patterns
- Secure Coding - JavaScript - Node.js/Frontend security
- Secure Coding - Go - Go security patterns
- Secrets Management - AWS, Vault, GCP secret management
Security Headers
Always include these headers:
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Content-Security-Policy: default-src 'self'
Referrer-Policy: strict-origin-when-cross-originWhen to Use This Skill
Use this skill when:
- Implementing authentication and authorization systems
- Handling user input and data validation
- Setting up HTTPS and security headers
- Managing secrets and credentials
- Configuring CORS and CSP policies
- Reviewing code for security vulnerabilities
- Setting up logging and monitoring
- Configuring Docker and deployment security
Related Skills
@docker-patterns- Container security hardening@ci-cd-pipelines- Security scanning in CI/CD@api-rest-design- API security patterns@postgresql-patterns- Database security@feature-development- Secure development workflow
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.

