ccc-pm2

ccc-pm2 is a command for Claude Code from KevinZai/commander. It costs 44 tokens per session (2,376 once invoked), scanned A, a copy of pm2, MIT.

A setup command that examines a project and creates PM2 configuration for running its detected services.

In plain words
What is it for?
Detect common JavaScript, Python, and Go services, determine ports, create an ecosystem configuration, and generate lifecycle commands.
Why use it?
It removes much of the manual work of configuring process startup, stopping, restarting, monitoring, and logs for frontend and backend services.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Good fit Detect common JavaScript, Python, and Go services, determine ports, create an ecosystem configuration, and generate lifecycle commands.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kevinzai/commander/ccc-pm2
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/KevinZai/commander

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ccc-pm2

README.md
[![agentmods](https://agentmods.dev/badge/commands/kevinzai/commander/ccc-pm2/github.svg)](https://agentmods.dev/commands/kevinzai/commander/ccc-pm2)
Your own site
<a href="https://agentmods.dev/commands/kevinzai/commander/ccc-pm2"><img src="https://agentmods.dev/badge/commands/kevinzai/commander/ccc-pm2/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ccc-pm2

Your own site · 80×15
<a href="https://agentmods.dev/commands/kevinzai/commander/ccc-pm2"><img src="https://agentmods.dev/badge/commands/kevinzai/commander/ccc-pm2.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,376 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 94% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.02376
Opus 5.5 $0.00018 $0.00950
Sonnet 5.5 $0.00009 $0.00475
Haiku 4.5 $0.00004 $0.00238

Measured 1mo ago against content hash b2d85777cb00, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ccc-pm2 scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

const { spawn } = require('child_process');
Origin

This is a copy

94% identical to pm2 — 316 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

commands/ccc-pm2.md · 252 lines

How it starts

The opening of the file, as written. The whole thing — 252 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/ccc-pm2 — PM2 setup for a project

CC Commander · /ccc-pm2 · detects the project's services and writes a PM2 config and one-line lifecycle commands.

Arguments: $ARGUMENTS (optional: services, names or ports to use instead of detected ones).

What happens

  1. Check PM2:

    pm2 --version
    

    If it is missing, ask with AskUserQuestion:

    • 🟢 Use npx pm2 — no global install; generated commands use npx pm2.
    • Install globally — runs npm install -g pm2.
    • Stop — nothing is generated.
  2. Detect the platform (node -p process.platform). win32 uses the Windows rules below; macOS and Linux use plain commands.

  3. Scan the project for services:

    Type Detection Default port
    Vite vite.config.* 5173
    Next.js next.config.* 3000
    Nuxt nuxt.config.* 3000
    CRA react-scripts in package.json 3000
    Express/Node server/, backend/ or api/ directory with package.json 3000
    FastAPI/Flask requirements.txt or pyproject.toml 8000
    Go go.mod or main.go 8080

    Port priority: user-specified > .env > framework config file > script arguments > default port. Name each app <project>-<port>.

  4. Show the detected services and the files you will write, then ask:

    • 🟢 Generate all — writes every file listed under Generated files.
    • Config only — writes ecosystem.config.cjs (and Python wrappers) only.
    • Cancel — nothing is written.
  5. Generate ecosystem.config.cjs, Python wrappers, the command files in .claude/commands/ and, on Windows, the scripts in .claude/scripts/.

  6. Update the project's CLAUDE.md with the PM2 section (see Post-init).

  7. Verify:

    node -e "const c=require('./ecosystem.config.cjs');console.log(c.apps.map(a=>a.name).join(', '))"
    ls .claude/commands/pm2-*.md
    

    Report the app names printed and the command files found. Do not start services unless the user asks.

Read the full file on GitHub · 252 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -25 lines · +30 tokens per session b2d85777cb00
  2. 2mo ago First seen · 277 lines · 14 tokens per session scan A 72a940044b26

Subscribe to this mod's changes

ccc-pm2 is a command published in the GitHub repository KevinZai/commander (6 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 2,376 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). It is 94% identical to pm2, differing in 316 lines, and is treated as a copy.

Related

ccc-pm2 compared with commands from other repositories

ccc-pm2 next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ccc-pm2KevinZai/commanderCommand6yesterdayMITA44Claude Code
loopskullninja/coco-workflowCommand71mo agoMITA28Claude Code
phaseskullninja/coco-workflowCommand71mo agoMITA21Claude Code
statusskullninja/coco-workflowCommand71mo agoMITA17Claude Code
justone-publishGodsB1025/justoneCommand26mo agoMITA22Claude Code
checklistgithub/spec-kitCommand153k3d agoMITA13Claude Code
clarifygithub/spec-kitCommand153k3d agoMITA27Claude Code