# Librc

> librc - Service lifecycle manager using svscan supervision. ServiceManager communicates with supervision daemon via Unix sockets. startServices and stopServices control multiple services. Use for starting/stopping platform services, process supervision, and service orchestration.

- Skill: `majiayu000/librc` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/librc`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/librc/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/librc

---


# librc Skill

## When to Use

- Starting and stopping Copilot-LD services
- Managing service lifecycle programmatically
- Communicating with the supervision daemon
- Orchestrating service startup order

## Key Concepts

**ServiceManager**: Connects to svscan daemon via Unix socket to control service
processes.

**Supervision**: Services run under svscan for automatic restart and logging.

## Usage Patterns

### Pattern 1: Manage single service

```javascript
import { ServiceManager } from "@copilot-ld/librc";

const manager = new ServiceManager("/var/run/svscan.sock");
await manager.start("agent");
await manager.status("agent"); // Returns running/stopped
await manager.stop("agent");
```

### Pattern 2: Manage multiple services

```javascript
import { startServices, stopServices } from "@copilot-ld/librc";

await startServices(["agent", "llm", "memory"]);
await stopServices(["agent", "llm", "memory"]);
```

## Integration

Used by `make rc-start` and `make rc-stop`. Works with libsupervision daemon.

