Agent skill

Restart Servers

by jonathanhawkins in jonathanhawkins/microduck-lab

Restart the microduck dev stack — the duck-lab backend (farm, :8788) and the duck-viewer dev server (:63317).

Apache-2.0Auto-check passed

Install Restart Servers

skills CLI
$ npx skills add jonathanhawkins/microduck-lab --skill restart-servers -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jonathanhawkins/microduck-lab restart-servers --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jonathanhawkins/microduck-lab.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/restart-servers .claude/skills/restart-servers && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
restart-servers
GitHub stars
132
Token cost
~1.1k tokens
SKILL.md length
555 words
Files
4
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

Restart the microduck dev stack — the duck-lab backend (farm, :8788) and the duck-viewer dev server (:63317).

  • Works in 4 steps: WARNING — training dies with the farm. A… → Run the script (stops the lab, restarts… → The script now starts the viewer too,… → …
  • The viewer shows offline
  • Runs Shell scripts from its folder; calls bash, curl and uv
  • After editing vizserver/behaviors (the farm holds stale code)

What it does

Restart Servers is an agent skill from jonathanhawkins/microduck-lab. Restart the microduck dev stack — the duck-lab backend (farm, :8788) and the duck-viewer dev server (:63317). Use when the viewer shows "offline", after editing vizserver/behaviors (the farm holds stale code), or whenever the user asks to restart the dev/backend servers.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `restart.sh`, `teach.sh` and `viewer.sh`).

The repository describes itself as: Train RL policies for the Pollen Microduck 🦆 on an ordinary Mac, no CUDA GPU, and watch them learn live in the browser. The licence is Apache-2.0.

When your agent uses it

  • The viewer shows offline
  • After editing vizserver/behaviors (the farm holds stale code)
  • Whenever the user asks to restart the dev/backend servers

