Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ir:test-mac

БесплатноЗапускает вложенные скриптыНе проверен

Build and run a dev irrlicht daemon and/or macOS Swift app for local testing, by invoking this skill's own test-mac.sh. Two independent axes: MODE (replace…

ingo-eichhorstот ingo-eichhorst★ 105 звёзд на GitHub

Об этом скилле

Build & Run the macOS Dev Stack

The procedure is a script. Run it — do not reimplement it inline.

cd "$(git rev-parse --show-toplevel)"                      # the paths below are repo-root-relative
.claude/skills/ir:test-mac/test-mac.sh [MODE] [TARGET]     # defaults: replace full
.claude/skills/ir:test-mac/test-mac.sh --help              # the full contract

Both arguments are optional and may be given in either order. This file says which arguments to pass and what they cost; test-mac.sh is the only place the steps themselves live, and restore-prod.sh beside it is the teardown half of the same workflow.

Why a script and not fenced blocks to copy out (#1855): every step branches on MODE/TARGET/PORT/DEV_HOME/SOCK, and each fenced block an agent copies out runs in a fresh shell. A value dropped between blocks failed silently — an empty $PORT made the daemon bind 127.0.0.1: (invalid), an empty $SOCK turned the socket cleanup into a no-op that reported nothing. One script is one variable scope, and that whole class is gone.

Picking the arguments

Default to replace full — don't ask. Change an axis only when the user actually asked for it.

  • MODE=separate only on an explicit request: /ir:test-mac separate, "alongside production", "don't touch production".
  • TARGET=daemon/macos only when the user asked to restart one component: "just restart the daemon", "rebuild the mac app only".

MODE

  • replace (default) — take over from production. Kills the running production app + daemon (and any dev instance), then runs the freshly built dev binaries on the production port 7837 with the production state dir (no IRRLICHT_HOME override). Because it is on 7837 it receives the statusline quota feed and sees the same on-disk sessions/cost data — it behaves like production but runs your dev code. There is one instance afterward, and the Swift app is installed directly into /Applications/Irrlicht.app rather than a separate bundle, since a human only ever looks at one running app. Destructive — see Tearing down.
  • separate — a dev instance that coexists with production. The dev daemon binds port 7838 and stores its state under a worktree-local IRRLICHT_HOME; the dev app is assembled at /tmp/IrrlichtDev.app and connects to 7838 via IRRLICHT_DAEMON_PORT. Production stays up untouched on
    1. Since #1449 a grant-all daemon refuses to install the Claude Code hooks and statusline into the shared ~/.claude/settings.json (see Notes), so the dev daemon receives neither feed and production's entries keep pointing at

TARGET

  • full (default) — rebuild and restart both the daemon and the app.
  • daemon — rebuild + restart just irrlichd; skip the Swift build/install/relaunch entirely and leave whatever app is currently running to reconnect to the fresh daemon.
  • macos — rebuild + relaunch just the Swift app, pointed at whatever daemon is already up (adopts it — the same adoption behaviour full relies on). Requires a daemon to already be reachable on the target port; it does not start one.

The axes compose: replace daemon tests a Go-only change against the currently-open production-replacing app; separate macos iterates on Swift UI against an already-running isolated dev daemon.

Tearing down (replace mode) — REQUIRED to get production back

Quitting the app is not enough, for two independent reasons:

  • The daemon: in replace mode the app only adopted the daemon the script started (it never owns the process — DaemonManager.start() returns early on a reachable daemon without recording it, so its terminateProcess() is a no-op), and that daemon was nohup'd, so it keeps running on 7837 after the app exits. A relaunched production app would find it reachable and adopt it — you would be running the production UI against the dev --record daemon without realising it.
  • The app itself (after a TARGET=macos/full run): its executable + Sparkle.framework inside /Applications/Irrlicht.app were overwritten with the dev build, so relaunching that bundle launches the dev binary.
"$(git rev-parse --show-toplevel)/.claude/skills/ir:test-mac/restore-prod.sh"

It does the whole sequence: kill the app + daemon → restore the backed-up production bundle if a dev overwrite ever happened → gate on 7837 actually freeing → launch /Applications/Irrlicht.app → confirm production's own daemon comes up. Running the DMG/PKG installer is not a substitute: it replaces the app bundle but leaves the dev daemon on 7837, which the freshly installed app would still adopt.

What the script refuses to do

These gates are load-bearing and each one's failure mode is silence rather than an error. tools/lib/test-mac-script_test.sh drives the script against stubs and asserts every one of them; `too

Полный SKILL.md на GitHub

Установить ir:test-mac в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

restore-prod.shtest-mac.sh

FAQ

Что делает скилл ir:test-mac?

Build and run a dev irrlicht daemon and/or macOS Swift app for local testing, by invoking this skill's own test-mac.sh. Two independent axes: MODE (replace, default — takes over production on port 7837/production state; separate — coexists on port 7838/isolated state) and TARGET (full, default — daemon + app; daemon — just rebuild+restart irrlichd, leave the running app to reconnect; macos — just rebuild+relaunch the Swift app against whatever daemon is already up). Use when the user says "test mac", "restart mac", "rebuild mac", "restart just the daemon", "rebuild the mac app only", or "/ir:test-mac".

Как установить скилл ir:test-mac?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ir:test-mac запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить ir:test-mac с