api-security-patterns

api-security-patterns is a skill for Claude Code from frank-luongt/faos-skills-marketplace. It costs 0 tokens per session (5,219 once invoked), scanned A, original, Apache-2.0.

A set of implementation patterns for protecting application programming interfaces, which are endpoints that let software exchange data. It covers authentication, permissions, request limits, gateway protection, and risks from the OWASP API Security Top 10.

In plain words
What is it for?
Use it when designing or reviewing APIs and microservices, adding authentication or authorization, preventing abuse with rate limits, or securing GraphQL, WebSocket, and FastAPI services.
Why use it?
It helps developers review and harden APIs against common misuse and attacks. The patterns address the repeated need to verify who is calling, what they may do, and how often they may call.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the faos-ai-engineer plugin — 14 skills, 8 commands shipped together

Good fit Use it when designing or reviewing APIs and microservices, adding authentication or authorization, preventing abuse with rate limits, or securing GraphQL, WebSocket, and FastAPI services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/frank-luongt/faos-skills-marketplace/api-security-patterns
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 frank-luongt/faos-skills-marketplace --skill api-security-patterns
Clone the repo
git clone --depth 1 https://github.com/frank-luongt/faos-skills-marketplace

Made for: Claude Code.

Or install faos-ai-engineer, the plugin that ships this one along with the rest of its 14 skills, 8 commands.

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-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/frank-luongt/faos-skills-marketplace/api-security-patterns/github.svg)](https://agentmods.dev/skills/frank-luongt/faos-skills-marketplace/api-security-patterns)
Your own site
<a href="https://agentmods.dev/skills/frank-luongt/faos-skills-marketplace/api-security-patterns"><img src="https://agentmods.dev/badge/skills/frank-luongt/faos-skills-marketplace/api-security-patterns/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-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/frank-luongt/faos-skills-marketplace/api-security-patterns"><img src="https://agentmods.dev/badge/skills/frank-luongt/faos-skills-marketplace/api-security-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,219 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00000 $0.05219
Opus 5 $0.00000 $0.02610
Sonnet 5 $0.00000 $0.01044
Haiku 4.5 $0.00000 $0.00522

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

Security

Grade A, and why

api-security-patterns 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 12d 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.

plugins/faos-ai-engineer/skills/api-security-patterns/SKILL.md · 650 lines

How it starts

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


name: api-security-patterns description: Advanced API security patterns covering OWASP API Top 10, authentication, authorization, rate limiting, and gateway hardening tags: [api, security]

Advanced API Security Patterns

Overview

APIs are the primary attack surface for modern applications. Over 90% of web-enabled applications expose more attack surface through APIs than through traditional UI. This skill provides defense-in-depth patterns for API security, mapping OWASP API Security Top 10 risks to concrete prevention code.

Core principle: Every API endpoint is an entry point for attackers. Authenticate, authorize, validate, and rate-limit every request -- no exceptions.

This skill enhances the existing @owasp-api-top10 skill with implementation-level patterns for Python/FastAPI, OPA policy-as-code, Redis-based rate limiting, and GraphQL-specific defenses.

When to Use This Skill

  • Designing a new API or microservice
  • Conducting a security review of existing API endpoints
  • Implementing authentication or authorization middleware
  • Setting up rate limiting or abuse prevention
  • Hardening a GraphQL or WebSocket API
  • Responding to an API-related security finding or penetration test result
  • Preparing for SOC 2, PCI DSS, or HIPAA compliance audits that cover API security

How It Works

Step 1: Threat Model the API Surface

Before writing security code, enumerate your attack surface:

API Threat Model Checklist:
============================
[ ] List all endpoints (including undocumented/debug endpoints)
[ ] Classify data sensitivity per endpoint (public, internal, confidential, restricted)
[ ] Identify authentication requirements per endpoint
[ ] Map authorization rules (who can access what)
[ ] Document rate limiting requirements per endpoint/consumer
[ ] Identify external dependencies and trust boundaries
[ ] Review OWASP API Top 10 against each endpoint:
    API1  - Broken Object Level Authorization (BOLA)
    API2  - Broken Authentication
    API3  - Broken Object Property Level Authorization
    API4  - Unrestricted Resource Consumption
    API5  - Broken Function Level Authorization
    API6  - Unrestricted Access to Sensitive Business Flows
    API7  - Server-Side Request Forgery (SSRF)
    API8  - Security Misconfiguration
    API9  - Improper Inventory Management
    API10 - Unsafe Consumption of APIs

Read the full file on GitHub · 650 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. 12d ago First seen · 650 lines · 0 tokens per session scan A 28ad760f8f6d

Subscribe to this mod's changes

api-security-patterns is a skill published in the GitHub repository frank-luongt/faos-skills-marketplace (33 stars, last pushed 2mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 5,219 tokens. 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

scalability-architecture

Full-stack scalability, architecture, and high-scale engineering audit engine for web applications. Use this skill when the user wants to audit a codebase for scalability bottlenecks, architecture quality, production readiness, infrastructure maturity, performance issues, database design, caching strategy, deployment…

Heet-P/skills · 186 tokens

durable-objects

Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.

fcakyon/claude-codex-settings · 22 tokens

agent-communication-protocol

Open protocol for AI agent interoperability enabling standardized communication between agents, applications, and humans across different frameworks.

majiayu000/claude-skill-registry · 25 tokens

workflow-ai-coding

Edit, validate, debug, publish, and inspect ReachAI Workflow drafts through the Workflow AI Coding REST API. Use when asked to create or modify a workflow graph, add/update/delete nodes or edges, validate GraphSpec, dry-run or debug-run a workflow, inspect trace/run output, check release readiness, publish a validated…

w8123/EnterpriseAgentFramework · 85 tokens

api-patterns

API design: naming, versioning, pagination, idempotency, OpenAPI, error contracts and safe retries. Triggers: API design, REST, GraphQL, OpenAPI, Swagger, error response, HTTP status, rate limit.

softspark/ai-toolkit · 52 tokens

csharp-patterns

C#/.NET: LINQ, async/await, DI, records, nullable refs, ASP.NET Core, EF Core, MediatR. Triggers: C#, .NET, dotnet, ASP.NET, EF Core, LINQ, record type, IServiceCollection.

softspark/ai-toolkit · 61 tokens