Example prompts

  • “offline”
  • “/restart-servers”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. WARNING — training dies with the farm. A farm restart kills any live
  2. Run the script (stops the lab, restarts it cwd-proof and
  3. The script now starts the viewer too, detached, by calling viewer.sh.
  4. Confirm frames flow: one WS read from ws://127.0.0.1:8788/ws should return

What it can do on your machine

Read from SKILL.md and the folder at commit bbf0326. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • bash
    • curl
    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl and uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Restart Servers loads about 1.1k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 555 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jonathanhawkins/microduck-lab at commit bbf0326, republished under its Apache-2.0 licence (© jonathanhawkins). 555 words, ~1,089 tokens.

Download SKILL.mdSave it as .claude/skills/restart-servers/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
restart-servers
description
Restart the microduck dev stack — the duck-lab backend (farm, :8788) and the duck-viewer dev server (:63317). Use when the viewer shows "offline", after editing viz_server/behaviors (the farm holds stale code), or whenever the user asks to restart the dev/backend servers.

Restart both microduck servers, in this order:

  1. WARNING — training dies with the farm. A farm restart kills any live teach job. Its checkpoint survives; resume after with POST /teach {"text": ..., "initFrom": "<run>"}. The script refuses on its own when a trainer is up — a train_behavior (duck) or a microduck_local.train (G1 task) python process, or the lab's own GET /teach/status saying "running": true — but check first anyway, as a separate command, never combined with the restart:

    curl -s -m 2 http://127.0.0.1:8788/teach/status

    Only MICRODUCK_RESTART_FORCE=1 overrides the refusal.

  2. Run the script (stops the lab, restarts it cwd-proof and entry-point-rename-proof, verifies :8788 health, then bounces the viewer):

    bash .claude/skills/restart-servers/restart.sh

    After a lab-only code change (viz_server, behaviors, world, brain…) leave the viewer dev server alone — it hot-reloads on its own:

    bash .claude/skills/restart-servers/restart.sh --backend-only

    Pass --fresh plus .onnx paths to reseed the duck roster; with no args the saved roster (lab-state.json) is kept.

    Only the process LISTENING on :8788 is stopped (lsof … -sTCP:LISTEN, TERM, then KILL by pid after 10 s). It used to pkill -f duck-lab, which matched every lab on the machine: on 2026-09-17 another session had a scratch lab on :8799 (--world pitch-3v3) that the old script would have killed along with the real one. A scratch lab on another port — with its own LAB_STATE_PATH=… so it never rewrites the real lab-state.json — survives a restart of :8788 now.

  3. The script now starts the viewer too, detached, by calling viewer.sh. Nothing more to do. To (re)start only the viewer:

    bash .claude/skills/restart-servers/viewer.sh          # no-op if already up
    bash .claude/skills/restart-servers/viewer.sh --force  # restart regardless

    Do NOT use preview_start for the viewer. The managed preview makes the dev server a child of the session's tool runtime, so it is reaped on a session or model switch — that killed it on 2026-09-02 and looked like a crash. viewer.sh reparents it to launchd (PPID 1), like the backend, so it survives. Open the viewer with navigate to a normal browser tab instead.

    Use localhost, not 127.0.0.1, for the viewer. Next 16 serves the HTML to either host but 403s its own /_next dev resources when the host is not in allowedDevOrigins, so 127.0.0.1:63317 renders a blank page with an empty <body> and console 403s — it looks like the app is broken when only the origin is wrong. http://localhost:63317/sim renders fine. (The backend is the opposite: curl it at 127.0.0.1:8788, and note / is a 404 there because it has no root route — use /joints for a health check.)

  4. Confirm frames flow: one WS read from ws://127.0.0.1:8788/ws should return a frame with a non-empty ducks list. Tell the user to refresh the page.

Show full SKILL.md (142 more words)Show less

Logs: backend microduck_local/lab-server.log, viewer duck-viewer/viewer-server.log (both gitignored).

Known gotchas these scripts already handle: the shell cwd resets to the parent repo (breaks bare uv run); the backend entry point was renamed (duck-farm → duck-lab) and may churn again; a stale Next lock file can block viewer spawns (viewer.sh kills the port holder with lsof first); a managed preview would not survive a session restart (hence the detached launch). And — since 2026-09-10 — each server starts in its own session (detach in both scripts: Python's start_new_session, because macOS has no setsid). nohup … & alone left the server in the tool call's process group, and when the Claude harness reaped a tool call it had backgrounded, the lab went down with it hours after "backend UP". The sim-smoke bring-up delegates every launch here for that reason; from an agent shell, never start these servers any other way.

© jonathanhawkins, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in .claude/skills/restart-servers of jonathanhawkins/microduck-lab.

  • SKILL.md
  • restart.sh
  • teach.sh
  • viewer.sh

Open the folder on GitHubat commit bbf0326

Compare with similar skills

Restart Servers next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Restart Servers compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Restart Servers this skilljonathanhawkins/microduck-lab132—~1.1kAutomated safety check: PassApache-2.0
Labhashgraph-online/awesome-codex-plugins1.3k—~2.9kAutomated safety check: PassApache-2.0
Farm Ready Gatefarm-fe/farm5.6k—~875Automated safety check: PassMIT
Ginkgo Cloud LabK-Dense-AI/scientific-agent-skills48k1 repos~2.8kAutomated safety check: PassMIT
Superpowers Labsickn33/agentic-awesome-skills47k1 repos~245Automated safety check: PassMIT
Bambu Lab Print Handoffearthtojake/text-to-cad19k—~861Automated safety check: PassMIT

Similar skills

  • Lab

    hashgraph-online/awesome-codex-plugins

    Build a Game Lab for one mechanic of a studio's game (the jump, a hit, a dash, a drift, a landing) and iterate on how it FEELS with the creator, side by side.

    1.3k GitHub stars~2.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Farm Ready Gate

    farm-fe/farm

    Run Farm verification with build-first constraints. An agent skill from farm-fe/farm.

    5.6k GitHub stars~875 tokensUpdated 19 days ago
    DevelopmentAuto-check passed
  • Ginkgo Cloud Lab

    K-Dense-AI/scientific-agent-skills

    Guides protocol selection, input preparation, pricing checks, and browser ordering on Ginkgo Bioworks Cloud Lab (cloud.ginkgo.bio).

    48k GitHub starsUsed in 1 repo~2.8k tokens
    Game DevelopmentAuto-check passed
  • Superpowers Lab

    sickn33/agentic-awesome-skills

    Lab environment for Claude superpowers

    47k GitHub starsUsed in 1 repo~245 tokens
    Auto-check passed
  • Bambu Lab Print Handoff

    earthtojake/text-to-cad

    Opens a sliced file in Bambu Connect, or an unsliced model in Bambu Studio, so you can pick a Bambu Lab printer and start the print yourself.

    19k GitHub stars~861 tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • Mesh Lab

    permissionlesstech/bitchat-android

    Run, diagnose, and extend bitchat Android Mesh Lab physical-device tests.

    7.8k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check passed

More from jonathanhawkins/microduck-lab

  • Record World

    jonathanhawkins/microduck-lab

    Record a /sim WORLD scenario — the living room, the playroom tidy loop, a soccer pitch, any scenario JSON — to an mp4, a captioned contact sheet and an events log, headless and under a seed, then…

    132 GitHub stars~1.2k tokensUpdated 9 days ago
    Auto-check passed
  • Render Rollout

    jonathanhawkins/microduck-lab

    Render a microduck policy rollout to video AND to a frame contact sheet with per-frame diagnostics burned in, then READ the sheet to see what the policy actually does.

    132 GitHub stars~3.2k tokensUpdated 9 days ago
    Auto-check passed
  • Tidy Trace

    jonathanhawkins/microduck-lab

    Debug the playroom tidy loop (Track 12) — trace one run state by state, see every release, landing and fall with context, and re-measure the walker facts the brain's constants rest on.

    132 GitHub stars~1.1k tokensUpdated 9 days ago
    Auto-check passed
  • Train Loop

    jonathanhawkins/microduck-lab

    Run the CLOSED training loop on a MOSS/duck policy without a human having to ask "is it done yet": launch through the lab, block until the run finishes, print the standard report and the per-term…

    132 GitHub stars~947 tokensUpdated 9 days ago
    Auto-check passed
  • Sim Smoke

    jonathanhawkins/microduck-lab

    Look at the /sim world page the way a user would — bring up the lab in world mode and the viewer, open the page in headless Chromium, press keys, screenshot it, and READ the screenshot and console.

    132 GitHub stars~1.2k tokensUpdated 9 days ago
    Auto-check passed
  • Watch Training

    jonathanhawkins/microduck-lab

    Look at what the ACTIVE teach run is practicing right now: renders the live checkpoint under the trainer's own env knobs (actuator, spawn mix, reward gates — read from the live trainer process) and…

    132 GitHub stars~525 tokensUpdated 9 days ago
    Auto-check passed

Questions about Restart Servers

What does Restart Servers do?

Restart the microduck dev stack — the duck-lab backend (farm, :8788) and the duck-viewer dev server (:63317). Restart Servers is an agent skill from jonathanhawkins/microduck-lab. Restart the microduck dev stack — the duck-lab backend (farm, :8788) and the duck-viewer dev server (:63317).

When should I use Restart Servers?

Restart Servers fits situations like: the viewer shows offline; after editing vizserver/behaviors (the farm holds stale code); whenever the user asks to restart the dev/backend servers.

How do I install Restart Servers in Claude Code?

Run `npx skills add jonathanhawkins/microduck-lab --skill restart-servers -a claude-code`. Or copy the skill folder (.claude/skills/restart-servers in jonathanhawkins/microduck-lab) into .claude/skills/restart-servers in your project. Claude Code loads it when a task matches its description.

How do I install Restart Servers in Codex?

Run `npx skills add jonathanhawkins/microduck-lab --skill restart-servers -a codex`. Or copy the skill folder (.claude/skills/restart-servers in jonathanhawkins/microduck-lab) into .agents/skills/restart-servers in your project. Codex loads it when a task matches its description.

Can I use Restart Servers in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jonathanhawkins/microduck-lab --skill restart-servers -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/restart-servers, .gemini/skills/restart-servers, .github/skills/restart-servers and .opencode/skills/restart-servers in your project.

What does Restart Servers need to run?

Going by SKILL.md and its folder, Restart Servers needs a shell for the scripts in its folder and the command-line tools its instructions call (bash, curl and uv). Our summary lists: Python 3; A Bash shell.

Does Restart Servers access the network?

SKILL.md contains no URLs. Its commands use curl and uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Restart Servers safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Restart Servers use?

Restart Servers is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Restart Servers use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Restart Servers?

Skills that share tags, products or a category with Restart Servers: Lab (hashgraph-online/awesome-codex-plugins, 1.3k stars), Farm Ready Gate (farm-fe/farm, 5.6k stars), Ginkgo Cloud Lab (K-Dense-AI/scientific-agent-skills, 48k stars) and Superpowers Lab (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Restart Servers?

jonathanhawkins (a GitHub user) maintains it in jonathanhawkins/microduck-lab, which has 132 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 1, 2026.

Source: jonathanhawkins/microduck-lab on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.