claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
Tracks quotas, monitors thresholds, and degrades gracefully for rate-limited APIs. Use when integrating external services that impose rate or cost limits.
$ npx -y skills add athola/claude-night-market --skill quota-management --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/quota-managementContext preview
The summary Claude sees to decide when to auto-load this skill.
Tracks quotas, monitors thresholds, and degrades gracefully for rate-limited APIs. Use when integrating external services that impose rate or cost limits.
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: - quota - rate-limiting - resource-management - cost-tracking - thresholds dependencies: [] tools: [] provides: infrastructure: - quota-tracking - threshold-monitoring - usage-estimation patterns: - graceful-degradation - quota-enforcement - cost-optimization usage_patterns: - service-integration - rate-limit-management - cost-tracking - resource-monitoring complexity: intermediate model_hint: standard estimated_tokens: 500 progressive_loading: true modules: - modules/threshold-strategies.md - modules/estimation-patterns.md
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 = 1000000from leyline.quota_tracker import QuotaTracker
tracker = QuotaTracker(service="my-service")
status, warnings = tracker.get_quota_status()
if status == "CRITICAL":
# Defer or use secondary service
passtracker.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: 1. Initialize tracker for your service 2. Check quota before operations 3. Record usage after operations 4. Handle threshold warnings gracefully
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use night-market-change-control.
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily commands; use night-market-operations.
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook.
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use night-market-validation-and-qa.