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;…
Registers external services with health checks, central config, and unified execution. Use when integrating multiple external services needing coordination.
Claude Code
$ npx -y skills add athola/claude-night-market --skill service-registry --agent claude-code
Codex
$ npx skills add athola/claude-night-market --skill service-registry -a codex -y
Cursor
$ npx skills add athola/claude-night-market --skill service-registry -a cursor -y
Gemini CLI
$ npx skills add athola/claude-night-market --skill service-registry -a gemini-cli -y
GitHub Copilot
$ npx skills add athola/claude-night-market --skill service-registry -a github-copilot -y
OpenCode
$ npx skills add athola/claude-night-market --skill service-registry -a opencode -y
Windsurf
$ npx skills add athola/claude-night-market --skill service-registry -a windsurf -y
name: service-registry description: Registers external services with health checks, central config, and unified execution. Use when integrating multiple external services needing coordination. alwaysApply: false category: infrastructure tags: - services - registry - execution - health-checks - integration dependencies: - quota-management - usage-logging tools: [] provides: infrastructure: - service-registry - health-monitoring - execution-engine patterns: - service-discovery - unified-execution - configuration-management usage_patterns: - multi-service-integration - service-health-checks - unified-execution - configuration-management complexity: intermediate estimated_tokens: 550 progressive_loading: true modules: - modules/service-config.md - modules/execution-patterns.md
A registry pattern for managing connections to external services. Handles configuration, health checking, and execution across multiple service integrations.
@dataclass
class ServiceConfig:
name: str
command: str
auth_method: str # "api_key", "oauth", "token"
auth_env_var: str
quota_limits: dict
models: list[str] = field(default_factory=list)**Verification:** Run the command with `--help` flag to verify availability.
@dataclass
class ExecutionResult:
success: bool
stdout: str
stderr: str
exit_code: int
duration: float
tokens_used: int**Verification:** Run the command with `--help` flag to verify availability.
# Sketch: implement ServiceRegistry and ServiceConfig in your plugin.
# leyline ships no service_registry module.
registry = ServiceRegistry()
registry.register(
"gemini",
ServiceConfig(
name="gemini",
command="gemini",
auth_method="api_key",
auth_env_var="GEMINI_API_KEY",
quota_limits={"rpm": 60, "daily": 1000},
),
)**Verification:** Run the command with `--help` flag to verify availability.
result = registry.execute(
service="gemini",
prompt="Analyze this code",
files=["src/main.py"],
model="gemini-3.8-flash",
)
if result.success:
print(result.stdout)**Verification:** Run the command with `--help` flag to verify availability.
# Check single service
status = registry.health_check("gemini")
# Check all services
all_status = registry.health_check_all()
for service, healthy in all_status.items():
print(f"{service}: {'OK' if healthy else 'FAILED'}")**Verification:** Run the command with `--help` flag to verify availability.
# Select best service for task
service = registry.select_service(
requirements={"large_context": True, "fast_response": False}
)**Verification:** Run the command with `--help` flag to verify availability.
def execute_with_failover(prompt: str, files: list) -> ExecutionResult:
for service in registry.get_healthy_services():
result = registry.execute(service, prompt, files)
if result.success:
return result
raise AllServicesFailedError()**Verification:** Run the command with `--help` flag to verify availability.
# In your skill's frontmatter dependencies: [leyline:service-registry]
**Verification:** Run the command with `--help` flag to verify availability.
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;…
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use…
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily…
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use…
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled…
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.