Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
athola avatar

Service Registry

  • 109 installs
  • 325 repo stars
  • Updated August 2, 2026
  • athola/claude-night-market

Service Registry is an agent skill that defines safe command-building and subprocess execution for multi-service agent registries.

About

Service Registry execution patterns document how solo builders and small teams orchestrate multiple AI coding CLIs from a single registry: expand command templates with prompts and file arguments, execute through subprocess with shlex splitting, enforce timeouts, and return structured ExecutionResult objects including token estimates. The skill targets agent-marketplace or multi-model workflows where you cannot hardcode one vendor command. It complements registry metadata (service configs, default models) with safe shell discipline so a runaway or malicious template does not block your pipeline. After adoption, agents can invoke the right backend per task while you retain observability on duration and output size—critical before you automate deploy reviews or batch refactors across repos.

  • build_command expands ServiceConfig templates with @file prompts and default models
  • execute_safely runs shlex-split subprocess with timeout and stdout/stderr capture
  • ExecutionResult bundles success, exit code, duration, and estimated tokens
  • TimeoutExpired returns structured failure instead of hanging agents
  • Retry patterns section for resilient multi-service execution (advanced)

Service Registry by the numbers

  • 109 all-time installs (skills.sh)
  • Ranked #4,092 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/athola/claude-night-market --skill service-registry

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs109
repo stars325
Security audit2 / 3 scanners passed
Last updatedAugust 2, 2026
Repositoryathola/claude-night-market

What it does

Run registered AI coding services safely from templates with timeouts, captured output, and retry logic.

Who is it for?

Best when you're running a custom agent registry or night-market style router across Claude, Codex, or other CLIs with Python glue.

Skip if: Single-tool Cursor-only workflows with no programmatic multi-service dispatch, or teams forbidden from subprocess execution on developer machines.

When should I use this skill?

Implementing or extending a service registry that launches external AI CLIs from Python templates.

What you get

Commands are built from typed configs, executed with timeouts and captured I/O, and summarized as ExecutionResult for downstream retry or routing logic.

  • build_command and execute_safely helpers
  • ExecutionResult records for agent routing and retries

By the numbers

  • estimated_tokens: 400 in skill frontmatter

Files

SKILL.mdMarkdownGitHub ↗

Table of Contents

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

Auto-Selection

# 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

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

# 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.

Related skills

How it compares

Skill package for registry execution semantics—not an MCP server catalog entry or a hosted CI runner product.

FAQ

Who is service-registry for?

Developers and tiny teams building multi-model agent runners who need consistent, safe shell execution around registered services.

When should I use service-registry?

In Build while wiring agent-tooling registries, in Ship when automating review or test commands across services, and in Operate when retrying failed agent jobs with bounded timeouts.

Is service-registry safe to install?

The patterns execute shell commands you configure—treat templates as trusted code and review the Security Audits panel on this Prism page before enabling in production agents.

AI & Agent Buildingintegrationsbackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.