secure-api-design
/secure-api-design
Design and implement secure APIs—authentication patterns, authorization models, input validation, secrets handling, and safe defaults. Use when designing new endpoints, auth flows, or reviewing API contracts. Triggers: "secure API", "auth design", "JWT", "OAuth", "API best practices".
- Author
- charlieviettq ↗
- Repository
- awesome-agent-skill ↗
- Licence
- MIT
- Last repository change
- 20.07.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 20.07.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Design and implement secure APIs—authentication patterns, authorization models, input validation, secrets handling, and safe defaults. Use when designing new endpoints, auth flows, or reviewing API contracts. Triggers: "secure API", "auth design", "JWT", "OAuth", "API best practices".
Triggers from the description
Original author description
Design and implement secure APIs—authentication patterns, authorization models, input validation, secrets handling, and safe defaults. Use when designing new endpoints, auth flows, or reviewing API contracts. Triggers: "secure API", "auth design", "JWT", "OAuth", "API best practices".
How it works
- Defaults
- Authentication patterns
- Authorization
- Contract-first (public APIs)
- Input and output
- Secrets
- Implementation checklist
- Related
SKILL.md preview
--- name: secure-api-design description: > Design and implement secure APIs—authentication patterns, authorization models, input validation, secrets handling, and safe defaults. Use when designing new endpoints, auth flows, or reviewing API contracts. Triggers: "secure API", "auth design", "JWT", "OAuth", "API best practices". --- # Secure API design ## Defaults - Deny by default; explicit allow per route and role. - Validate at boundary; typed schemas (OpenAPI/JSON Schema/protobuf). - Least privilege for service accounts and API keys. ## Authentication patterns | Pattern | Use when | Notes | |---------|----------|-------| | Session cookie | Browser-first apps | CSRF protection, secure cookies | | Bearer JWT | SPA/mobile, stateless | Short TTL, rotation, no sensitive claims in payload | | API key | Machine-to-machine | Scoped keys, audit log, rate limits | | OAuth2/OIDC | Third-party identity | Standard libraries; validate issuer/audience | ## Authorization - Resource-level checks close to data access (not only route middleware). - Avoid exposing sequential IDs without ownership check. - Document policy matrix: role x action x resource. ## Contract-first (public APIs) - Define OpenAPI/JSON Schema **before** implementation when the API is shared. - Version breaking changes; additive fields preferred. - **Hyrum's Law:** undocumented behavior becomes dependency—document or forbid. - Stable error shape: machine-readable `code`, human `message`, optional `details[]`. - Pagination: cursor preferred for large sets; cap `limit`; document sort order. ## Input and output - Reject unknown fields on write endpoints when schema allows. - Normalize encoding; limit string/array sizes. - Redact secrets in logs; structured logging without raw tokens. ## Secrets - Never commit secrets; use env/secret manager. - Separate dev/stage/prod credentials. - Rotate on leak suspicion. ## Implementation checklist - [ ] Schema validation on all inputs - [ ] Authn required except explicit public routes - [ ] Authz enforced per resource - [ ] Rate limits on login and expensive operations - [ ] Security headers and TLS termination documented ## Related Use `api-security-testing` before release for verification.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · charlieviettq/awesome-agent-skill | 100 | MIT |
| susorov/agent-skills | 100 | MIT |
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version de5857233109 (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
- 100building-api-authentication
Build secure API authentication systems with OAuth2, JWT, API keys, and session management. Use when implementing secure authentication flows. Trigger with phrases like "build authentication", "add API auth", or "secure the API". - 100building-api-authentication
Build secure API authentication systems with OAuth2, JWT, API keys, and session management. Use when implementing secure authentication flows. Trigger with phrases like "build authentication", "add API auth", or "secure the API". - 95api-security-auth-pattern
Designs and documents authentication, authorization, and security patterns for any API. Use whenever the user asks about OAuth 2.0, JWT, API keys, RBAC, ABAC, rate limiting for security, CORS, HTTPS enforcement, input validation, OWASP API security, token refresh flows,… - 100security-patterns
Implements authentication, authorization, encryption, secrets management, and security hardening patterns. Use when designing auth flows, managing secrets, configuring CORS, implementing rate limiting, or when asked about JWT, OAuth, password hashing, API keys, RBAC, or security best practices. - 100auth-system
Implement secure authentication and authorization systems with JWT, OAuth2, Session-based auth, and RBAC. Use when: (1) implementing user login/signup, (2) setting up JWT tokens, (3) OAuth2 integration (Google, GitHub, etc.), (4) role-based access control (RBAC), (5) password… - 100security
This skill should be used when designing, planning, implementing, or reviewing any non-trivial change, or when the user asks to "harden X", "add auth", "validate input", "check for vulnerabilities", "secure endpoint" — enforces defense in depth, input validation, secure…