npx claudepluginhub arbazkhan971/godmodeThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
/godmode:ratelimit, "rate limit", "throttle"grep -r "rate.limit\|ratelimit\|throttle" \
package.json requirements.txt go.mod 2>/dev/null
grep -r "rateLim\|throttle\|RateLimit" \
--include="*.ts" --include="*.py" -l 2>/dev/null
Current: None | Basic (nginx) | App-level | Multi-layer
API Surface: public <N>, authenticated <N>, internal <N>
Risk: unauthenticated abuse, cost-sensitive endpoints
IF unsure: use sliding window counter. IF burst tolerance needed: use token bucket.
Anonymous: 20/min, burst 5, 1K/day
Free: 60/min, burst 15, 10K/day
Basic/$29: 300/min, burst 50, 100K/day
Pro/$99: 1K/min, burst 200, 1M/day
Enterprise: 5K/min, burst 1K, unlimited
Internal: no limit (bypass)
Endpoint overrides (stricter):
Resolution: endpoint > user tier > global IP.
Standard: RateLimit-Limit, RateLimit-Remaining,
RateLimit-Reset. On 429: add Retry-After.
Set headers on EVERY response (success and 429).
Lua script for atomic sliding window counter.
Without shared state, N instances * limit = N*limit.
Load script via SCRIPT LOAD, call via EVALSHA.
Resolve client key (API key or IP), resolve tier, call Redis Lua, set headers, return 429 when denied. Skip health checks and internal paths.
RULE: Rate limiter failure NEVER causes app failure. Fail OPEN when Redis is down. Log warning. Optional local in-memory fallback (less accurate).
Rate limit = short window (100/min).
Quota = long window (10K/day, 1M/month).
INCR quota:{key}:{date} with 2-day TTL.
Warn at 75%, 90%, 100%. Optional overage billing.
Metrics: requests_total, rejected_total (>100/min), rejected_ratio (>10%), latency P95 (>5ms), redis_errors, failopen_total (>0), quota_usage (>90%).
All public endpoints protected, auth endpoints strict (<=5/min), headers on all responses, 429 has Retry-After, atomic ops, fail-open, tier limits set.
Append .godmode/ratelimit.tsv:
timestamp algorithm storage tiers endpoint_overrides quota status
KEEP if: limit enforced atomically AND headers present
AND fail-open on Redis down.
DISCARD if: race condition allows bypass
OR 429 missing Retry-After OR fail-closed.
STOP when FIRST of:
- All public endpoints protected
- Tiers configured
- Fail-open verified
On failure: git reset --hard HEAD~1. Never pause.
| Failure | Action |
|---|---|
| Redis unavailable | Fail open, in-memory fallback |
| Clients bypassing | Check atomic ops, add IP limit |
| 429 no Retry-After | Add to response handler |
| Limits too strict | Analyze traffic, increase burst |
| Lua script errors | Check Redis version, reload |