security-skill

Generates authentication, authorization, input validation, and rate limiting patterns for APIs.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/tendercoconut174/ai-agent-platform --skill security-skill-tendercoconut174
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: security-skill
Source: https://github.com/tendercoconut174/ai-agent-platform/tree/main/.cursor/skills/security-skill
Command: npx skills add https://github.com/tendercoconut174/ai-agent-platform --skill security-skill-tendercoconut174

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building secure APIs requires consistent handling of authentication, secrets, input validation, and rate limiting, and mistakes in any of these areas expose applications to attacks. This Skill provides concrete security rules and patterns so generated code follows safe practices by default. ## Core Features & Use Cases - Authentication & Secrets Management: Generate JWT, OAuth, and API key handling with environment-variable-based secrets using python-dotenv and Docker injection. - API Hardening: Apply Pydantic input validation, payload size limits, input sanitization, and generic error responses that avoid leaking internals. - Rate Limiting: Implement gateway-level and Redis-backed distributed rate limiting with 429 responses and Retry-After headers. - Use Case: When scaffolding a new FastAPI endpoint that accepts user data and calls an AI agent, use this Skill to generate token validation, Pydantic schemas, and rate limit configuration in one pass. ## Quick Start Use the security skill to add JWT authentication, Pydantic input validation, and Redis rate limiting to my API endpoint.

Frequently Asked Questions about security-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement JWT authentication for an API?▼

Store signing secrets in environment variables, validate tokens before processing any request, and never log token contents. Use python-dotenv locally and inject secrets via Docker in production.

How to add rate limiting to an API with Redis?▼

Apply rate limits at the gateway layer and use Redis for distributed rate limiting across instances. Return HTTP 429 with a Retry-After header when limits are exceeded, and set different limits for authenticated versus anonymous users.

What is the best way to validate API input in Python?▼

Validate all inputs with Pydantic models, reject oversized payloads with body size limits, and sanitize user input before passing it to agents or tools. This prevents malformed data and injection attempts from reaching internal logic.

Should API error messages expose stack traces?▼

No, APIs should return generic error messages and never expose stack traces or internal details to clients. Detailed errors should stay in server logs, while secrets, tokens, and PII must never be logged at all.

How do I prevent SQL injection in Python applications?▼

Use parameterized queries for all database access and never concatenate user input into SQL strings. Combined with Pydantic input validation, this blocks the most common injection paths.