Skip to content
Agent Orchestration
Skill

/security-protocol

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

From plugin
godmode
12333 skills1 agent2 hooks

Claude Code

$ npx -y skills add NoobyGains/godmode --skill security-protocol --agent claude-code

SKILL.md

security-protocol.SKILL.md
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."

Security Protocol

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.**

The Prime Directive

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.

When to Use

**Required:**

  • Code that reads any request data, uploaded file, webhook, queue message or third-party response.
  • Login, sign-up, password reset, sessions, tokens, API keys, roles or permissions.
  • Building a query, a shell command, a file path or an outbound URL from anything not hard-coded.
  • Rendering user-supplied content, setting response headers or configuring CORS.
  • Adding, upgrading or vendoring a dependency, a CI action or a build tool.
  • Error handling on any path that touches the above (failing open is a vulnerability).

**Skip:**

  • Code with no external input and no privileged action, such as a pure function over trusted constants. If you are unsure whether data is external, it is.

The Protocol

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.**

  • Queries: parameterised statements or a query builder, never string concatenation.
  • Shell: avoid the shell; call the program with an argument array. If a shell is unavoidable, allowlist every argument.
  • Paths: resolve the final path and check it stays inside the intended directory; never pass user input straight to file APIs.
  • Outbound requests to user-supplied URLs: allowlist schemes and hosts, resolve the address and block private, loopback and link-local ranges, and do not follow redirects blindly.
  • HTML: an auto-escaping template engine or framework; sanitise with a maintained library when rich text is required.
  • Deserialisation: data formats only (JSON with a schema), never native object deserialisers on untrusted input.

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`).

Input Validation Checklist

For every input field and parameter:

  • [ ] Type is enforced by parsing, not by casting (a string that should be an integer is parsed and rejected if it fails).
  • [ ] Length has a minimum and a maximum, including for arrays and nested objects.
  • [ ] Format is checked with a strict pattern or a dedicated parser (emails, URLs, dates, UUIDs), anchored at both ends.
  • [ ] Numbers and dates have a range.
  • [ ] Enumerations are checked against an allowlist.
  • [ ] Unknown fields are rejected or stripped, so a client cannot set `isAdmin` by adding it (mass assignment).
  • [ ] Text is normalised (Unicode, case, whitespace) before comparison or uniqueness checks.
  • [ ] Files: size limit, type checked from content not from the extension or the client's content type, stored outside the web roo
Read more
@noobygains
Ships withgodmode

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.

12333 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
123
Star history of NoobyGains/godmode on GitHub, a chart by star-history.com

Other skills on godmode.

agent-briefing

agent-briefing

Use when writing a prompt for a subagent or teammate, deciding how much context another agent needs, writing or reading a handoff…

@noobygains@noobygainsInstall Skill
code-review

code-review

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…

@noobygains@noobygainsInstall Skill
codebase-conventions

codebase-conventions

Use when about to add or change code in an existing codebase: a new file, module, route, component, service, test, migration,…

@noobygains@noobygainsInstall Skill
completion-gate

completion-gate

Use when about to say that work is done, fixed, passing, working, deployed or ready, before committing, opening or merging a pull…

@noobygains@noobygainsInstall Skill
cross-model-review

cross-model-review

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…

@noobygains@noobygainsInstall Skill
delegated-execution

delegated-execution

Use when a written implementation plan is ready to execute in the current session and its tasks are mostly independent, so each…

@noobygains@noobygainsInstall Skill

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw3d395k
@steipete@steipeteInstall Skill
jira-tickets

jira-tickets

Read and update Jira tickets through Orca's saved Jira connections. Use when a task comes from Jira or the user asks for Jira…

orca1d128k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…

paperclip2d114k
@paperclipai@paperclipaiInstall Skill
adr-create

adr-create

Create a new Architecture Decision Record with sequential numbering and AgentDB registration

@ruvnet@ruvnetInstall Skill

Questions about security-protocol.

Which coding agents can use security-protocol?
security-protocol installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.