plugins/leyline/skills/quota-management/SKILL.md
Tracks quotas, monitors thresholds, and degrades gracefully for rate-limited APIs. Use when integrating external services that impose rate or cost limits.
npx skillsauth add athola/claude-night-market quota-managementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 estimationdata-ai
Models a business in its own language. Use when the domain has real business rules to capture.
research
Generate diverse solution candidates with category-spanning ideation methods and rotation. Use when stuck on a design or fighting repetitive LLM output.
development
Generates and self-executes a diff-derived test plan for a PR. Use when validating PR changes before merge. Do not use for code review; use sanctum:pr-review.
development
Ramps implementation ambition a notch only after the prior increment is understood. Use when building a feature you must understand, not just ship.