manage-tiers
Performs administrative CRUD operations on API rate limiting tiers.
Install
mkdir -p .claude/skills/manage-tiers && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12470" && unzip -o skill.zip -d .claude/skills/manage-tiers && rm skill.zipInstalls to .claude/skills/manage-tiers
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Create, list, update, and delete API rate limiting tiersKey capabilities
- →Create new API rate limit tiers
- →List existing API rate limit tiers
- →Update properties of an API rate limit tier
- →Delete API rate limit tiers
- →Configure environment-specific API access
How it works
The skill performs CRUD operations on API rate limiting tiers by sending JSON-RPC requests to a specified base URL, optionally including an admin key for hosted deployments.
Inputs & outputs
When to use manage-tiers
- →List rate limit tiers
- →Create a new tier
- →Delete an existing tier
About this skill
Manage API Rate Limiting Tiers
CRUD operations for API rate limiting tiers on GenLayer Studio deployments.
Setup
Before any operation, determine the target environment:
-
Ask the user which environment they are targeting:
- Local dev:
BASE_URL=http://localhost:4000/api, noadmin_keyneeded - Hosted (dev/stg/prd):
BASE_URL=https://<domain>/api, requiresadmin_key
- Local dev:
-
For hosted deployments, ask the user for the
ADMIN_API_KEY(stored in k8s secrets asADMIN_API_KEY).
Operations
Ask the user which operation to perform: Create, List, Update, or Delete.
List Tiers
curl -s -X POST "$BASE_URL" -H "Content-Type: application/json" --data-binary @- <<'EOF' | python3 -m json.tool
{"jsonrpc":"2.0","method":"admin_listTiers","params":{"admin_key":"<ADMIN_KEY>"},"id":1}
EOF
For local dev (no admin_key):
curl -s -X POST "$BASE_URL" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"admin_listTiers","params":{},"id":1}' | python3 -m json.tool
Create Tier
Ask the user for: name, rate_limit_minute, rate_limit_hour, rate_limit_day.
curl -s -X POST "$BASE_URL" -H "Content-Type: application/json" --data-binary @- <<'EOF' | python3 -m json.tool
{"jsonrpc":"2.0","method":"admin_createTier","params":{"name":"<NAME>","rate_limit_minute":<RPM>,"rate_limit_hour":<RPH>,"rate_limit_day":<RPD>,"admin_key":"<ADMIN_KEY>"},"id":1}
EOF
Update Tier
Note: This endpoint may not exist yet. Check by listing tiers first. If admin_updateTier is not available, inform the user it needs to be implemented.
Ask the user for: name (existing tier) and which limits to change.
curl -s -X POST "$BASE_URL" -H "Content-Type: application/json" --data-binary @- <<'EOF' | python3 -m json.tool
{"jsonrpc":"2.0","method":"admin_updateTier","params":{"name":"<NAME>","rate_limit_minute":<RPM>,"rate_limit_hour":<RPH>,"rate_limit_day":<RPD>,"admin_key":"<ADMIN_KEY>"},"id":1}
EOF
Only include the fields that need changing.
Delete Tier
Note: This endpoint may not exist yet. If admin_deleteTier is not available, inform the user it needs to be implemented.
Deletion fails if any API keys (active or inactive) reference the tier.
curl -s -X POST "$BASE_URL" -H "Content-Type: application/json" --data-binary @- <<'EOF' | python3 -m json.tool
{"jsonrpc":"2.0","method":"admin_deleteTier","params":{"name":"<NAME>","admin_key":"<ADMIN_KEY>"},"id":1}
EOF
Default Seeded Tiers
These are created by the Alembic migration:
| Tier | Requests/min | Requests/hr | Requests/day |
|---|---|---|---|
| free | 30 | 500 | 5,000 |
| pro | 120 | 3,000 | 50,000 |
| unlimited | 999,999 | 999,999 | 999,999 |
Common Errors
| Error | Cause |
|---|---|
-32000 "Admin access required" | Missing or invalid admin_key on hosted deployment |
-32602 "Duplicate tier name" | Tier with that name already exists (unique constraint) |
-32602 "Cannot delete tier: N API key(s) still reference it" | Deactivate/delete keys first |
-32001 "Tier not found: X" | Tier name doesn't exist |
Important Notes
- Always use
--data-binary @-with heredoc (<<'EOF') to avoid shell expansion issues with special characters in the admin key (e.g.,+,=). - Tier names must be unique and max 50 characters.
- Rate limits are enforced per sliding window (minute, hour, day) using Redis sorted sets.
- When rate limiting is disabled (
RATE_LIMIT_ENABLED=false), tiers can still be managed but limits are not enforced.
Reference
- Models:
backend/database_handler/models.py(ApiTier class) - Endpoints:
backend/protocol_rpc/endpoints.py(admin_create_tier, admin_list_tiers) - Migration:
backend/database_handler/migration/versions/b1c3e5f7a902_add_api_tiers_and_api_keys.py
When not to use it
- →When API keys still reference the tier to be deleted
- →When the `admin_updateTier` endpoint is not implemented
- →When the `admin_deleteTier` endpoint is not implemented
Limitations
- →Tier deletion fails if API keys reference it
- →Update and delete endpoints may not exist
- →Tier names must be unique and max 50 characters
How it compares
This skill automates API tier management through JSON-RPC calls, whereas a manual approach would involve constructing and executing `curl` commands for each operation.
Compared to similar skills
manage-tiers side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| manage-tiers (this skill) | 0 | 5mo | Review | Intermediate |
| fastapi-templates | 520 | 2mo | No flags | Intermediate |
| fastapi-pro | 79 | 4mo | No flags | Advanced |
| springboot-patterns | 11 | 5mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
fastapi-pro
sickn33
Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.
springboot-patterns
affaan-m
Spring Boot 架构模式、REST API 设计、分层服务、数据访问、缓存、异步处理和日志记录。适用于 Java Spring Boot 后端工作。
backend-development
skillcreatorai
Backend API design, database architecture, microservices patterns, and test-driven development. Use for designing APIs, database schemas, or backend system architecture.
dotnet-backend-patterns
wshobson
Master C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching, and testing with xUnit. Use when developing .NET backends, reviewing C# code, or designing API architectures.
laravel-specialist
Jeffallan
Use when building Laravel 10+ applications requiring Eloquent ORM, API resources, or queue systems. Invoke for Laravel models, Livewire components, Sanctum authentication, Horizon queues.