Token导航 LogoToken导航TokenDH.com
研究检索可写文件github未标认证来源可访问许可证需确认审计提醒

process-management流程管理

Agent Skill

process-management 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

326

周安装

14

GitHub Stars

21

下载量

114
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:process-management(流程管理)
来源仓库:https://github.com/anentrypoint/gm-cc
仓库路径:skills/process-management
安装命令:
npx skills add https://github.com/anentrypoint/gm-cc --skill process-management
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/anentrypoint/gm-cc --skill process-management

简介

process-management 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 强制要求所有进程必须通过 PM2 进行管理,禁止直接调用 node、bun 或 python 启动长期运行服务。
  • 使用前需检查是否已安装 PM2,并通过 pm2 jlist 查看当前运行状态。
  • 安装命令:npx skills add https://github.com/anentrypoint/gm-cc --skill process-management。
  • 建议确认权限范围和维护状态,避免触发联网或文件读写操作。

SKILL.md

Process Management — PM2

All applications MUST run through PM2. Direct invocations (node, bun, python) are forbidden for any process that produces output or has a lifecycle.

Installation (First Time Only)

Check if PM2 is installed:

pm2 --version

If command not found, install globally:

npm install -g pm2

Verify installation:

pm2 --version        # should print version number
pm2 ping             # should respond "pong"

Pre-Start Check (MANDATORY)

Before starting any process, check what is already running:

pm2 jlist
  • online → already running, use pm2 logs <name> to observe
  • stopped → use pm2 restart <name>
  • Not in list → proceed to start

Never start a duplicate process. Always check first.

Start a Process

# CLI (quick)
pm2 start app.js --name myapp --watch --no-autorestart

# With interpreter
pm2 start script.py --interpreter python3 --name worker --watch --no-autorestart

# From ecosystem config (preferred for reproducibility)
pm2 start ecosystem.config.cjs

Ecosystem Config (Standard Template)

autorestart: false — process stops on crash, no automatic recovery watch: true — restarts on file changes in watched directories only

// ecosystem.config.cjs
module.exports = {
  apps: [{
    name: "myapp",
    script: "src/index.js",
    watch: ["src", "config"],
    watch_delay: 1000,
    autorestart: false,
    ignore_watch: [
      "node_modules",
      ".git",
      "logs",
      "*.log",
      ".pm2",
      "public",
      "uploads"
    ],
    watch_options: {
      followSymlinks: false,
      usePolling: false
    },
    log_date_format: "YYYY-MM-DD HH:mm:ss",
    out_file: "./logs/out.log",
    error_file: "./logs/error.log"
  }]
};

Log Viewing

pm2 logs <name>                      # stream live (Ctrl+C to stop)
pm2 logs <name> --lines 100          # last 100 lines then stream
pm2 logs <name> --err                # errors only
pm2 logs <name> --out                # stdout only
pm2 logs <name> --nostream --lines 200  # dump without follow
pm2 logs --json                      # structured JSON output
pm2 flush                            # clear all log files

Log files: ~/.pm2/logs/<name>-out.log / <name>-error.log Windows path: C:\Users\<user>\.pm2\logs\

Lifecycle Management

pm2 list                    # view all processes and status
pm2 jlist                   # JSON output for scripting
pm2 info <name>             # detailed process info
pm2 stop <name>             # stop (keeps in list)
pm2 restart <name>          # restart
pm2 delete <name>           # stop + remove from list
pm2 delete all              # remove all processes
pm2 ping                    # check if PM2 daemon is alive

When work is complete: always pm2 delete <name> to clean up orphaned processes.

Stopping a watched process: pm2 stop while watch is active restarts on next file change. To fully halt: pm2 delete <name> (removes it entirely).

Windows vs Linux

File Watching

EnvironmentConfig
Linux nativeusePolling: false (inotify kernel events)
WSL watching /mnt/c/...usePolling: true, interval: 1000
Windows nativeusePolling: false (ReadDirectoryChangesW)
Network / NFS / Docker volumesusePolling: true, interval: 1000

Linux inotify exhaustion fix (symptom: watch silently stops working):

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Windows: npm Scripts and.cmd Wrappers

PM2 cannot spawn .cmd shims (npm, npx, etc.) directly — they require cmd.exe.

// ecosystem.config.cjs — Windows npm script
{
  name: "myapp",
  script: "npm",
  args: "start",
  interpreter: "cmd",
  interpreter_args: "/c"
}

For globally installed CLIs, find the real .js entry point:

# Linux/macOS
cat "$(which myapp)" | head -5

# Windows PowerShell
Get-Command myapp | Select-Object -ExpandProperty Source

Point script at the resolved .js file — never at the .cmd wrapper.

Terminal Suppression on Windows (CRITICAL)

All code that spawns subprocesses MUST use windowsHide: true to prevent popup windows.

// ❌ WRONG - will show popup windows on Windows
spawn('node', ['script.js']);

// ✅ CORRECT - hides windows, safe for all platforms
spawn('node', ['script.js'], { windowsHide: true });

Applies to all subprocess execution:

  • child_process.spawn(){windowsHide: true}
  • child_process.exec(){windowsHide: true}
  • child_process.execFile(){windowsHide: true}
  • child_process.fork(){silent: true} (alternative for fork)

PM2-started processes automatically hide windows. Code-spawned subprocesses must explicitly set this. Forgetting creates visible popups during automation—unacceptable UX.

Windows 11+ wmic Error

PM2 uses wmic for process stats — removed in Windows 11+. Symptom: Error: spawn wmic ENOENT in ~/.pm2/pm2.log. Fix: npm install -g pm2@latest. App processes continue working despite the error.

Persistence on Reboot

PlatformMethod
Linuxpm2 startup && pm2 save (auto-detects systemd/upstart/openrc)
Windowspm2-installer (Windows Service)
pm2 save        # snapshot current process list to ~/.pm2/dump.pm2
pm2 resurrect   # restore saved list after manual daemon restart

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.07%
按下载量换算42

Claude

30.23%
按下载量换算34

Cursor

18.56%
按下载量换算21

Gemini CLI

10.58%
按下载量换算12

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills