rate-limit-setup — for Claude Code rate-limit-setup, grokify, community, for Claude Code, ide skills, usage_tracking, Limiting, Implementation, project, database-backed

v1.0.0

About this Skill

Perfect for Security Agents needing advanced rate limiting capabilities to prevent abuse and ensure fair usage. Implement rate limiting for API endpoints. Use when user mentions rate limit, quota, usage tracking, throttle, or limit requests.

Features

Rate Limiting Implementation
This project uses database-backed rate limiting via the usage tracking table.
Current Implementation
Located in app/api/generate-image/route.ts:
Limit : 2 premium images per user per 24 hours

# Core Topics

AppleLamps AppleLamps
[0]
[0]
Updated: 3/12/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reviewed Landing Page Review Score: 10/11

Killer-Skills keeps this page indexable because it adds recommendation, limitations, and review signals beyond the upstream repository text.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Quality floor passed for review Locale and body language aligned
Review Score
10/11
Quality Score
57
Canonical Locale
en
Detected Body Locale
en

Perfect for Security Agents needing advanced rate limiting capabilities to prevent abuse and ensure fair usage. Implement rate limiting for API endpoints. Use when user mentions rate limit, quota, usage tracking, throttle, or limit requests.

Core Value

Empowers agents to implement database-backed rate limiting via the `usage_tracking` table, utilizing SHA-256 hash of IP + User-Agent for anonymous identification and automatic reset after 24 hours, effectively preventing excessive premium image generation.

Ideal Agent Persona

Perfect for Security Agents needing advanced rate limiting capabilities to prevent abuse and ensure fair usage.

Capabilities Granted for rate-limit-setup

Preventing abuse of premium image generation
Enforcing fair usage policies for users
Tracking and limiting API requests

! Prerequisites & Limits

  • Requires database access for `usage_tracking` table
  • Limited to 2 premium images per user per 24 hours
  • Relies on SHA-256 hash for anonymous user identification

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is rate-limit-setup?

Perfect for Security Agents needing advanced rate limiting capabilities to prevent abuse and ensure fair usage. Implement rate limiting for API endpoints. Use when user mentions rate limit, quota, usage tracking, throttle, or limit requests.

How do I install rate-limit-setup?

Run the command: npx killer-skills add AppleLamps/grokify/rate-limit-setup. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for rate-limit-setup?

Key use cases include: Preventing abuse of premium image generation, Enforcing fair usage policies for users, Tracking and limiting API requests.

Which IDEs are compatible with rate-limit-setup?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for rate-limit-setup?

Requires database access for `usage_tracking` table. Limited to 2 premium images per user per 24 hours. Relies on SHA-256 hash for anonymous user identification.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add AppleLamps/grokify/rate-limit-setup. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use rate-limit-setup immediately in the current project.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

rate-limit-setup

Install rate-limit-setup, an AI agent skill for AI agent workflows and automation. Review the use cases, limitations, and setup path before rollout.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Rate Limiting Implementation

This project uses database-backed rate limiting via the usage_tracking table.

Current Implementation

Located in app/api/generate-image/route.ts:

  • Limit: 2 premium images per user per 24 hours
  • Identification: SHA-256 hash of IP + User-Agent (anonymous)
  • Reset: Automatic after 24 hours

Instructions

  1. Create user identifier (anonymous hash):
typescript
1const getUserIdentifier = async (req: NextRequest): Promise<string> => { 2 const ip = req.headers.get('x-forwarded-for')?.split(',')[0] 3 || req.headers.get('x-real-ip') 4 || 'unknown'; 5 const userAgent = req.headers.get('user-agent') || 'unknown'; 6 7 const encoder = new TextEncoder(); 8 const data = encoder.encode(ip + userAgent); 9 const hashBuffer = await crypto.subtle.digest('SHA-256', data); 10 const hashArray = Array.from(new Uint8Array(hashBuffer)); 11 return hashArray.map((b) => b.toString(16).padStart(2, '0')).join(''); 12};
  1. Check and update usage:
typescript
1import { db, usageTracking } from '@/db'; 2import { eq } from 'drizzle-orm'; 3 4const checkUsage = async (identifier: string, limit: number) => { 5 const existing = await db 6 .select() 7 .from(usageTracking) 8 .where(eq(usageTracking.userIdentifier, identifier)) 9 .limit(1); 10 11 let usage = existing[0] || null; 12 const now = new Date(); 13 const resetNeeded = !usage || 14 now.getTime() - new Date(usage.lastResetAt!).getTime() > 24 * 60 * 60 * 1000; 15 16 if (!usage) { 17 const [inserted] = await db 18 .insert(usageTracking) 19 .values({ userIdentifier: identifier, premiumImagesCount: 0, lastResetAt: now }) 20 .returning(); 21 usage = inserted; 22 } else if (resetNeeded) { 23 const [updated] = await db 24 .update(usageTracking) 25 .set({ premiumImagesCount: 0, lastResetAt: now, updatedAt: now }) 26 .where(eq(usageTracking.userIdentifier, identifier)) 27 .returning(); 28 usage = updated; 29 } 30 31 const withinLimit = (usage?.premiumImagesCount || 0) < limit; 32 return { withinLimit, usage }; 33};
  1. Increment counter after successful action:
typescript
1await db 2 .update(usageTracking) 3 .set({ 4 premiumImagesCount: (usage?.premiumImagesCount || 0) + 1, 5 updatedAt: new Date(), 6 }) 7 .where(eq(usageTracking.userIdentifier, userIdentifier));
  1. Return appropriate response when limited:
typescript
1if (!withinLimit) { 2 return NextResponse.json( 3 { error: 'Rate limit exceeded. Try again in 24 hours.' }, 4 { status: 429, headers: corsHeaders } 5 ); 6}

For New Rate-Limited Features

If tracking a different resource, add a new column to usage_tracking or create a new table:

typescript
1// In db/schema.ts 2featureCount: integer('feature_count').default(0),

Examples

  • "Limit roasts to 5 per day" → Add roastCount column, apply pattern above
  • "Add API request throttling" → Create new tracking table for general requests

Guardrails

  • Never expose user identifiers in responses
  • Log usage counts, not full hashes
  • Use 429 status code for rate limit responses
  • Include reset time info in rate limit responses when possible
  • Test reset logic carefully (24-hour boundary)

Related Skills

Looking for an alternative to rate-limit-setup or another community skill for your workflow? Explore these related open-source skills.

View All

openclaw-release-maintainer

Logo of openclaw
openclaw

openclaw-release-maintainer is an AI agent skill for openclaw release maintainer.

333.8k
0
AI

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
AI

flags

Logo of vercel
vercel

flags is an AI agent skill for use this skill when adding or changing framework feature flags in next.js internals.

138.4k
0
Browser

pr-review

Logo of pytorch
pytorch

pr-review is an AI agent skill for pytorch pr review skill.

98.6k
0
Developer