Borrowing it
Nothing to install: this file belongs to kossakovsky/selfhost-ai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/kossakovsky/selfhost-ai/main/.claude/commands/add-new-service.mdgit clone --depth 1 https://github.com/kossakovsky/selfhost-aiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/kossakovsky/selfhost-ai/add-new-service)<a href="https://agentmods.dev/commands/kossakovsky/selfhost-ai/add-new-service"><img src="https://agentmods.dev/badge/commands/kossakovsky/selfhost-ai/add-new-service.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.05330 |
| Opus 5 | $0.00000 | $0.02665 |
| Sonnet 5 | $0.00000 | $0.01066 |
| Haiku 4.5 | $0.00000 | $0.00533 |
Grade A, and why
add-new-service scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
test: ["CMD-SHELL", "wget -qO- http://localhost:<PORT>/health || exit 1"] How it starts
The opening of the file, as written. The whole thing — 755 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add New Service: $ARGUMENTS
Add a new optional service called $ARGUMENTS to the Selfhost AI project.
Naming Conventions
Derive these from $ARGUMENTS:
SERVICE_SLUG= lowercase with hyphens, e.g.,my-serviceSERVICE_SLUG_UNDERSCORE= lowercase with underscores, e.g.,my_serviceSERVICE_NAME_UPPER= UPPERCASE with underscores, e.g.,MY_SERVICESERVICE_NAME_TITLE= Title Case, e.g.,MyService
STEP 1: docker-compose.yml
File: docker-compose.yml
1.1 Basic Service Definition
Add service block in services: section (maintain alphabetical order):
$ARGUMENTS:
image: <org>/<image>:<tag>
container_name: $ARGUMENTS
profiles: ["$ARGUMENTS"]
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
environment:
# Service-specific env vars
SOME_VAR: "${SOME_VAR:-default}"
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:<PORT>/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
# volumes:
# - ${SERVICE_SLUG_UNDERSCORE}_data:/data
1.2 Caddy Environment Passthrough
Add to caddy service environment: section (if externally accessible):
caddy:
environment:
# ... existing vars ...
${SERVICE_NAME_UPPER}_HOSTNAME: "${${SERVICE_NAME_UPPER}_HOSTNAME}"
# If using basic auth:
${SERVICE_NAME_UPPER}_USERNAME: "${${SERVICE_NAME_UPPER}_USERNAME}"
${SERVICE_NAME_UPPER}_PASSWORD_HASH: "${${SERVICE_NAME_UPPER}_PASSWORD_HASH}"
1.3 Named Volume (if persistent storage needed)
Add to top-level volumes: section:
volumes:
# ... existing ...
${SERVICE_SLUG_UNDERSCORE}_data:
1.4 Service Dependencies
If service requires database/cache, add depends_on:
$ARGUMENTS:
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
Common dependencies:
postgres- PostgreSQL databaseredis- Redis cache/queueollama- Local LLM inferenceminio- S3-compatible object storageclickhouse- Analytics database (for Langfuse)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 755 lines · 0 tokens per session scan A e9d2df3feba2
add-new-service is a command published in the GitHub repository kossakovsky/selfhost-ai (925 stars, last pushed 5d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 5,330 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
triage
Triage Linear issue with comprehensive analysis.
fr-isolation
Run work in an isolated workspace: git worktree + devcontainer, driven through the fr isolation CLI (exec-bridge). Use when feature work must not touch the base repo, when fr-brainstorming or fr-goal needs a workspace, when the operator says "isolate this" / "run it in the container", or to clean up after a merged PR.…
fix
System prompt for /fix slash command.
plan
System prompt for /plan slash command.
status
System prompt for /status slash command.
gen-infra
Generate Infrastructure as Code: Docker Compose, Kubernetes manifests, K3s manifests, Terraform configs, or Helm charts. Usage: /gen-infra [docker|k8s|k3s|terraform|helm] [--env=production].