security-best-practices
Skill0 starsChanged 2 months agoMITView on GitHub
Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review/report, or secure-by-default coding help. Trigger only for supported languages (python, javascript/typescript, go). Do not trigger for general code review, debugging, or non-security tasks.
36 other projects use a version of this, 28 of them edited.
Adopted by
Most recently taken up by
- jgeofil/agent-skillsedited, first seen Nov 8, 2026
- informaticolorenzo/skill-maestra-publicedited, first seen Nov 8, 2026
- lklimek/claudiustheir own version, first seen Nov 5, 2026
- sunavoine-sys/Claude-Skillsedited, first seen Nov 1, 2026
- svngoku/coding-agents-skillstheir own version, first seen Nov 1, 2026
- hmjBill/skillstheir own version, first seen Oct 29, 2026
Used with
Projects with it also use database-design, 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.
harrissohail6Skilldatabase-design
Database schema design and SQL best practices. Use when designing tables, writing queries, or optimizing database performance.
Also in 3 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
JetBrainsSkillwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Also in 5 projects that use this
Other versions36 projects use a version of this.
Word for word · 0
None found.
Edited · 28
- openai/skills★ 27k87% same
- deadlock-mod-manager/deadlock-mod-manager★ 58480% same
- JetBrains/skills★ 38686% same
- z91772524-ai/pojia-next-mac★ 3987% same
- sampleXbro/agentsmesh★ 2787% same
- PracticalSwan/agent-skills★ 2270% same
- ckorhonen/claude-skills★ 1750% same
- chrysogonus/power-agents★ 487% same
- cogine-ai/cogine-dev-skillset★ 486% same
- Adhamxon/claude-code-skills★ 287% same
18 more not listed
Wrote their own version · 8
- Mindrally/skills★ 275same name
- svngoku/coding-agents-skills★ 12same name
- yaaabs/nextjs-16-boilerplate★ 3same name
- harrissohail6/claude-code-config★ 1same name
- lklimek/claudius★ 1same name
- OpenBun/Skills★ 1same name
- Typeless-Git/skills★ 1same name
- hmjBill/skills★ 0same name
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 repository21 other files it gives its agents.
- global/AGENTS.mdAGENTS.md
- api-designSkill
- backend-patternsSkill
- brandSkill
- contract-firstSkill
- database-migrationsSkill
- engineering-task-workflowSkill
- error-handlingSkill
- fixing-accessibilitySkill
- frontend-designSkill
- frontend-ui-engineeringSkill
- intent-driven-developmentSkill
- react-native-patternsSkill
- react-patternsSkill
- react-testingSkill
- shadcnSkill
- supabase-postgres-best-practicesSkill
- systematic-debuggingSkill
- tdd-workflowSkill
- ui-ux-pro-maxSkill
- verification-before-completionSkill
The file
We split this skill into the rules it gives an agent
8 rules. 5 are common, 1 is distinctive, and 2 are very specific to this project.
5
Common
Most of the 35 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 26
If working on a web application which includes a frontend and a backend, make sure you have checked for reference documents for BOTH the …
- Very specific: line 28
If you are asked to make a web app which will include both a frontend and backend, but the frontend framework is not specified, also check …
- Common: line 42
If the language/framework is unclear, inspect the repo to determine it and list your evidence.
- Very specific: line 43
If matching guidance exists in references/, load only the relevant files and follow their instructions.
- Distinctive: line 52
When producing a report, write it to the location requested by the user or to a repository-appropriate documentation path.
- Common: line 64
After you write the report file, summarize the findings to the user.
- Common: line 76
Always follow any normal change or commit flow the user has configured.
- Common: line 78
Always follow any normal testing flows the user has configured (if any) to confirm that your changes are not introducing regressions.
“Common” is measured: kept by at least 6 in 10 of the 35 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
Modified from the pinned OpenAI skill for integration with Codex Engineering Workflow. The workflow and completion behavior were adapted; see
LICENSE.txtand the repository'sTHIRD_PARTY_NOTICES.md.
Overview
This skill provides a description of how to identify the language and frameworks used by the current context, and then to load information from this skill's references directory about the security best practices for this language and or frameworks.
This information, if present, can be used to write new secure by default code, or to passively detect major issues within existing code, or (if requested by the user) provide a vulnerability report and suggest fixes.
Workflow
The initial step for this skill is to identify ALL languages and ALL frameworks which you are being asked to use or already exist in the scope of the project you are working in. Focus on the primary core frameworks. Often you will want to identify both frontend and backend languages and frameworks.
Then check this skill's references directory to see if there are any relevant documentation for the language and or frameworks. Make sure you read ALL reference files which relate to the specific framework or language. The format of the filenames is <language>-<framework>-<stack>-security.md. You should also check if there is a <language>-general-<stack>-security.md which is agnostic to the framework you may be using.
If working on a web application which includes a frontend and a backend, make sure you have checked for reference documents for BOTH the frontend and backend!
If you are asked to make a web app which will include both a frontend and backend, but the frontend framework is not specified, also check out javascript-general-web-frontend-security.md. It is important that you understand how to secure both the frontend and backend.
If no relevant information is available in the skill's references directory, think a little bit about what you know about the language, the framework, and all well known security best practices for it. If you are unsure you can try to search online for documentation on security best practices.
From there it can operate in a few ways.
- The primary mode is to just use the information to write secure by default code from this point forward. This is useful for starting a new project or when writing new code.
- The secondary mode is to passively detect vulnerabilities while working in the project and writing code for the user. Critical or very important vulnerabilities or major issues going against security guidance can be flagged and the user can be told about them. This passive mode should focus on the largest impact vulnerabilities and secure defaults.
- The user can ask for a security report or to improve the security of the codebase. Produce a prioritized report with clear severity and urgency. When fixes are within the authorized task, continue through correction and fresh verification under the main engineering workflow.
Workflow Decision Tree
- If the language/framework is unclear, inspect the repo to determine it and list your evidence.
- If matching guidance exists in
references/, load only the relevant files and follow their instructions. - If no matching guidance exists, consider if you know any well known security best practices for the chosen language and or frameworks, but if asked to generate a report, let the user know that concrete guidance is not available (you can still generate the report or detect for sure critical vulnerabilities)
Overrides
While these references contain the security best practices for languages and frameworks, customers may have cases where they need to bypass or override these practices. Pay attention to specific rules and instructions in the project's documentation and prompt files which may require you to override certain best practices. When overriding a best practice, you MAY report it to the user, but do not fight with them. If a security best practice needs to be bypassed / ignored for some project specific reason, you can also suggest to add documentation about this to the project so it is clear why the best practice is not being followed and to follow that bypass in the future.
Report Format
When producing a report, write it to the location requested by the user or to a repository-appropriate documentation path. Avoid interrupting an otherwise actionable task only to choose a filename.
The report should have a short executive summary at the top.
The report should be clearly delineated into multiple sections based on severity of the vulnerability. The report should focus on the most critical findings as these have the highest impact for the user. All findings should be noted with an numeric ID to make them easier to reference.
For critical findings include a one sentence impact statement.
Once the report is written, summarize its material findings and evidence to the user.
Important: When referencing code in the report, make sure to find and include line numbers for the code you are referencing.
After you write the report file, summarize the findings to the user.
Also tell the user where the final report was written to
Fixes
If the request includes remediation, fix findings within scope from highest severity downward. If it requests only a review, stop after the report. A passive critical finding must be reported clearly; correct it when the active task already authorizes that work, otherwise leave it as an explicit finding.
When producing fixes, focus on fixing a single finding at a time. The fixes should have concise clear comments explaining that the new code is based on the specific security best practice, and perhaps a very short reason why it would be dangerous to not do it in this way.
Always consider if the changes you want to make will impact the functionality of the user's code. Consider if the changes may cause regressions with how the project works currently. It is often the case that insecure code is relied on for other reasons (and this is why insecure code lives on for so long). Avoid breaking the user's project as this may make them not want to apply security fixes in the future. It is better to write a well thought out, well informed by the rest of the project, fix, then a quick slapdash change.
Always follow any normal change or commit flow the user has configured. If making git commits, provide clear commit messages explaining this is to align with security best practices. Try to avoid bunching a number of unrelated findings into a single commit.
Always follow any normal testing flows the user has configured (if any) to confirm that your changes are not introducing regressions. Consider the second order impacts the changes may have and inform the user before making them if there are any.
General Security Advice
Below is a few bits of secure coding advice that applies to almost any language or framework.
Avoid Using Incrementing IDs for Public IDs of Resources
When assigning an ID for some resource, which will then be used by exposed to the internet, avoid using small auto-incrementing IDs. Use longer, random UUID4 or random hex string instead. This will prevent users from learning the quantity of a resource and being able to guess resource IDs.
A note on TLS
While TLS is important for production deployments, most development work will be with TLS disabled or provided by some out-of-scope TLS proxy. Due to this, be very careful about not reporting lack of TLS as a security issue. Also be very careful around use of "secure" cookies. They should only be set if the application will actually be over TLS. If they are set on non-TLS applications (such as when deployed for local dev or testing), it will break the application. You can provide a env or other flag to override setting secure as a way to keep it off until on a TLS production deployment. Additionally avoid recommending HSTS. It is dangerous to use without full understanding of the lasting impacts (can cause major outages and user lockout) and it is not generally recommended for the scope of projects being reviewed by codex.
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.

