run-services

A local development command that starts a project's frontend, backend, and documentation services after checking their dependencies.

In plain words
What is it for?
Use it to bring up all local services, check their health, choose available ports, and retry after fixing startup failures.
Why use it?
It removes the need to start each service manually and helps diagnose common problems such as missing packages, occupied ports, or old processes.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/reflexioai/reflexio/run-services
Any agent
npx skills add ReflexioAI/reflexio --skill run-services
Clone the repo
git clone --depth 1 https://github.com/ReflexioAI/reflexio

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,353 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00038 $0.02353
Opus 5 $0.00019 $0.01177
Sonnet 5 $0.00008 $0.00471
Haiku 4.5 $0.00004 $0.00235

Measured 2d ago against content hash 29f8e01c9311, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

run-services scanned grade C with 2 findings 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 2d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf reflexio/website/.next reflexio/public_docs/.next

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Check each service individually. Use `curl --max-time 10 -s -o /dev/null -w "%{http_code}"` to get HTTP status codes.
Origin

This is a copy

92% identical to run-services — 14 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/run-services/SKILL.md · 248 lines

How it starts

The opening of the file, as written. The whole thing — 248 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Run Services

Start all local development services with pre-flight dependency checks and automatic error recovery.

Overview

This command automates the full startup workflow: 0. Smart port selection — auto-detects free port group or reuses current worktree's ports

  1. Pre-flight dependency checks (uv sync, venv, npm, worktree editable packages)
  2. Stops any existing services (only if needed)
  3. Starts all services via run_services.sh
  4. Health-checks each service
  5. Diagnoses and fixes failures, then retries (up to 2 retries)

Port Configuration

Ports are allocated in groups of 3 with a +10 offset between groups:

Group Frontend Backend Docs
Default 8080 8061 8062
+10 8090 8091 8092
+20 8100 8101 8102
+30 8110 8111 8112
+40 8120 8121 8122
Service Env Var Base Port
Frontend (Next.js) FRONTEND_PORT 8080
Backend (FastAPI) BACKEND_PORT 8061
Docs (Fumadocs) DOCS_PORT 8062
Step 0 (Smart Port Selection) determines which group to use automatically, unless ports are already set via environment variables.

Execution Steps

Step 0: Smart Port Selection

Pre-check: If BACKEND_PORT, FRONTEND_PORT, or DOCS_PORT are already set in the environment, skip auto-detection entirely and use those values directly. Report "Using pre-configured ports" and proceed to Step 1.

0.1 Get current worktree root:

WORKTREE_ROOT=$(git rev-parse --show-toplevel)

0.2 For each port group (offset 0, 10, 20, 30, 40 — max 5 attempts), check all 3 ports in the group. For each port, determine its status:

PID=$(lsof -t -i:$PORT 2>/dev/null | head -1)

If no PID → port is free.

If PID exists, get the process's working directory:

PROC_CWD=$(lsof -a -p $PID -d cwd -Fn 2>/dev/null | tail -1 | sed 's/^n//')

Then classify:

  • own$PROC_CWD starts with $WORKTREE_ROOT (use prefix match, since child processes like Next.js run from subdirectories like $WORKTREE_ROOT/reflexio/website)
  • other$PROC_CWD does NOT start with $WORKTREE_ROOT

Read the full file on GitHub · 248 lines

Changes

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.

  1. 2d ago First seen · 248 lines · 38 tokens per session scan C 29f8e01c9311

Subscribe to this mod's changes

run-services is a skill published in the GitHub repository ReflexioAI/reflexio (338 stars, last pushed 2d ago), licensed Apache-2.0. It adds 38 tokens to every session and 2,353 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). It is 92% identical to run-services, differing in 14 lines, and is treated as a copy.

Related

Other skills, from other repositories

review

Rigorous code review of all uncommitted changes. Analyzes architecture, code quality, security, and engineering best practices. Embeds questions and assumptions inline, then summarizes all proposed changes as a plan for user approval before any edits are made.

ReflexioAI/claude-smart · 52 tokens

fastapi

FastAPI best practices and conventions. Use when working with FastAPI APIs and Pydantic models for them. Keeps FastAPI code clean and up to date with the latest features and patterns, updated with new versions. Write new code or refactor and update old code.

ReflexioAI/claude-smart · 57 tokens

commit

Git commit workflow with precommit hook handling, lint/type checking, README updates, and API reference updates. Use when the user wants to commit changes. Handles precommit hooks that modify files (formatting, linting) by re-staging and retrying. Runs ruff lint and pyright type checks on staged Python files, and…

ReflexioAI/claude-smart · 122 tokens

check-and-test

Run lint checks (ruff for Python, Biome for TS/JS), type checks (pyright for Python, tsc for TS/JS), and the standard pytest tiers (unit + e2e + tests skipped during pre-commit). Investigates failures to determine if they are application bugs or test issues, and fixes application bugs rather than weakening tests. Does…

ReflexioAI/claude-smart · 97 tokens

update-pr

Update an existing pull request with new changes. Use when the user wants to update a PR, push follow-up changes to a PR, refresh a PR description, or sync a PR with latest commits. Triggers on: update pr, update-pr, update the pr, push to pr, refresh pr, sync pr, update pull request.

ReflexioAI/claude-smart · 71 tokens

create-pr

Create high-quality pull requests via gh pr create. Use when the user wants to create a PR, submit a PR, open a pull request, submit for review, or push changes for review. Triggers on: create a pr, create-pr, submit a pr, open a pull request, submit for review, make a pr, gh pr create.

ReflexioAI/claude-smart · 74 tokens