Persistent Localhost

Manage persistent dev servers, APIs, and other local processes on a port using macOS LaunchAgents. Use when starting, stopping, restarting, inspecting, or troubleshooting local servers that should survive shell exit and restart after crashes.

4,336 stars 628 forksOther

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add davidondrej/skills --skill persistent-localhost
Manual install
git clone --depth 1 https://github.com/davidondrej/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/persistent-localhost ~/.claude/skills/persistent-localhost

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Persistent localhost servers (macOS launchd)

One script does everything. Resolve `scripts/persistent-localhost.sh` relative to this `SKILL.md`, never from the current directory.

## Workflow

1. Check what already exists:

```bash
scripts/persistent-localhost.sh list
```

2. Start the server. `--name` is the handle. `--port` enables readiness checks and duplicate handling. `--dir` defaults to the current directory.

```bash
scripts/persistent-localhost.sh start --name myproj --port 5111 --cmd "./bin/serve"
```

The command returns only after the port is listening, or fails with the last 20 log lines. Report the printed `URL=` to the user.

3. Inspect, restart, read logs, stop:

```bash
scripts/persistent-localhost.sh status myproj
scripts/persistent-localhost.sh restart myproj   # after editing code that has no reloader
scripts/persistent-localhost.sh logs myproj 100
scripts/persistent-localhost.sh stop myproj
```

## Hot reload

Prefer the framework's own reloader in `--cmd` (`flask run --debug`, `vite`, `uvicorn --reload`, `node --watch`). If the server has none, add `--watch`. It wraps the command in `watchexec -r` on the working directory. Never use both. Requires `brew install watchexec`.

## Rules the script enforces

- Runs as `com.persistent-localhost.<name>` in the user `gui` domain via `launchctl bootstrap`. Restart uses `kickstart -kp`, stop uses `bootout`. No deprecated `load`, `start`, `stop`, no broad `pkill`.
Read the full skill on GitHub

Details

Skill name
persistent-localhost
Path
skills/persistent-localhost/SKILL.md
License
MIT
Repo updated
17 November 2026

FAQ

What does the Persistent Localhost skill do?

Manage persistent dev servers, APIs, and other local processes on a port using macOS LaunchAgents. Use when starting, stopping, restarting, inspecting, or troubleshooting local servers that should survive shell exit and restart after crashes.

How do I install the Persistent Localhost skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add davidondrej/skills --skill persistent-localhost. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Persistent Localhost popular?

It lives in davidondrej/skills, which has 4,336 GitHub stars and 628 forks.

Related skills

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.