api-security

api-security is a skill for Claude Code, Codex from GoldenWing-360/claude-security-skills. It costs 78 tokens per session (3,486 once invoked), scanned B, original, MIT.

A security guide for REST and GraphQL APIs, which are interfaces that let software exchange data and actions over the web.

In plain words
What is it for?
It supports designing, reviewing, and auditing APIs, including access control, request limits, server-side request forgery, and GraphQL query limits.
Why use it?
It helps find common API weaknesses, such as allowing users to access another user's data or sending back too much information.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It supports designing, reviewing, and auditing APIs, including access control, request limits, server-side request forgery, and GraphQL query limits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/goldenwing-360/claude-security-skills/api-security
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.

Any agent
npx skills add GoldenWing-360/claude-security-skills --skill api-security
Clone the repo
git clone --depth 1 https://github.com/GoldenWing-360/claude-security-skills

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 api-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/goldenwing-360/claude-security-skills/api-security/github.svg)](https://agentmods.dev/skills/goldenwing-360/claude-security-skills/api-security)
Your own site
<a href="https://agentmods.dev/skills/goldenwing-360/claude-security-skills/api-security"><img src="https://agentmods.dev/badge/skills/goldenwing-360/claude-security-skills/api-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/goldenwing-360/claude-security-skills/api-security"><img src="https://agentmods.dev/badge/skills/goldenwing-360/claude-security-skills/api-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,486 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00078 $0.03486
Opus 5 $0.00039 $0.01743
Sonnet 5 $0.00016 $0.00697
Haiku 4.5 $0.00008 $0.00349

Measured 9d ago against content hash fd55c06d713f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

api-security scanned grade B with 2 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 9d 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.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

Attacker submits `http://169.254.169.254/latest/meta-data/` (AWS metadata) or `http://localhost:6379/` (your Redis) and your server happily proxies.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const r = await fetch(url);
api-security/SKILL.md · 305 lines

How it starts

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

API Security

Web-app and API security overlap but are not the same. APIs ship with different defaults (CORS-permissive, no CSRF tokens, often no rate-limiting), different consumers (mobile apps, integrations, scripts — not just browsers), and a different attack surface (object IDs in URLs, JSON bodies, scoped tokens). The OWASP API Security Top 10 (2023 edition) is the canonical reference; this skill walks each item with concrete detection and fix patterns.

When to invoke

  • Designing a new REST or GraphQL API
  • Reviewing an existing API before scaling user count
  • After abuse — scraping, account takeover, suspicious 4xx/5xx patterns
  • Adding a public-facing endpoint to a previously internal service
  • An API is feeding a mobile or single-page app where the client cannot be trusted
  • Periodic API audit (quarterly is reasonable)

API01:2023 — Broken Object Level Authorization (BOLA)

The #1 API vulnerability and not even close. Every endpoint that takes an ID and returns the corresponding resource must check the caller is allowed to see that specific object.

// Bad — any authenticated user reads any invoice
app.get('/api/invoices/:id', requireAuth, async (req, res) => {
  const invoice = await db.invoices.findUnique({ where: { id: req.params.id }});
  res.json(invoice);
});

// Good — scoped to the requester's ownership
app.get('/api/invoices/:id', requireAuth, async (req, res) => {
  const invoice = await db.invoices.findFirst({
    where: { id: req.params.id, userId: req.user.id }
  });
  if (!invoice) return res.status(404).json({ error: 'not found' });
  res.json(invoice);
});

Detection in a codebase:

# Every parameterized route is a BOLA candidate. Walk them.
grep -rEn ":id|:slug|:uuid" src/routes src/api app 2>/dev/null

# Routes that fetch by primary key alone — high-suspicion pattern
grep -rEn 'findUnique\\(\\{\\s*where:\\s*\\{\\s*id:' --include='*.{ts,js}' . | head

Patterns that make BOLA harder to introduce:

  • Always include userId or tenantId in the where clause, not just the resource ID
  • Use database row-level security (RLS) as a backstop — Postgres RLS plus per-request SET LOCAL app.current_user. See postgres-hardening.
  • Use opaque IDs (UUIDs or hashids), not sequential integers. Doesn't fix BOLA but slows enumeration if it slips through.

Read the full file on GitHub · 305 lines

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. 9d ago First seen · 305 lines · 78 tokens per session scan B fd55c06d713f

Subscribe to this mod's changes

api-security is a skill published in the GitHub repository GoldenWing-360/claude-security-skills (17 stars, last pushed 1mo ago), licensed MIT. It adds 78 tokens to every session and 3,486 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 2 findings (cloud metadata endpoint, makes network calls). 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

tanstack-start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 +…

jezweb/claude-skills · 115 tokens

mcp-builder

Build MCP servers in Python with FastMCP. Define tools / resources / prompts, build the server, test locally, deploy to FastMCP Cloud or Docker. Use whenever the user mentions building an MCP server, exposing tools to LLMs, FastMCP, building a Claude integration, or troubleshooting FastMCP module-level server…

jezweb/claude-skills · 84 tokens

hono-api-scaffolder

Scaffold Hono API routes for Cloudflare Workers. Produces route files, middleware, typed bindings, Zod validation, error handling, and APIENDPOINTS.md documentation. Use after a project is set up with cloudflare-worker-builder or vite-flare-starter, when you need to add API routes, create endpoints, or generate API…

jezweb/claude-skills · 77 tokens

cloudflare-worker-builder

Scaffold and deploy Cloudflare Workers with Hono routing, Vite plugin, and Static Assets. Describe project, scaffold structure, configure bindings, deploy. Use whenever the user wants to create a Worker project, set up Hono on Cloudflare, configure D1 / R2 / KV / Queues bindings, or troubleshoot Worker export syntax…

jezweb/claude-skills · 86 tokens

wordpress-setup

Connect to a WordPress site via WP-CLI over SSH or the REST API. Check CLI, test SSH, set up auth, verify access, save config. Use whenever the user wants to connect to a WordPress site, set up WP-CLI access, create an Application Password, or troubleshoot WordPress connection / auth issues.

jezweb/claude-skills · 71 tokens

vite-flare-starter

Scaffold a full-stack Cloudflare app from the vite-flare-starter template — React 19 + Hono + D1+Drizzle + better-auth + Tailwind v4+shadcn/ui + TanStack Query + R2 + Workers AI. Run setup.sh to clone, configure, and deploy. Use whenever the user wants a batteries-included Cloudflare full-stack app, vite-flare-starter…

jezweb/claude-skills · 110 tokens