security-best-practices
Skill266 starsChanged 10 months agoApache-2.0View on GitHub
Security best practices for backend development, microservices, and secure coding patterns with emphasis on input validation and authentication
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, spec-driven-development 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.
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
guaderramaSkillspec-driven-development
Generate comprehensive specifications for software projects using spec-driven development methodology. Leverages Bright Data MCP tools to research documentation, analyze competitor implementations, gather real-world examples, and enrich specs with architectural insights. Use when user requests specifications, technical plans, project specs, or architecture documentation.
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
- +1 more from vercel-labs
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
- 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
- Jonathan0823/opencode-config★ 8same 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 repository264 other files it gives its agents.
- accessibility-a11ySkill
- alpine-jsSkill
- analytics-data-analysisSkill
- android-developmentSkill
- angular-developmentSkill
- angularSkill
- anime-jsSkill
- anthropic-claude-developmentSkill
- api-developmentSkill
- apollo-graphqlSkill
- aspnet-coreSkill
- astroSkill
- auth0-authenticationSkill
- autogen-developmentSkill
- automl-hyperparameter-optimizationSkill
- aws-developmentSkill
- azureSkill
- backend-developmentSkill
- bash-scriptingSkill
- beautifulsoup-parsingSkill
- bitbucket-workflowSkill
- blazorSkill
- blender-python-addonSkill
- blockchainSkill
- bootstrapSkill
- business-central-developmentSkill
- cheerio-parsingSkill
- chrome-extension-developmentSkill
- ci-cd-best-practicesSkill
- clean-architectureSkill
- clean-codeSkill
- clerk-authenticationSkill
- cloudflare-developmentSkill
- computer-vision-opencvSkill
- convexSkill
- cppSkill
- c-sharpSkill
- cssSkill
- cypressSkill
- data-analysis-jupyterSkill
- data-analystSkill
- data-jupyter-pythonSkill
- deep-learning-pythonSkill
- deep-learning-pytorchSkill
- deep-learningSkill
- deno-typescriptSkill
- design-systemsSkill
- devopsSkill
- django-pythonSkill
- django-rest-api-developmentSkill
- dockerSkill
- dotnetSkill
- drizzle-ormSkill
- drupal-developmentSkill
- elasticsearch-best-practicesSkill
- electron-developmentSkill
- elixirSkill
- embedded-stm32Skill
- esbuild-bundlerSkill
- ethereumSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. 0 are common, 24 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 24 edited versions we read keep these.
24
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 14
Use allowlists over denylists when validating input
- Distinctive: line 20
Use secure defaults for JWT, cookies, and configuration settings
- Distinctive: line 23
Never hardcode credentials or API keys in source code
- Distinctive: line 24
Use secure password hashing algorithms (bcrypt, Argon2)
- Distinctive: line 32
Use separate service accounts for different components
- Distinctive: line 38
Consider distributed rate-limiting to prevent abuse across services (e.g., using Redis)
- Distinctive: line 40
Use connection pooling with appropriate limits
- Distinctive: line 44
Use HTTPS/TLS for all network communications
- Distinctive: line 47
Keep dependencies updated and scan for vulnerabilities
- Distinctive: line 48
Use secure defaults and fail securely
- Distinctive: line 53
Never expose stack traces or internal details to end users
- Distinctive: line 60
Use environment variables or dedicated secrets managers
- Distinctive: line 63
Avoid logging sensitive information
- Distinctive: line 64
Use encryption at rest for sensitive data storage
- Distinctive: line 68
Use parameterized queries or prepared statements
- Distinctive: line 69
Never concatenate user input into SQL queries
- Distinctive: line 70
Use ORM features that automatically escape values
- Distinctive: line 77
Use Content Security Policy headers
- Distinctive: line 79
Use framework-provided escaping functions
- Distinctive: line 80
Avoid innerHTML and similar dangerous APIs
- Distinctive: line 85
Verify origin and referer headers
- Distinctive: line 86
Use SameSite cookie attribute
- Distinctive: line 93
Use rate limiting to prevent abuse
- Distinctive: line 101
Use lockfiles to ensure consistent versions
“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
Apply these security principles when developing backend services, microservices, and any code handling sensitive data or external inputs.
Input Validation and Sanitization
- Apply input validation and sanitization rigorously, especially on inputs from external sources
- Validate all user inputs at the boundary of your application
- Use allowlists over denylists when validating input
- Sanitize data before storing or displaying to prevent injection attacks
- Implement strict type checking and schema validation
Authentication and Authorization
- Use secure defaults for JWT, cookies, and configuration settings
- Implement proper token expiration and refresh mechanisms
- Store secrets securely using environment variables or secret management services
- Never hardcode credentials or API keys in source code
- Use secure password hashing algorithms (bcrypt, Argon2)
Permission Boundaries
- Isolate sensitive operations with clear permission boundaries
- Apply the principle of least privilege throughout the system
- Implement role-based access control (RBAC) where appropriate
- Audit and log access to sensitive resources
- Use separate service accounts for different components
Resilience and Protection
- Implement retries, exponential backoff, and timeouts on all external calls
- Deploy circuit breakers and rate limiting for service protection
- Consider distributed rate-limiting to prevent abuse across services (e.g., using Redis)
- Implement request throttling to prevent denial of service
- Use connection pooling with appropriate limits
Secure Configuration
- Use HTTPS/TLS for all network communications
- Configure secure HTTP headers (HSTS, CSP, X-Frame-Options)
- Disable verbose error messages in production
- Keep dependencies updated and scan for vulnerabilities
- Use secure defaults and fail securely
Error Handling
- Implement comprehensive error handling throughout the application
- Never expose stack traces or internal details to end users
- Log security-relevant events with appropriate detail
- Propagate context appropriately for debugging while maintaining security
- Handle authentication and authorization failures gracefully
Secrets Management
- Use environment variables or dedicated secrets managers
- Rotate credentials and keys regularly
- Implement proper key management practices
- Avoid logging sensitive information
- Use encryption at rest for sensitive data storage
SQL Injection Prevention
- Use parameterized queries or prepared statements
- Never concatenate user input into SQL queries
- Use ORM features that automatically escape values
- Validate and sanitize all database inputs
- Limit database user permissions
Cross-Site Scripting (XSS) Prevention
- Escape all output rendered in HTML
- Use Content Security Policy headers
- Sanitize user-generated content before display
- Use framework-provided escaping functions
- Avoid innerHTML and similar dangerous APIs
Cross-Site Request Forgery (CSRF) Prevention
- Implement CSRF tokens for state-changing operations
- Verify origin and referer headers
- Use SameSite cookie attribute
- Require re-authentication for sensitive actions
- Implement proper session management
API Security
- Implement API authentication (JWT, API keys, OAuth)
- Use rate limiting to prevent abuse
- Validate request content types
- Implement request size limits
- Log API access for auditing
Dependency Security
- Regularly audit dependencies for vulnerabilities
- Use lockfiles to ensure consistent versions
- Remove unused dependencies
- Monitor security advisories for your stack
- Implement automated vulnerability scanning in CI/CD
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.

