Skip to content
Skills Library
Security · Building & coding

secure-api-design

/secure-api-design

Design secure REST, GraphQL, and RPC APIs. Use when adding endpoints or changing API contracts, authentication/authorization rules, or resource access policies.

Licence
MIT
Last repository change
13.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Design secure REST, GraphQL, and RPC APIs. Use when adding endpoints or changing API contracts, authentication/authorization rules, or resource access policies.

Original author description

Design secure REST, GraphQL, and RPC APIs. Use when adding endpoints or changing API contracts, authentication/authorization rules, or resource access policies.

How it works

  1. Requirements
  2. Workflow
  3. Rules
  4. Output
Original SKILL.md headings · 75 lines, 343 words
SKILL.md preview
---
name: secure-api-design
description: >
  Design secure REST, GraphQL, and RPC APIs.
  Use when adding endpoints or changing API contracts,
  authentication/authorization rules, or resource access policies.
---

# Secure API Design

Design APIs with security enforced by default.

## Requirements

1. **Authentication**
   - Require authentication unless explicitly public.
   - Use established authentication standards.
   - Define accepted credentials; for self-contained tokens,
     specify trusted issuers/keys, algorithms, audience/purpose,
     and validity checks.
   - When applicable, define password storage, recovery and
     brute-force controls, and session renewal/expiry/revocation.

2. **Authorization**
   - Deny access by default.
   - Enforce endpoint, object, and field-level permissions.
   - Prevent IDOR/BOLA and cross-tenant access.
   - Never trust client-provided roles or ownership; validate
     tenant selection against authenticated membership.

3. **Input & Output**
   - Define strict request and response schemas.
   - Validate types, sizes, formats, and allowed fields.
   - Reject unexpected or unauthorized fields.
   - Never expose secrets or internal error details.

4. **Abuse Prevention**
   - Define rate-limit values, enforcement locations, and applicable
     per-user, per-tenant, and global scopes.
   - Bound timeouts, payloads, and upstream response sizes.
   - Restrict pagination and expensive operations.
   - Protect sensitive workflows against replay,
     enumeration, and race conditions.
   - Define mutation invariants and idempotency scope/lifetime.
   - For GraphQL, bound query cost/depth and batch size.

5. **Transport & Access**
   - Require HTTPS.
   - Restrict CORS to trusted origins when applicable.
   - Protect against CSRF when browsers automatically attach
     credentials, including cookies or browser-managed Basic auth.
   - Never expose internal-only endpoints publicly.

## Workflow

1. Identify actors, resources, and trust boundaries.
2. Define authentication and an actor/action/resource permission
   matrix with allowed and denied cases.
3. Design strict request and response contracts.
4. Identify abuse cases and required protections.
5. Document security assumptions and tradeoffs.
6. Ensure security requirements are testable.

## Rules

- Prefer secure defaults over optional protections.
- Apply relevant OWASP API Security Top 10:2023 risks.
- Never rely on client-side authorization.
- Do not introduce unnecessary attack surfaces.
- Flag missing security decisions before implementation.
- Preserve existing functionality unless changes
  are required to address a security risk.

## Output

For each API design, provide:
- Endpoint and authentication requirements.
- Authorization rules and protected resources.
- Input/output constraints.
- Relevant threats and mitigations.
- Security tests required for implementation.

Versions

RepositoryScoreLicence
This page · susorov/agent-skills100MIT
charlieviettq/awesome-agent-skill100MIT

Database snapshot: 13.11.2026 · package version 2bc8542ccb7e (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100api-audit
    Audit REST, GraphQL, and RPC APIs against the OWASP API Security Top 10 (2023). Use when the user mentions 'API security,' 'API audit,' 'BOLA,' 'broken object level authorization,' 'BFLA,' 'function-level authorization,' 'mass assignment,' 'API rate limiting,' 'GraphQL…
  • 90api-security
    Design and enforce REST/GraphQL API Security paradigms. Use when: secure api, audit api security, implement jwt auth.
  • 100design-api
    Design REST and GraphQL APIs: naming, versioning, error shapes, auth. Use when "design an API", "create endpoints", "REST vs GraphQL", or "API contract".
  • 100designing-apis
    Designs REST and GraphQL APIs including endpoints, error handling, versioning, and documentation. Use when creating new APIs, designing endpoints, reviewing API contracts, or when asked about REST, GraphQL, or API patterns.
  • 100create-api-design
    Design a REST or GraphQL API from a feature specification when the user asks to design an API, create endpoints, define an API contract, or plan API resources
  • 100api-security
    API security across REST, GraphQL and gRPC, organised around the OWASP API Security Top 10:2023. USE WHEN: designing, implementing, or auditing REST, GraphQL, or gRPC APIs for security vulnerabilities DO NOT USE FOR: general API design patterns (use the `rest-api` / `graphql`…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.