pm2
Skill1 starsChanged 5 months agoMITView on GitHub
Manage Node.js and Python processes on a VPS with PM2. Use this skill when: the user needs to start, stop, restart, debug, or configure PM2 processes for any app on the server. Before adding a new process, always check what's running: Keep a manual port registry (add as comment in ecosystem.config.js or README): Используй этот скилл для управления процессами через PM2. Самые нужные команды: - pm2 list — список процессов - pm2 logs <имя> --lines 50 — логи - pm2…
- Reads credentials
4 other projects use a version of this.
Adopted by
Most recently taken up by
- delorenj/skillstheir own version, first seen Nov 7, 2026
- jholhewres/devclaw-skillstheir own version, first seen Oct 9, 2026
- TheKREATORS/my-claude-skillstheir own version, first seen Mar 19, 2026
- marcfargas/skillstheir own version, first seen Feb 15, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- delorenj/skills★ 17same name
- jholhewres/devclaw-skills★ 4same name
- marcfargas/skills★ 4same name
- TheKREATORS/my-claude-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- fastapi-deploySkill
- nextjs-deploySkill
- nginxSkill
- ssl-certbotSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 94
Before adding a new process, always check what's running:
- Very specific: line 101
Keep a manual port registry (add as comment in ecosystem.config.js or README):
“Common” is measured: kept by at least 6 in 10 of the 3 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.
Files
PM2 Skill
Manage Node.js and Python processes on a VPS with PM2.
Use this skill when: the user needs to start, stop, restart, debug, or configure PM2 processes for any app on the server.
Essential commands
pm2 list # show all processes + status + ports
pm2 status # alias for list
pm2 logs <name> --lines 50 # tail logs
pm2 logs <name> --err --lines 50 # errors only
pm2 restart <name> # restart without downtime
pm2 stop <name> # stop process
pm2 delete <name> # remove from PM2 registry
pm2 save # persist process list across reboots
pm2 startup # generate systemd startup commandStarting processes
Next.js app
pm2 start node_modules/.bin/next --name myapp -- start -p 3010
# or
pm2 start npm --name myapp -- start -- -p 3010FastAPI / Python
pm2 start ".venv/bin/python -m uvicorn app.main:app --host 0.0.0.0 --port 8000" \
--name myapp-backendTelegram bot (Python)
pm2 start ".venv/bin/python bot.py" --name myapp-botStatic file server (fallback)
pm2 start "npx serve dist -p 3020" --name myapp-staticecosystem.config.js (recommended for multiple apps)
module.exports = {
apps: [
{
name: 'myapp-frontend',
script: 'node_modules/.bin/next',
args: 'start -p 3010',
cwd: '/root/myapp/frontend',
env: {
NODE_ENV: 'production',
},
},
{
name: 'myapp-backend',
script: '.venv/bin/python',
args: '-m uvicorn app.main:app --host 0.0.0.0 --port 8000',
cwd: '/root/myapp/backend',
interpreter: 'none',
},
{
name: 'myapp-bot',
script: '.venv/bin/python',
args: 'bot.py',
cwd: '/root/myapp/backend',
interpreter: 'none',
},
],
};pm2 start ecosystem.config.js
pm2 restart ecosystem.config.js --only myapp-frontend
pm2 savePort management (critical for multi-project servers)
Before adding a new process, always check what's running:
pm2 list
ss -tlnp | grep LISTENKeep a manual port registry (add as comment in ecosystem.config.js or README):
3005 → project-alpha frontend
3006 → project-alpha admin
3010 → project-beta frontend
8000 → project-alpha backend
8001 → project-beta backendFind what's using a port
lsof -i :3010
ss -tlnp | grep 3010Kill a process occupying a port
kill -9 $(lsof -t -i :3010)Common issues & fixes
Process keeps crashing (status: errored)
pm2 logs <name> --err --lines 100 # read the actual error
# Common causes: port conflict, missing .env, syntax error in appChanges not reflected after restart
PM2 caches the start command. If you changed the port or script path:
pm2 delete <name>
pm2 start <new-command> --name <name>
pm2 savepm2 save not persisting after reboot
pm2 startup # run this, then copy-paste the output command as root
pm2 saveProcess starts but immediately exits
pm2 logs <name> # check stdout/stderr for startup error
# For Python: check if .venv exists and has all dependencies
# For Next.js: check if .next/ build existsWrong working directory
PM2 must be started from the correct cwd. Use --cwd flag or ecosystem.config.js cwd field.
🇷🇺 На русском
Используй этот скилл для управления процессами через PM2.
Самые нужные команды:
pm2 list— список процессовpm2 logs <имя> --lines 50— логиpm2 restart <имя>— перезапускpm2 save— сохранить после изменений
Правило портов: перед добавлением нового процесса всегда проверяй pm2 list и ss -tlnp. Конфликт портов — самая частая причина сбоя деплоя.
Процесс падает сразу после старта → pm2 logs <имя> --err покажет причину. Чаще всего: нет .env, нет .next билда, или не установлены зависимости в .venv.
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
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.

