process-management

Manage PM2 application lifecycles with pre-start checks and watch mode.

35|3|Updated Feb 23, 2026
One-click install
npx skills add https://github.com/AnEntrypoint/gm-cc --skill process-management-anentrypoint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: process-management
Source: https://github.com/AnEntrypoint/gm-cc/tree/main/skills/process-management
Command: npx skills add https://github.com/AnEntrypoint/gm-cc --skill process-management-anentrypoint

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PM2 process management for all running applications. Enforces: pre-check for running processes before start, watch enabled, autorestart disabled, lifecycle cleanup when done. Use for all servers, workers, agents, background processes.

Core Features & Use Cases

  • Pre-start checks to avoid duplicates and ensure smooth startup
  • Flexible startup options: CLI, interpreter, ecosystem.config.cjs
  • Lifecycle management: logs, stop, restart, delete, and cleanup
  • Cross-platform guidance for Windows and Linux environments

Quick Start

Start your service with PM2 by loading an ecosystem.config.cjs and verify that it watches files without autorestarting.

Frequently Asked Questions about process-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent duplicate Node processes when starting PM2?

To prevent duplicate Node processes with PM2, you enforce pre-start checks to verify no existing instances are running. This avoids port conflicts and ensures smooth startup before loading your ecosystem configuration.

Can I use PM2 watch mode without autorestart for lifecycle management?

Yes, PM2 watch mode can be enabled while keeping autorestart disabled. This combination watches files for changes and enforces clean lifecycle handling and post-run cleanup without automatically restarting the process.

What is the best way to manage multiple Node workers across different platforms using PM2?

The best way to manage Node workers across platforms with PM2 is using an ecosystem.config.cjs file. It provides cross-platform guidance for Windows and Linux, allowing you to orchestrate servers, workers, and background processes consistently.

Does PM2 support lifecycle cleanup and log monitoring for background agents?

PM2 supports lifecycle cleanup and log monitoring for background agents. You can manage the entire lifecycle from start to stop, delete, and cleanup, while monitoring logs to track process behavior across development and production environments.

Why should I disable autorestart in PM2 for watch mode?

Disabling autorestart in PM2 watch mode prevents unwanted automatic restarts when files change. This enforces manual lifecycle control, ensuring you apply post-run cleanup and pre-start checks rather than relying on automatic process recovery.

How do I configure PM2 to start an application using an ecosystem file?

To configure PM2 startup with an ecosystem file, load an ecosystem.config.cjs file. This allows you to define startup options, enable watch mode, and verify that the application runs without autorestarting across your environment.