executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
quota-managementTracks quotas, monitors thresholds, and degrades gracefully for rate-limited APIs. Use when integrating external services that impose rate or cost limits.
Independent GitHub snapshot · Automated classification · Original documentation governs
name: quota-management description: Tracks quotas, monitors thresholds, and degrades gracefully for rate-limited APIs. Use when integrating external services that impose rate or cost limits. alwaysApply: false category: infrastructure tags:
Tracks cumulative token budgets and enforces limits. For per-call logging, use usage-logging.
Patterns for tracking and enforcing resource quotas across rate-limited services. This skill provides the infrastructure that other plugins use for consistent quota handling.
Three-tier threshold system for proactive management:
| Level | Usage | Action |
|---|---|---|
| Healthy | <80% | Proceed normally |
| Warning | 80-95% | Alert, consider batching |
| Critical | >95% | Defer non-urgent, use secondary services |
@dataclass
class QuotaConfig:
requests_per_minute: int = 60
requests_per_day: int = 1000
tokens_per_minute: int = 100000
tokens_per_day: int = 1000000
from leyline.quota_tracker import QuotaTracker
tracker = QuotaTracker(service="my-service")
status, warnings = tracker.get_quota_status()
if status == "CRITICAL":
# Defer or use secondary service
pass
tracker.record_request(tokens=estimated_tokens, success=True, duration=elapsed_seconds)
can_proceed, issues = tracker.can_handle_task(estimated_tokens)
if not can_proceed:
print(f"Quota issues: {issues}")
Other plugins reference this skill:
# In your skill's frontmatter
dependencies: [leyline:quota-management]
Then use the shared patterns:
modules/threshold-strategies.md for degradation patternsmodules/estimation-patterns.md for token/cost estimation