Skip to content
Back to skills

Service Registry

ASecurity

Registers external services with health checks, central config, and unified execution. Use when integrating multiple external services needing coordination.

  • 342 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added December 19, 2025
devopspythongoapi

Works with

  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 20, 2026

npx -y skills add athola/claude-night-market --skill service-registry --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Service Registry?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Service Registry
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/athola-service-registry/badge)](https://www.skillsdirectory.com/skills/athola-service-registry)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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
model_hint: standard
estimated_tokens: 550
progressive_loading: true
modules:
- modules/service-config.md
- modules/execution-patterns.md
---

# 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

```python
@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

```python
@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
```python
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
```python
result = registry.execute(
    service="gemini",
    prompt="Analyze this code",
    files=["src/main.py"],
    model="gemini-3-pro",
)

if result.success:
    print(result.stdout)
```
**Verification:** Run the command with `--help` flag to verify availability.

### Health Checks
```python
# 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

### Auto-Selection
```python
# 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.

### Failover Pattern
```python
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.

## Integration Pattern

```yaml
# In your skill's frontmatter
dependencies: [leyline:service-registry]
```
**Verification:** Run the command with `--help` flag to verify availability.

## Detailed Resources

- **Service Config**: See `modules/service-config.md` for configuration options.
- **Execution Patterns**: See `modules/execution-patterns.md` for advanced usage.

## Exit Criteria

- Services registered with configuration.
- Health checks passing.
- Execution results properly handled.

Files in this skill

  • SKILL.md3.2 KB
  • modules/execution-patterns.md3.5 KB
  • modules/service-config.md2.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…