graphql-security

graphql-security is a skill for Claude Code, Codex from ShieldNet-360/secure-vibe. It costs 69 tokens per session (1,763 once invoked), scanned A, original, MIT.

Security guidance for GraphQL, a system for requesting data through structured queries, with controls on query size, cost, rate limits, and allowed operations.

In plain words
What is it for?
Use it when configuring GraphQL schemas, resolvers, authentication paths, query limits, persisted operations, or cache keys.
Why use it?
It helps stop expensive or abusive queries, especially deeply nested requests, aliases, batches, and unrestricted schema exploration.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/shieldnet-360/secure-vibe/graphql-security
Any agent
npx skills add ShieldNet-360/secure-vibe --skill graphql-security
Clone the repo
git clone --depth 1 https://github.com/ShieldNet-360/secure-vibe

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graphql-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/graphql-security.svg)](https://agentmods.dev/skills/shieldnet-360/secure-vibe/graphql-security)
Your own site
<a href="https://agentmods.dev/skills/shieldnet-360/secure-vibe/graphql-security"><img src="https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/graphql-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,763 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00069 $0.01763
Opus 5 $0.00034 $0.00881
Sonnet 5 $0.00014 $0.00353
Haiku 4.5 $0.00007 $0.00176

Measured 4d ago against content hash 4959885ab31b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

graphql-security scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/graphql-security/SKILL.md · 132 lines

How it starts

The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GraphQL Security

Rules (for AI agents)

ALWAYS

  • Enforce a cost budget on every operation: a maximum depth, plus a complexity score that weights list fields by the page size they can request. Derive the numbers from your own schema and measure them — a depth of 7 is generous for a flat schema and far too permissive for one with a many-to-many edge, where five levels of nesting can address billions of nodes. references/graphql-limits.md covers how to derive them and where each server configures them.
  • Rate-limit by cost consumed, not by request count. Every operation arrives at the same URL, so the per-route limit api-security specifies cannot tell a trivial query from one costing a thousand times more. Charge the complexity score against the caller's budget.
  • For a public or high-traffic API, restrict it to pre-registered operations — a build-time allowlist of the documents the client bundle actually contains, keyed by hash. Automatic Persisted Queries are not this: APQ lets a client register any operation it likes and then send its hash, which is a bandwidth optimization. Turning on APQ and believing the API is now allowlisted is a common and expensive mistake.
  • Cap aliases per operation and operations per batch, and apply that counting to authentication and other rate-limited paths. One request carrying a hundred aliased login fields is a hundred attempts against any counter that increments once per request — this is the mechanism behind the account-takeover-by-batching incidents, not a bandwidth concern.
  • Batch resolver fetches with a DataLoader or a join. An N+1 resolver turns one cheap-looking query into a database round trip per parent row — the same amplification the cost limit exists to bound, except it happens below the cost analysis where that limit cannot see it.
  • Key any response cache on the operation hash, the variables, and the caller's authorization claims. POST /graphql is one URL for every request, so a cache keyed on the URL serves one tenant's data to another.
  • Validate the contents of JSON, custom scalar, and loosely-typed input arguments inside the resolver. The schema's type checking is what makes GraphQL inputs feel safe, and a JSON scalar opts straight out of it: whatever arrives is handed through unexamined.
  • Disable introspection and the in-browser playground (GraphiQL, Apollo Sandbox) on production endpoints — and understand what that buys. It raises the cost of reconnaissance and nothing more: field suggestions in error messages still leak names, tools reconstruct schemas from them, and every field stays callable whether or not it can be listed. Schema obscurity is never the authorization.
  • Consult auth-security for authorization, and run it per field rather than at the endpoint. One HTTP response aggregates many resolvers, so a single unguarded sensitive field leaks through any query that reaches it.
  • Consult error-handling-security for what an error may carry. The errors array is GraphQL's public contract and field-level validation detail belongs in it; what must not appear there is the stack trace, the SQL, or resolver internals. Flattening a validation failure to a bare INTERNAL_SERVER_ERROR is hostile to callers without being safer.
  • Consult file-upload-security for GraphQL multipart uploads. Arriving over GraphQL changes nothing about the rules there — quarantine, type validation, expansion limits, and scanning policy all still apply.

Read the full file on GitHub · 132 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 132 lines · 69 tokens per session scan A 4959885ab31b

Subscribe to this mod's changes

graphql-security is a skill published in the GitHub repository ShieldNet-360/secure-vibe (22 stars, last pushed 21d ago), licensed MIT. It adds 69 tokens to every session and 1,763 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

deno-sandbox

Use when building features that execute untrusted user code, AI-generated code, or need isolated code execution environments. Covers the @deno/sandbox SDK.

denoland/skills · 36 tokens

deno-frontend

Use when building a web frontend with Deno — running React, Vite, Astro, SvelteKit, Next.js, Nuxt or other npm frameworks under Deno, or working with Fresh, Deno's own island-architecture framework. Covers which path to pick, Fresh 2.x routes, handlers, islands, Preact signals, Tailwind, and Fresh 1.x to 2.x migration.

denoland/skills · 88 tokens

web-performance-reviewer

Review web frontends for performance issues by driving the rendered site through Chrome DevTools MCP — throttled performance traces, Core Web Vitals judged against thresholds, network waterfall analysis, and heap-snapshot leak checks for SPAs. Composes on top of web-static, web-sprinkles, or web-components. Strictly…

AdamBien/airails · 193 tokens

web-static

Build modern static websites using semantic HTML and CSS without external dependencies or build systems. Also owns the verification loop for such sites — drives the rendered pages through Chrome DevTools MCP (console, accessibility snapshot, viewport resize, dark/reduced-motion emulation, Lighthouse), executes the…

AdamBien/airails · 183 tokens

zcfg

Integrate zcfg (Zero Dependency Configuration Utility) into Java applications. Use when adding configuration loading, reading properties files, setting up application configuration, or integrating zcfg into a Java project. Triggers on "zcfg", "add configuration", "load properties", "application configuration with…

AdamBien/airails · 75 tokens

zcl

Add colored terminal output to Java applications using zcl (Zero-dependency Colour Logger). Use when adding colored console output, terminal logging with colors, ANSI color support, or integrating zcl into a Java project. Triggers on "zcl", "colored output", "colored logging", "terminal colors", "ANSI colors"…

AdamBien/airails · 85 tokens