Pwragent dev restart

From pwrdrvr/PwrAgent · View interactive version

Pwragent dev restart is an AI agent skill from the GitHub repository pwrdrvr/PwrAgent. Safely restart the local PwrAgent Electron development app after pulling, rebasing, or merging changes. Use when Codex is running inside or alongside the PwrAgent dev app and a normal restart could kill the current session before `pnpm dev` is relaunched.

How to use this skill

Skill file

PwrAgent Dev Restart

Use this skill when the running Electron app must be stopped and restarted from a freshly updated checkout, especially after merging a PR.

Run the commands below from the checkout you want to restart. The script derives

its default root from its own location, so it targets the checkout it ships in,

including a git worktree.

Workflow

  1. Confirm the target checkout is updated and clean enough to run:

```bash

git status --short --branch

```

```bash

git log -1 --oneline --decorate

```

  1. Dry-run the restart to see which processes would be stopped:

```bash

.agents/skills/pwragent-dev-restart/scripts/restart-pwragent-dev.zsh schedule --delay 30 --dry-run

```

  1. Schedule the restart and answer the user before the delay expires:

```bash

.agents/skills/pwragent-dev-restart/scripts/restart-pwragent-dev.zsh schedule --delay 30

```

  1. After the delay, verify the app came back:

```bash

tail -120 .local/pwragent-dev-restart.log

```

```bash

pgrep -fl "$PWD|PwrAgent|pnpm.*dev|electron-vite"

```

Script Notes

payloads mention the checkout path but are not part of the PwrAgent dev

process tree.

starts the restart is usually a grandparent or higher, and its command line

can contain the checkout path. schedule passes that protected pid set to the

detached restart-now child, which is reparented and cannot discover it.

.agents/skills/pwragent-dev-restart/scripts/restart-pwragent-dev.zsh. Pass

--root PATH to target a different checkout.

pnpm-workspace.yaml). The script stops processes whose command line matches

the root path, so it refuses a broad root that would match unrelated

processes.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.