🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Nm Leyline Service Registry

by @athola

Service registry patterns for managing external services, health checks, centralized configuration, and unified execution

⚑ When to Use
TriggerAction
- Need consistent execution interface.
- Want health monitoring across services.
- Building service failover logic.
πŸ’‘ Examples

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.

πŸ“‹ Tips & Best Practices

Common Issues

Command not found Ensure all dependencies are installed and in PATH

Permission errors Check file permissions and run with appropriate privileges

Unexpected behavior Enable verbose logging with --verbose flag

View on ClawHub
TERMINAL
clawhub install nm-leyline-service-registry

πŸ§ͺ Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

πŸ” Can't find the right skill?

Search 60,000+ AI agent skills β€” free, no login needed.

Search Skills β†’