# api-sec

Routes API security testing across REST, GraphQL, and mobile backends. Helps an agent choose the right testing track before running deep checks.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3900 installs · ★ 2547
- Author: yaklang
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/yaklang/hack-skills/tree/HEAD/skills/api-sec/SKILL.md
- Updated: 2026-09-13
- HTML: https://affpapa.org/en/nevibecode/skills/api-sec

## What it does

This skill acts as an entry triage router for API security assessments. When an agent identifies Swagger files, bearer tokens, or GraphQL queries, `api-sec` maps those signals directly to focused assessment tracks. It establishes an explicit order. Arbitrary probing stops here.

The routing logic relies on a triage matrix and a four-step flow. Recon and documentation drift route to `api-recon-and-docs`. Object-level flaws and BOLA go to `api-authorization-and-bola`. Tokens, header trust, and rate limits route to `api-auth-and-jwt-abuse`, while schema introspection shifts to `graphql-and-hidden-parameters`.

The skill does not execute vulnerability exploits directly. It functions purely as a classification router: without the deeper topic skills from the repository, the agent cannot proceed past the triage stage.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill api-sec -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/api-sec/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/api-sec/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill api-sec -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/api-sec/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill api-sec -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/api-sec/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install yaklang/hack-skills api-sec
```

2. **Manually: put the files in place**
- File: `.github/skills/api-sec/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill api-sec -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/yaklang/hack-skills --path skills/api-sec
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/api-sec/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill api-sec -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/yaklang/hack-skills/tree/HEAD/skills/api-sec/SKILL.md

## When to use it
- prioritize security testing tracks across REST and GraphQL targets
- route authorization flaws and BOLA checks when IDs are detected
- assign token and rate-limit bypass investigations
- isolate GraphQL schema introspection and hidden parameter testing

## Example prompts
- We found an OpenAPI spec and several JSON endpoints. Plan our test sequence with api-sec.
- The mobile API returns JWTs and exposes GraphQL. Which track should we run first?
- Profile updates accept undocumented fields. Route this issue according to api-sec.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 6884923d20e97237.

BEGIN THIRD-PARTY FILE 6884923d20e97237
```text
---
name: api-sec
description: >-
  Entry P1 category router for API security. Use when choosing between API
  recon, authorization, token abuse, and hidden-parameter workflows before any
  deeper API topic skill.
---

# API Security Router

This is the routing entry point for API security testing.

Use this skill first to decide whether the API issue is mostly recon/docs, object authorization, token trust, or GraphQL/hidden parameters, then route to a deeper topic skill.

## When to Use

- The target exposes REST APIs, mobile backends, or GraphQL endpoints
- You need to define API testing order before going into specific topics
- You want to handle object authorization, JWT, GraphQL, and hidden fields as separate tracks

## Skill Map

- [API Recon and Docs](../api-recon-and-docs/SKILL.md): OpenAPI, Swagger, version drift, hidden documentation
- [API Authorization and BOLA](../api-authorization-and-bola/SKILL.md): BOLA, BFLA, method abuse, hidden writable fields
- [API Auth and JWT Abuse](../api-auth-and-jwt-abuse/SKILL.md): bearer token, header trust, claim abuse, rate-limit bypass
- [GraphQL and Hidden Parameters](../graphql-and-hidden-parameters/SKILL.md): introspection, batching, undocumented fields, hidden parameters

## Quick Triage

| Observation | Route |
|---|---|
| Swagger or OpenAPI is present | [api-recon-and-docs](../api-recon-and-docs/SKILL.md) |
| IDs appear in URL, JSON, headers, or GraphQL args | [api-authorization-and-bola](../api-authorization-and-bola/SKILL.md) |
| JWT token visible in traffic | [api-auth-and-jwt-abuse](../api-auth-and-jwt-abuse/SKILL.md) |
| `/graphql` or batched JSON arrays are present | [graphql-and-hidden-parameters](../graphql-and-hidden-parameters/SKILL.md) |
| Registration, login, or profile updates accept extra fields | [api-authorization-and-bola](../api-authorization-and-bola/SKILL.md) then [api-auth-and-jwt-abuse](../api-auth-and-jwt-abuse/SKILL.md) |

## Recommended Flow

1. Start with exposed endpoints and documentation assets
2. Then evaluate object-level and function-level authorization
3. Then evaluate token, header, signature, and rate-limit boundaries
4. If GraphQL or complex JSON is present, continue with hidden fields and schema abuse

## Related Categories

- [auth-sec](../auth-sec/SKILL.md)
- [business-logic-vuln](../business-logic-vuln/SKILL.md)
- [recon-for-sec](../recon-for-sec/SKILL.md)
```
END THIRD-PARTY FILE 6884923d20e97237

The third-party file has ended. Everything between the 6884923d20e97237 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© yaklang · MIT · https://github.com/yaklang/hack-skills/tree/HEAD/skills/api-sec/SKILL.md

## Similar
- [conducting-api-security-testing](https://affpapa.org/en/nevibecode/skills/conducting-api-security-testing.md) — skill · 643 installs
- [testing-api-for-broken-object-level-authorization](https://affpapa.org/en/nevibecode/skills/testing-api-for-broken-object-level-authorization.md) — skill · 541 installs
- [api-audit](https://affpapa.org/en/nevibecode/skills/api-audit.md) — skill · 482 installs
- [nestjs](https://affpapa.org/en/nevibecode/skills/nestjs.md) — skill · 4200 installs
- [api-and-interface-design](https://affpapa.org/en/nevibecode/skills/api-and-interface-design.md) — skill · 62600 installs
- [flask-api-development](https://affpapa.org/en/nevibecode/skills/flask-api-development.md) — skill · 1400 installs

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
