plugins/leyline/skills/service-registry/SKILL.md
Registers external services with health checks, central config, and unified execution. Use when integrating multiple external services needing coordination.
npx skillsauth add athola/claude-night-market service-registryInstall 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.
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.
from leyline.service_registry import ServiceRegistry
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-2.5-pro"
)
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.
modules/service-config.md for configuration options.modules/execution-patterns.md for advanced usage.tools
Detect friction signals; graduate patterns into rules. Use for session retrospectives.
testing
Use when you need a diff-derived test plan for an MR — reads the diff, groups changes by area, runs targeted verifications, and proves revert-tests are genuine guards, not dead assertions.
development
Curate the web-capture index. Use when the capture backlog grows, captures sit unprocessed at seedling/pending, or to surface stored research during work.
testing
Probe memory/summary clarity via dual anchor questions: task progress, info gaps. Use when verifying session state or summary before handoff or compression.