service-registry
Service registry patterns for managing external services, health checks, centralized configuration, and unified execution
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/athola/nm-leyline-service-registryNight Market Skill — ported from claude-night-market/leyline. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
Table of Contents
- Overview
- When to Use
- Core Concepts
- Service Configuration
- Execution Result
- Quick Start
- Register Services
- Execute via Service
- Health Checks
- Service Selection
- Auto-Selection
- Failover Pattern
- Integration Pattern
- Detailed Resources
- Exit Criteria
Service Registry
Overview
A registry pattern for managing connections to external services. Handles configuration, health checking, and execution across multiple service integrations.
When To Use
- Managing multiple external services.
- Need consistent execution interface.
- Want health monitoring across services.
- Building service failover logic.
When NOT To Use
- Single service integration without registry needs
Core Concepts
Service Configuration
@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.
Execution Result
@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.
Quick Start
Register Services
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.
Execute via Service
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.
Health Checks
# 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.
Service Selection
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-athola-nm-leyline-service-registry": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
extract
Analyze a codebase and build a knowledge base of business logic, architecture, data flow, and engineering patterns. The foundation for gauntlet challenges and agent integration
discourse
>- Scan community discussion channels (HN, Lobsters, Reddit, tech blogs) for experience reports and opinions on a topic
synthesize
>- Merge, deduplicate, rank, and format research findings from multiple channels into a coherent report. Use after research agents return their results
workflow-monitor
Detect workflow failures and inefficient patterns, then create GitHub issues for improvement via /fix-workflow
architecture-paradigm-hexagonal
Hexagonal (Ports and Adapters) architecture isolating domain logic from infrastructure