用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill calendly-api-1-rate-limiting命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
Write outbound email and external messages in Vamsee Achanta's voice — a subtle offer to help, never bold or rash claims. Load before drafting ANY email, LinkedIn/Collide reply, proposal note, or outreach sent under his name.
Save/publish analysis or computation results from ANY ecosystem repo to Hugging Face as a queryable, viewer-renderable dataset. Use when the user wants to "save results to hugging face", "publish dataset to HF", "hugging face data saving", "save analysis results", "hf dataset", "make results queryable", or "render via datasets-server API". Reshapes nested results into flat parquet tables, writes a dataset card with a viewer `configs:` block and provenance, applies license/public-vs-private routing, enforces a domain data-quality gate (faithful-to-source != correct), publishes to `aceengineer/<repo>-<projection>`, and verifies via the datasets-server API.
Clone, create, fork, configure, and manage GitHub repositories. Manage remotes, secrets, releases, and workflows. Works with gh CLI or falls back to git + GitHub REST API via curl.
| name | calendly-api-1-rate-limiting |
| description | Sub-skill of calendly-api: 1. Rate Limiting (+3). |
| version | 1.0.0 |
| category | business |
| type | reference |
| scripts_exempt | true |
# Rate limit handling
import time
from functools import wraps
def rate_limit_handler(max_retries=3, base_delay=1):
"""Decorator for handling Calendly rate limits"""
def decorator(func):
@wraps(func)
def wrapper(*args, **kwargs):
for attempt in range(max_retries):
try:
return func(*args, **kwargs)
except Exception as e:
if "429" in str(e):
delay = base_delay * (2 ** attempt)
print(f"Rate limited, waiting {delay}s...")
time.sleep(delay)
else:
raise
raise Exception("Max retries exceeded")
return wrapper
return decorator
# Secure token management
import os
from functools import lru_cache
@lru_cache()
def get_calendly_client():
"""Get cached Calendly client with secure token"""
token = os.environ.get("CALENDLY_API_KEY")
if not token:
raise ValueError("CALENDLY_API_KEY not set")
return CalendlyClient(api_key=token)
# Never log tokens
def redact_token(text: str) -> str:
token = os.environ.get("CALENDLY_API_KEY", "")
if token and token in text:
return text.replace(token, "[REDACTED]")
return text
# Webhook signature verification
def verify_and_process_webhook(request):
"""Verify webhook signature before processing"""
signature = request.headers.get("Calendly-Webhook-Signature")
if not signature:
return {"error": "Missing signature"}, 401
signing_key = os.environ.get("CALENDLY_WEBHOOK_SECRET")
if not verify_webhook_signature(request.data, signature, signing_key):
return {"error": "Invalid signature"}, 401
# Process webhook
return process_webhook(request.json)
# Comprehensive error handling
class CalendlyError(Exception):
"""Base Calendly API error"""
pass
class RateLimitError(CalendlyError):
"""Rate limit exceeded"""
def __init__(self, retry_after: int):
self.retry_after = retry_after
super().__init__(f"Rate limited. Retry after {retry_after}s")
class NotFoundError(CalendlyError):
"""Resource not found"""
pass
def handle_api_error(response):
"""Handle API error responses"""
if response.status_code == 429:
retry_after = int(response.headers.get("Retry-After", 60))
raise RateLimitError(retry_after)
elif response.status_code == 404:
raise NotFoundError(response.json().get("message"))
else:
response.raise_for_status()