# API security

> API security is an open-source agent skill for security. Guides an agent through security testing of REST, GraphQL, WebSocket and LLM APIs. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/transilienceai/communitytools/tree/main/skills/api-security
- **Repository:** https://github.com/transilienceai/communitytools
- **GitHub stars:** 641
- **License:** MIT
- **Skill name:** api-security
- **Collection:** https://github.com/transilienceai/communitytools
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-02

## About

This skill points an agent at API endpoints and walks it through checks for vulnerabilities across REST, GraphQL, WebSocket and LLM-integrated APIs. The suggested workflow starts with discovering endpoints and documentation such as Swagger files or a GraphQL schema, then mapping how authentication and authorization are handled, testing each API type with its own technique set, validating data exposure and access control flaws, and recording HTTP request and response logs as evidence.

The reference library is organized by API type, with GraphQL, REST, WebSocket and Web-LLM technique files and lab-style scenarios. Specific scenarios cover OData cross-tenant authorization, Cognito unauthenticated posture with SRP sign-in, and per-role authorization over an authenticated WebSocket.

For large or offline API surfaces such as big OpenAPI or Postman collections or HAR captures, the skill describes a fixture-driven approach. It relies on companion tools referenced in the file (a fixture ingest script and an authorization replay harness) and a separate session acquisition skill for per-role tokens. The bundled folder itself contains no scripts, so those tools must be supplied separately.

## When your agent uses it

> API security testing - GraphQL, REST API, WebSocket, and Web-LLM attack techniques.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/transilienceai/communitytools/tree/HEAD/skills/api-security)
- [License: MIT](https://github.com/transilienceai/communitytools/tree/HEAD/skills/api-security)

## Features

- **GraphQL attack techniques:** Covers introspection, batching attacks, nested query denial of service and field suggestion abuse.
- **REST API authorization testing:** Checks for BOLA and IDOR, mass assignment, rate limiting gaps, auth bypass and versioning issues.
- **WebSocket security checks:** Covers cross-site hijacking, message manipulation and authentication flaws in socket traffic.
- **Web-LLM attack coverage:** Addresses prompt injection through APIs, excessive agency and data exfiltration risks.
- **Per-role authorization matrix:** Describes replaying endpoints under each role to flag object and function level access failures.
- **Evidence-first workflow:** Sequences discovery, auth mapping, testing and capture of HTTP logs as proof.

## Good for

- Test a REST API for broken object level authorization between user accounts
- Check a GraphQL endpoint for introspection exposure and query batching abuse
- Review a WebSocket service for message tampering and session hijacking flaws
- Assess an LLM-backed API for prompt injection and excessive agency
- Replay a large OpenAPI collection across several user roles to find access control gaps

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/api-security` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/transilienceai/communitytools.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/api-security &&
cp -R "$tmp/skills/api-security" ~/.claude/skills/api-security &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/api-security` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/api-security` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/transilienceai/communitytools.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/api-security &&
cp -R "$tmp/skills/api-security" ~/.agents/skills/api-security &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/api-security` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/api-security` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/transilienceai/communitytools.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/api-security &&
cp -R "$tmp/skills/api-security" ~/.cursor/skills/api-security &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/api-security` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/transilienceai/communitytools.git --path skills/api-security
```

Or copy the folder to `~/.gemini/skills/api-security` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/api-security`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/transilienceai/communitytools.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/api-security &&
cp -R "$tmp/skills/api-security" ~/.copilot/skills/api-security &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/api-security` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/transilienceai/communitytools.git
```

Then copy `communitytools/skills/api-security` into your agent's skills folder as `api-security`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Which API types does API security cover?

REST APIs, GraphQL, WebSocket connections and LLM-integrated APIs, each with its own list of attack vectors and reference files.

### Does API security include scripts I can run directly?

The skill folder contains no scripts. Its large-surface section refers to a fixture ingest tool and an authorization replay harness that are not part of this folder.

### What does the workflow ask the agent to do first?

Discover API endpoints and documentation such as Swagger files or a GraphQL schema, then map authentication and authorization before testing.

### How do I install API security in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/api-security to use it in all your projects, or to .claude/skills/api-security in one project.

### Does API security run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use API security?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to API security?

The closest alternatives to API security are AI threat testing, API security auth pattern, Authentication, Client side and Server side.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [AI threat testing](https://ai-powered.com/skills/ai-threat-testing): AI threat testing is an open-source agent skill for security.
- [API security auth pattern](https://ai-powered.com/skills/api-security-auth-pattern): API security auth pattern is an open-source agent skill for security.
- [Authentication](https://ai-powered.com/skills/authentication): Authentication is an open-source agent skill for security.
- [Client side](https://ai-powered.com/skills/client-side): Client side is an open-source agent skill for security.
- [Server side](https://ai-powered.com/skills/server-side): Server side is an open-source agent skill for security.
- [Web app logic](https://ai-powered.com/skills/web-app-logic): Web app logic is an open-source agent skill for security.
- [Agentic safety audit](https://ai-powered.com/skills/agentic-safety-audit): Agentic safety audit is an open-source agent skill for security.
- [Essential tools](https://ai-powered.com/skills/essential-tools): Essential tools is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/api-security
