Skip to content
Back to skills

Pwragent Dev Restart

BSecurity

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.

  • 30 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 25, 2026
ai-agentsshellbashgit

Works with

  • cli

Security analysis

B75/100
  • criticalModifies startup scripts or system services for persistence

Pro shows the line behind each finding and how to fix it

Scanned November 25, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill pwragent-dev-restart --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pwragent Dev Restart?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pwragent Dev Restart
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-pwragent-dev-restart/badge)](https://www.skillsdirectory.com/skills/majiayu000-pwragent-dev-restart)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pwragent-dev-restart
description: 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.
---

# 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
   ```

2. 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
   ```

3. 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
   ```

4. 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

- The script stops processes matching the target checkout path and their bounded parent dev-server chain, then starts `pnpm dev:dev` from the checkout.
- The script discovers running processes by checkout path. It does not require a pidfile or a previous skill-started instance.
- It excludes helper and coding-agent CLI processes whose serialized command
  payloads mention the checkout path but are not part of the PwrAgent dev
  process tree.
- It also never signals its own ancestors. The shell or agent session that
  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.
- With `--detach-start`, the script starts the dev command in a detached `tmux` session when `tmux` is available. This survives parent command cleanup while keeping the dev logs in the configured restart log.
- It uses a `nohup` sleep wrapper for the delayed timer. Do not use `launchctl submit` here: launchd can keep descendant `pnpm dev` processes in the submitted job context and relaunch them after they exit.
- Default root is derived from the script location: the checkout that contains
  `.agents/skills/pwragent-dev-restart/scripts/restart-pwragent-dev.zsh`. Pass
  `--root PATH` to target a different checkout.
- The root must be a pnpm workspace root (`package.json` and
  `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.
- Default log is `<root>/.local/pwragent-dev-restart.log`.
- Use `--dry-run` before scheduling unless the user explicitly asks to restart immediately.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.