Works with the AI Agents you already use
Security pack
Production-ready security patterns for auth, API defense, data privacy, and dependency auditing.
$9.99
Security pack
Example session with this skill installed
I'm building a public search endpoint and I'm worried about bots scraping my data and driving up my costs. How do I protect it?
- Read your context and instructions
- Compiled the security
I will implement a multi-layered defense for your search endpoint, focusing on rate limiting, request bounding, and input validation.
API Defense Implementation
| Defense Layer | Implementation Detail | Target Risk |
|---|---|---|
| Rate Limiting | Sliding window (120 req/min) via Redis/Upstash | Automated scraping |
| Input Validation | Schema-based validation (Zod/Joi) | Injection / SQLi |
| Request Bounding | Cap pagination to 50 results; 500ms timeout | Resource exhaustion |
| Client Identification | Key by IP + UserID (if auth'd) | Distributed botnets |
| Logging | Alert on 429 status code spikes | Active attack detection |
import { Ratelimit } from "@upstash/ratelimit";
import { Redis } from "@upstash/redis";
// Shared rate limiter for the search endpoint
const searchLimiter = new Ratelimit({
redis: Redis.fromEnv(),
limiter: Ratelimit.slidingWindow(20, "1 m"), // 20 searches per minute
});
export async function GET(req: Request) {
const ip = req.headers.get("x-forwarded-for") ?? "anonymous";
const { success, limit, remaining, reset } = await searchLimiter.limit(ip);
if (!success) {
return new Response("Too Many Requests", {
status: 429,
headers: {
"Retry-After": String(Math.ceil((reset - Date.now()) / 1000)),
"RateLimit-Limit": String(limit),
},
});
}
// Proceed with validated search logic...
}
Next steps
- Provision an Upstash Redis instance and add the credentials to your
.env(ensure it is gitignored). - Apply a Zod schema to the search query parameters to reject unexpected fields or oversized strings.
- Set a global timeout on the database query to prevent long-running searches from locking resources.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop shipping "vibe-coded" applications that crumble under the first automated scan or bot attack. This security suite provides a high-level defensive layer for developers building public-facing software. It replaces vague security advice with concrete, copy-paste implementations for the most critical points of failure: authentication, API defense, and data privacy.
The package covers the entire lifecycle of a secure application. You get specific patterns for shared-store rate limiting using Redis, Argon2id password hashing, and PII data mapping. It addresses the supply-chain risks inherent in modern package managers and provides a hard-line strategy for secrets management to prevent catastrophic API key leaks.
What it does
- API Abuse Defense implements rate limiting, input validation, and request bounding to stop scrapers and bot attacks.
- AppSec Hardening applies a senior-level checklist for XSS, CSRF, SSRF, and IDOR prevention with code-level fixes.
- Auth & Access Control delivers secure login flows, MFA, and session management using HttpOnly cookies over localStorage.
- Data Privacy & PII generates data maps and deletion pipelines to meet GDPR and CCPA requirements.
- Dependency Vetting audits third-party packages for maintenance, licenses, and typosquatting before they hit your lockfile.
- Secrets Management establishes a zero-leak workflow for API keys and connection strings across dev, CI, and production.
How it works
- Audit the current codebase against the appsec-hardening checklist to identify immediate vulnerabilities.
- Implement the shared-store rate limiting and session-based auth patterns using the provided code blocks.
- Scan dependencies and environment variables to ensure no secrets are exposed and no malicious packages are installed.
- Document data flow with the PII data map to ensure compliance and readiness for security reviews.
Frameworks & tools
Works with any stack but provides specific implementations for Node.js, Redis, Upstash, Clerk, Auth.js, Supabase, and Django.
Why this beats prompting it yourself
Generic LLMs often suggest insecure defaults like JWTs in localStorage or client-side validation. This skill enforces production-ready standards like Argon2id hashing and server-side ownership checks that pass enterprise security audits.
Use cases
- Hardening a public API before a production launch.
- Replacing hand-rolled auth with a secure session-based system.
- Preparing for a GDPR/CCPA privacy audit or enterprise vendor review.
- Cleaning up a repository after a secret or API key has been committed.
Known limitations
Does not provide automated penetration testing or real-time WAF monitoring. Requires a shared store like Redis for multi-instance rate limiting.
Requires Redis/Upstash for shared rate limiting. Does not replace a professional manual pentest. Focuses on web/API security, not infrastructure or OS-level hardening.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 28 days ago
Requires
Permissions
Allowed Hosts