kill-backend

Terminate Skaile backend processes and free port 3001.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/skaile-ai/ai-assets --skill kill-backend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kill-backend
Source: https://github.com/skaile-ai/ai-assets/tree/main/skaile-development/skills/kill-backend
Command: npx skills add https://github.com/skaile-ai/ai-assets --skill kill-backend

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Skaile backend and its spawn-chain often leave orphaned processes and port conflicts when restarting or debugging. This skill cleanly terminates the backend and every process in its spawn chain (including nest start --watch, dotenvx, and bun run dev), enabling a reliable fresh start.

Core Features & Use Cases

  • Detects and targets the backend process tree associated with port 3001 and related commands.
  • Terminates the entire chain safely (first with SIGTERM, then with SIGKILL when needed) and prevents partial restarts.
  • Verifies that port 3001 is free and no stray processes remain, providing a clean slate for a fresh backend launch.

Quick Start

Tell the assistant to terminate the Skaile backend and its spawn chain to free port 3001.

Frequently Asked Questions about kill-backend

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

FAQPage Schema
How do I kill a stuck backend process and its spawn chain on port 3001?

To kill a stuck backend process on port 3001, terminate the entire spawn chain including nest start --watch, dotenvx, and bun run dev. This skill targets the process tree and safely terminates it using SIGTERM followed by SIGKILL, ensuring a clean restart.

What is the safest way to stop nest start --watch and dotenvx wrappers?

The safest way to stop nest start --watch and dotenvx wrappers is multi-stage termination. This approach sends SIGTERM first for graceful shutdown, then escalates to SIGKILL for stubborn processes, preventing partial restarts and clearing port 3001 completely.

Why does port 3001 remain occupied after I stop my backend dev server?

Port 3001 remains occupied because stopping the main backend process often leaves orphaned spawn-chain processes running. Commands like bun run dev or dotenvx spawn child processes that survive standard termination, requiring targeted process tree elimination to free the port.

Can I verify that port 3001 is completely free after killing the backend?

Yes, this skill performs post-kill verification to ensure port 3001 is free and no stray processes remain. By checking for survivors after multi-stage termination, it confirms the backend spawn chain is fully eliminated and provides a clean slate for a fresh launch.

How do I clean up orphaned bun run dev processes causing port contention?

To clean up orphaned bun run dev processes causing port contention, you need targeted process selection that eliminates the entire spawn chain. This skill detects the backend process tree associated with port 3001 and terminates all related wrappers safely.