curl -L -o rate-limiter-toolkit.skill "https://aiskillstore.io/v1/agent/skills/b6e3a261-8573-445c-8a6f-900a40a4bfc8/download?platform=ClaudeCode"
{
"tool": "download_skill",
"arguments": {
"skill_id": "b6e3a261-8573-445c-8a6f-900a40a4bfc8",
"platform": "ClaudeCode"
}
}
{
"mcpServers": {
"skill-store": {
"url": "https://aiskillstore.io/mcp/"
}
}
}
Track, check, and manage API rate limit state for agents calling external APIs — token bucket simulation, backoff strategy, and usage reporting
Compatible Platforms any
Findings: ["메타데이터 경고: 권장 필드 없음: 'requirements' (SKILL.md v2 권장)", "메타데이터 경고: 권장 필드 없음: 'changelog' (SKILL.md v2 권장)"]
✅ No security risks found.
AI Review Stage
제출된 스킬 패키지는 AI 에이전트의 API Rate Limit 관리를 위한 툴킷으로, 메타데이터와 코드 모두 보안 검수 기준을 충족합니다. 1. **권한 준수:** 스킬 메타데이터에 `network: false`, `filesystem: false`, `subprocess: false`, `env_vars: []`로 명확하게 선언되어 있으며, 제공된 `main.py` 및 `lib/core.py` 코드에서 이 권한들을 위반하는 어떠한 외부 통신, 파일 시스템 접근, 또는 서브프로세스 실행 시도도 발견되지 않았습니다. `os` 모듈은 경로 조작(`os.path.dirname`, `os.path.abspath`)에만 사용되며, 이는 안전한 범위 내입니다. 정적 분석 결과 또한 `red_flags_found: []` 및 `forbidden_exec_files_found: []`로 권한 준수를 뒷받침합니다. 2. **악의적 목적 없음:** 코드는 Rate Limit 추적, 확인, 백오프 계산, 토큰 버킷 시뮬레이션, 보고 등 스킬의 명시된 목적에만 충실합니다. 데이터 탈취, 시스템 파괴, 또는 난독화의 징후는 전혀 없습니다. 코드는 가독성이 높고 명확하게 작성되었습니다. 3. **외부 통신 없음:** 선언된 권한에 따라 외부 네트워크 통신을 수행하는 코드가 없으며, 이는 스킬의 목적과 일치합니다. 4. **사용자 데이터 무단 수집/전송 없음:** 스킬은 입력으로 받은 `payload`와 내부 `state` 객체를 기반으로 연산을 수행하고 결과를 `stdout`으로 반환합니다. 외부 통신이 없으므로 사용자 데이터를 무단으로 수집하거나 전송할 수 있는 메커니즘이 없습니다. 5. **코드 품질:** 코드는 `main.py`에서 액션을 디스패치하고 `lib/core.py`에서 핵심 로직을 처리하는 모듈화된 구조를 가지고 있습니다. 입력 유효성 검사 및 구조화된 에러 응답 처리가 잘 되어 있으며, `re`, `time`, `datetime` 등 표준 라이브러리를 적절하게 사용하여 Rate Limit 관련 계산 및 헤더 파싱 로직을 구현했습니다. 코드 품질은 스킬의 목적에 부합하며 안정적으로 동작할 것으로 판단됩니다.
Representative input/output examples for this skill. Agents can use these to understand how to invoke the skill and what output to expect.
Register and update rate limit state for OpenAI RPM after a response
{
"action": "track",
"current_usage": 12,
"limit_type": "rpm",
"limit_value": 60,
"provider": "openai",
"window_reset_at": 1715700060.0
}
{
"ok": true,
"state": {
"providers": {
"openai": {
"rpm": {
"limit": 60,
"reset_at": 1715700060.0,
"usage": 12,
"utilization": 0.2
}
}
}
}
}
Check whether the next API call can be made without hitting rate limits
{
"action": "check",
"limit_type": "rpm",
"provider": "openai",
"state": {
"providers": {
"openai": {
"rpm": {
"limit": 60,
"reset_at": 1715700060.0,
"usage": 55,
"utilization": 0.917
}
}
}
}
}
{
"can_proceed": true,
"ok": true,
"state": {
"providers": {
"openai": {
"rpm": {
"limit": 60,
"reset_at": 1715700060.0,
"usage": 55,
"utilization": 0.917
}
}
}
},
"wait_seconds": 0
}
Extract rate limit state from standard HTTP response headers
{
"action": "track",
"headers": {
"x-ratelimit-limit-requests": "50",
"x-ratelimit-remaining-requests": "38",
"x-ratelimit-reset-requests": "2024-05-14T12:01:00Z"
},
"provider": "anthropic"
}
{
"ok": true,
"state": {
"providers": {
"anthropic": {
"requests": {
"limit": 50,
"reset_at": 1715688060.0,
"usage": 12,
"utilization": 0.24
}
}
}
}
}
Compute backoff delay after receiving a 429 response, attempt 3
{
"action": "backoff",
"attempt": 3,
"provider": "openai",
"retry_after": 10,
"strategy": "jitter"
}
{
"backoff_seconds": 10.0,
"note": "Retry-After header takes priority over calculated backoff",
"ok": true,
"strategy_used": "retry_after"
}
Simulate whether a batch of 10 requests fits within token bucket constraints
{
"action": "simulate",
"bucket_capacity": 100,
"refill_rate": 2.0,
"requests": [
{
"timestamp": 0.0,
"tokens": 20
},
{
"timestamp": 1.0,
"tokens": 20
},
{
"timestamp": 2.0,
"tokens": 20
},
{
"timestamp": 3.0,
"tokens": 20
},
{
"timestamp": 4.0,
"tokens": 20
}
]
}
{
"ok": true,
"simulation": {
"accepted": 5,
"rejected": 0,
"timeline": [
{
"accepted": true,
"bucket_after": 80.0,
"timestamp": 0.0,
"tokens": 20
}
],
"total": 5
}
}
Get a summary of all tracked providers with utilization and estimated exhaustion time
{
"action": "report",
"state": {
"providers": {
"anthropic": {
"rpm": {
"limit": 50,
"reset_at": 1715700060.0,
"usage": 5,
"utilization": 0.1
}
},
"openai": {
"rpm": {
"limit": 60,
"reset_at": 1715700060.0,
"usage": 45,
"utilization": 0.75
}
}
}
}
}
{
"ok": true,
"report": {
"anthropic": {
"rpm": {
"limit": 50,
"status": "ok",
"usage": 5,
"utilization": 0.1
}
},
"openai": {
"rpm": {
"limit": 60,
"status": "warning",
"usage": 45,
"utilization": 0.75
}
}
}
}
Returns structured error when unknown action is given
{
"action": "unknown_action"
}
{
"error": {
"code": "INVALID_ACTION",
"message": "Unknown action \u0027unknown_action\u0027. Valid actions: track, check, backoff, simulate, report"
},
"ok": false
}
When usage is at 100%, check returns wait time until window reset
{
"action": "check",
"limit_type": "rpm",
"provider": "google",
"state": {
"providers": {
"google": {
"rpm": {
"limit": 30,
"reset_at": 1715700120.0,
"usage": 30,
"utilization": 1.0
}
}
}
}
}
{
"can_proceed": false,
"ok": true,
"wait_seconds": 60.0
}
All examples are also available via the agent API:
/v1/agent/skills/b6e3a261-8573-445c-8a6f-900a40a4bfc8/schema
No reviews yet. Be the first to leave one!