Secure web backend code
Writes and reviews login, access control and input handling for web backends, so common attacks are blocked.
What we improved
Made SKILL.md work on its own: authorization per object, CSRF for cookie based auth, encryption at rest and the main gotchas now have working code or rules in SKILL.md instead of only in the reference files. Fixed bugs in the login example.
Improved by YourAISkill from the original by Jeffallan, under its MIT licence. The download includes the author's licence and a CHANGES.md listing every change. Both Claude reviews read the improved version.
Claude's review
8/10 Sharp security skill with a sink-by-sink review table, correct Express/TS code for auth, IDOR, CSRF and AES-GCM, and concrete checks to prove each control.
We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.
In detail
Use when implementing authentication/authorization, securing user input, or preventing OWASP Top 10 vulnerabilities — including custom security implementations such as hashing passwords with bcrypt/argon2, sanitizing SQL queries with parameterized statements, configuring CORS/CSP headers, validating input with Zod, and setting up JWT tokens. Invoke for authentication, authorization, input validation, encryption, OWASP Top 10 prevention, secure session management, and security hardening. For pre-built OAuth/SSO integrations or standalone security audits, consider a more specialized skill.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: secure-code-guardian
description: Write and review application security code for web backends, with working Node.js/TypeScript (Express) examples, a sink-by-sink review method, and the same rules applied to other stacks. Covers password hashing (argon2id, bcrypt limits), login flows that do not leak which accounts exist, JWT and cookie sessions, rate limiting behind proxies, object-level authorization (IDOR), parameterized SQL, schema validation with Zod, CSRF for cookie-based auth, security headers and CSP, CORS allowlists, path traversal, and AES-GCM encryption, plus concrete checks to prove each control works. Use when implementing or reviewing authentication, authorization, input handling, secrets, or OWASP Top 10 defences. For third-party OAuth/SSO setup or a full penetration test, use a more specialised tool.
license: MIT
metadata:
version: "1.2.0"
domain: security
triggers: security, authentication, authorization, encryption, OWASP, vulnerability, secure coding, password, JWT, OAuth, CSRF, IDOR
role: specialist
scope: implementation
output-format: code
---
<!-- Modified by YourAISkill (youraiskill.com) on 2 December 2026 from the original by Jeffallan. See CHANGES.md. -->
# Secure Code Guardian
Examples are Node.js 18+ with TypeScript and Express. The rules apply to any stack; use the
framework's built-in equivalent where one exists (see "Other stacks").
## Core Workflow
1. **Threat model** in a few lines: what is valuable (accounts, personal data, money, admin
actions), where untrusted data enters (bodies, headers, cookies, files, webhooks, queues),
where the trust boundaries are, and who the likely attacker is (anonymous user, signed-in
user reaching other users' data, insider).
2. **Design** a control per threat: authentication, per-object authorization, validation at the
boundary, output encoding, rate limits, logging. Deny by default.
3. **Implement** with the patterns below, preferring maintained libraries and framework
features over hand-rolled crypto, parsers or sanitizers.
4. **Validate** each control with the checkpoints below. A control never tested failing is not
a control.
5. **Document** which threats are covered, which are accepted, and the configuration relied on
(env vars, proxy count, cookie names, allowed origins).
## Reviewing existing code
Map the entry points first (every route, webhook and job that takes input or changes state, and
the middleware each runs through), then search for the sinks below. A hit is a lead: trace it
back to its input and report it only if untrusted data can reach it.
...From Jeffallan's repository, MIT licence.
Related skills
-
Checked
Codebase quality audit
Audits a whole code repo for bugs, security holes, slow paths and dead code, ranked in plain English.
7/101 credit -
Checked
Security and CVE audit
Runs a security and CVE audit on code in any language and scores it out of 100, with false alarms filtered.
7/101 credit -
Checked
OWASP code review
Reviews code for security flaws using the latest OWASP Top 10 lists, including those for AI and agent apps.
7/101 credit -
Checked
Code security hardening
Hardens code that handles user input, logins and data against the OWASP Top 10, starting from a threat model.
7/101 credit -
Checked
Android intent security
Audits Android components and incoming intents to fix redirection and unauthorised access holes in your app.
8/101 credit -
Checked
Mobile app security audit
Audits iOS and Android apps against OWASP MASVS and tests every finding, so your report lists only real issues.
8/101 credit