agentleFS
nodealchemynodealchemy/powernode-platform/.claude/skills/deploy/SKILL.md

deploy

Skill4 starsChanged 18 days agoMITView on GitHub

Restart local services and verify health after code changes

155 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use pm-discovery, qa-phase and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ww-w-aiSkill

    pm-discovery

    PM Agent Team - Automated product discovery, strategy, and PRD generation. Runs PM analysis workflow to produce comprehensive PRD before PDCA Plan phase.

    Also in 3 projects that use this

  • ww-w-aiSkill

    qa-phase

    Run QA tests at various levels (L1-L5) for features under PDCA management. Integrates with MCP tools to execute structured test plans.

    Also in 3 projects that use this

  • +10 more from ww-w-ai

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 139 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If worker was restarted, wait until its unit is active again before health checks (the ~30 s drain).

    line 64
  2. Distinctive:

    If any checks fail, report which services are down and suggest remediation.

    line 78
  3. Distinctive:

    If all health checks pass, run a quick API smoke test:

    line 82
  4. Distinctive:

    If MCP-related changes were made:

    line 90

“Common” is measured: kept by at least 6 in 10 of the 139 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/deploy — Local Service Restart & Verify

Safely restart local Powernode services and verify they're healthy. This is for LOCAL development restarts, not remote/Docker deployment.

Step 1: Pre-flight Check

pwd
git status --short | head -10

Note any uncommitted changes — warn if there are unstaged migrations.

Step 2: Restart Services

Based on scope (default: all):

backend

bash scripts/reload-backend.sh

Backend uses SIGUSR2 hot reload (~30ms). No downtime.

worker

This cell is module-composed: the unit is powernode-<moduleID>-sidekiq.service (a UUID), never powernode-worker@default — a guessed name fails systemctl silently. Discover it, then restart and verify the discovered unit (fall back to powernode-worker@default only if discovery finds nothing, for a plain installer-shape host):

UNIT=$(systemctl list-units 'powernode-*-sidekiq.service' --no-pager --no-legend --plain | awk '{print $1}' | head -1)
sudo systemctl restart "${UNIT:-powernode-worker@default}"
systemctl is-active "${UNIT:-powernode-worker@default}"

Worker drains jobs before stopping (~28s), so the health check waits for it (Step 3).

worker-web (always restart with worker)

Same discovery, -worker-web instead of -sidekiq:

UNIT=$(systemctl list-units 'powernode-*-worker-web.service' --no-pager --no-legend --plain | awk '{print $1}' | head -1)
sudo systemctl restart "${UNIT:-powernode-worker-web@default}"
systemctl is-active "${UNIT:-powernode-worker-web@default}"

frontend

Same discovery, -frontend:

UNIT=$(systemctl list-units 'powernode-*-frontend.service' --no-pager --no-legend --plain | awk '{print $1}' | head -1)
sudo systemctl restart "${UNIT:-powernode-frontend@default}"
systemctl is-active "${UNIT:-powernode-frontend@default}"

all (default)

Restart in this order: backend (reload), worker + worker-web, frontend.

Step 3: Wait for Drain (worker only)

If worker was restarted, wait until its unit is active again before health checks (the ~30 s drain). A foreground sleep is blocked in this harness, so wait with the Monitor tool running a bounded until-loop on the discovered unit (shell state does not carry over, so discover it again):

UNIT=$(systemctl list-units 'powernode-*-sidekiq.service' --no-pager --no-legend --plain | awk '{print $1}' | head -1)
timeout 90 bash -c "until systemctl is-active --quiet '${UNIT:-powernode-worker@default}'; do sleep 2; done"

Step 4: Health Check

bash scripts/health-check.sh

If any checks fail, report which services are down and suggest remediation.

Step 5: Smoke Test (optional)

If all health checks pass, run a quick API smoke test:

curl -s http://localhost:3000/api/v1/health | python3 -m json.tool
curl -s http://localhost:4567/health | python3 -m json.tool

Step 6: MCP Connectivity (optional)

If MCP-related changes were made:

bash scripts/mcp-smoke-test.sh

Step 7: Report

| Service        | Status | Details          |
|----------------|--------|------------------|
| Backend        | ✅/❌  | reload/restart   |
| Worker         | ✅/❌  | drain time       |
| Worker Web     | ✅/❌  | port 4567        |
| Frontend       | ✅/❌  | port 5173        |
| API Health     | ✅/❌  | HTTP status      |
| Worker API     | ✅/❌  | HTTP status      |
| MCP            | ✅/❌/⏭ | if tested       |

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.