agent-briefing
Use when writing a prompt for a subagent or teammate, deciding how much context another agent needs, writing or reading a handoff…
Use when writing or changing code that handles user input, uploaded files, authentication, sessions, authorisation, database queries, shell commands, file paths, outbound requests to user-supplied URLs, HTTP responses and headers, secrets or credentials, deserialisation, or new
Claude Code
$ npx -y skills add NoobyGains/godmode --skill security-protocol --agent claude-code
Codex
$ npx skills add NoobyGains/godmode --skill security-protocol -a codex -y
Cursor
$ npx skills add NoobyGains/godmode --skill security-protocol -a cursor -y
Gemini CLI
$ npx skills add NoobyGains/godmode --skill security-protocol -a gemini-cli -y
GitHub Copilot
$ npx skills add NoobyGains/godmode --skill security-protocol -a github-copilot -y
OpenCode
$ npx skills add NoobyGains/godmode --skill security-protocol -a opencode -y
Windsurf
$ npx skills add NoobyGains/godmode --skill security-protocol -a windsurf -y
name: security-protocol description: "Use when writing or changing code that handles user input, uploaded files, authentication, sessions, authorisation, database queries, shell commands, file paths, outbound requests to user-supplied URLs, HTTP responses and headers, secrets or credentials, deserialisation, or new third-party dependencies."
Every point where data enters your code from outside is a trust boundary: request bodies, headers, cookies, URLs, files, environment, message queues, third-party API responses, and model output. Data that crosses one is hostile until it has been validated for what it claims to be and encoded for where it is going. **Validate on the way in, encode on the way out, authorise every action, and keep secrets out of code.**
NO EXTERNAL DATA REACHES A SYSTEM CALL, QUERY OR OUTPUT WITHOUT VALIDATION
No exceptions. No workarounds. No shortcuts.
"System call" includes shell commands, file-system paths, outbound HTTP requests, deserialisers and `eval`-like functions. "Query" includes SQL, NoSQL, LDAP, XPath and search engines. "Output" includes HTML, JSON sent to browsers, logs, headers and prompts sent to a model.
**Required:**
**Skip:**
1. **Map the boundaries.** For the change in front of you, list every input source and every sink it reaches (database, shell, file system, network, browser, log). Write the list in the plan or PR description; it is the scope of the rest of this protocol.
2. **Validate at the boundary, with an allowlist.** Parse input into a typed shape with a schema at the point it enters: type, length, format, range, and an explicit set of allowed values where one exists. Reject what does not fit; do not try to repair it. Validation runs on the server even when the client also validates. Work through the checklist below.
3. **Use the safe API for each sink.**
4. **Authorise every action on the server.** For each endpoint or command, check that this user may perform this action on this specific resource. Deny by default. Never trust a role, user ID or price sent by the client.
5. **Handle authentication and passwords with established libraries.** Never write your own crypto, session or token scheme. Hash passwords with the algorithm the current OWASP guidance recommends (Argon2id first; parameters in the reference file). Session cookies are `HttpOnly`, `Secure` and `SameSite`; sessions rotate on login and expire.
6. **Keep secrets out of code, logs and URLs.** See Secrets Management below.
7. **Fail closed.** Errors in validation, authorisation or an external call must deny the action, release resources and return a generic message. Stack traces, SQL errors and internal paths never reach the user; they go to the server log without secrets.
8. **Set the security headers** for any HTTP response (table below).
9. **Govern the supply chain.** Before adding a dependency or CI action, check maintenance, known vulnerabilities and install scripts; commit lockfiles; pin CI actions to commit SHAs; run the ecosystem's audit (`npm audit`, `pip-audit`, `cargo audit`, `govulncheck ./...`) and a secret scanner (for example `gitleaks git`) in CI.
10. **Test the abuse cases.** Write failing tests first (`godmode:test-first`) for at least: another user's resource ID, an oversized and a malformed input, an injection payload for each sink, and an expired or missing token. Record the run as evidence.
11. **Check against the current OWASP Top 10** in [references/owasp-top-10.md](references/owasp-top-10.md) before you call security work done. The list is revised every few years; confirm the edition is still current (`godmode:grounding`).
For every input field and parameter:
Engineering discipline for AI coding agents: question the request, verify against current docs, plan, build test-first on the cheapest capable model, review with a second model family, prove it before saying done. One repo for Claude Code, Codex, Antigravity, Cursor, Gemini CLI and OpenCode.
Use when writing a prompt for a subagent or teammate, deciding how much context another agent needs, writing or reading a handoff…
Use when a task, feature or bug fix is implemented and before it is committed, merged or handed back to the user, and when the…
Use when about to add or change code in an existing codebase: a new file, module, route, component, service, test, migration,…
Use when about to say that work is done, fixed, passing, working, deployed or ready, before committing, opening or merging a pull…
Use when a reviewed change is about to land on a shared branch, be released or be deployed, and when the user asks for a second…
Use when a written implementation plan is ready to execute in the current session and its tasks are mostly independent, so each…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration