process-management

Process management including listing, finding, killing processes and managing tmux sessions. Use when managing running processes, investigating resource usage, or working with terminal multiplexers.

allowed_tools: Bash, Read

$ インストール

git clone https://github.com/ShunsukeHayashi/miyabi-mcp-bundle /tmp/miyabi-mcp-bundle && cp -r /tmp/miyabi-mcp-bundle/.claude/skills/process-management ~/.claude/skills/miyabi-mcp-bundle

// tip: Run this command in your terminal to install the skill


name: process-management description: Process management including listing, finding, killing processes and managing tmux sessions. Use when managing running processes, investigating resource usage, or working with terminal multiplexers. allowed-tools: Bash, Read mcp_tools:

  • "process_list"
  • "process_find"
  • "process_kill"
  • "process_tree"
  • "process_ports"
  • "process_env"
  • "process_files"
  • "process_limits"
  • "process_memory_map"
  • "process_threads"
  • "process_priority"
  • "process_wait"
  • "process_signal"
  • "process_cwd"
  • "tmux_list_sessions"
  • "tmux_list_windows"
  • "tmux_send_keys"
  • "tmux_capture_pane"
  • "tmux_create_session"
  • "tmux_kill_session"
  • "tmux_new_window"
  • "tmux_select_window"
  • "tmux_split_pane"
  • "tmux_resize_pane"

Process Management Skill

Version: 1.0.0 Purpose: Process and tmux session management


Triggers

TriggerExamples
Process"list processes", "find process", "プロセス一覧"
Kill"kill process", "stop process", "プロセス停止"
Ports"which process on port", "ポート確認"
Tmux"tmux sessions", "create session", "Tmux操作"

Integrated MCP Tools

Process Operations

ToolPurpose
process_listList all processes
process_findFind by name/pattern
process_killTerminate process
process_treeProcess tree view
process_portsProcesses by port
process_envEnvironment variables
process_filesOpen file descriptors
process_limitsResource limits
process_memory_mapMemory mapping
process_threadsThread list
process_priorityProcess priority (nice)
process_waitWait for completion
process_signalSend signal
process_cwdWorking directory

Tmux Operations

ToolPurpose
tmux_list_sessionsActive sessions
tmux_list_windowsWindows in session
tmux_send_keysSend keystrokes
tmux_capture_paneCapture pane content
tmux_create_sessionCreate new session
tmux_kill_sessionTerminate session
tmux_new_windowAdd window
tmux_select_windowSwitch window
tmux_split_paneSplit pane
tmux_resize_paneResize pane

Workflow: Process Investigation

Phase 1: Discovery

Step 1.1: List Processes

Use process_list with:
- sort: "cpu" or "memory"
- limit: 20

Step 1.2: Find Specific Process

Use process_find with:
- name: Process name pattern
- user: Specific user (optional)

Phase 2: Analysis

Step 2.1: Process Tree

Use process_tree to see parent/child relationships

Step 2.2: Resource Usage

Use process_limits to check:
- Max open files
- Max processes
- Memory limits

Phase 3: Port Investigation

Step 3.1: Find by Port

Use process_ports with:
- port: Port number

Identifies which process is using the port

Workflow: Tmux Management

Step 1: List Sessions

Use tmux_list_sessions to see all sessions

Step 2: Create Session

Use tmux_create_session with:
- session_name: Descriptive name
- window_name: Initial window name

Step 3: Send Commands

Use tmux_send_keys with:
- session: Session name
- keys: Command to execute

Step 4: Capture Output

Use tmux_capture_pane with:
- session: Session name
- pane: Pane number

Common Signals

SignalNumberPurpose
SIGTERM15Graceful termination
SIGKILL9Force kill
SIGHUP1Hangup/reload
SIGINT2Interrupt (Ctrl+C)
SIGSTOP19Pause process
SIGCONT18Resume process

Best Practices

✅ GOOD:

  • Use SIGTERM before SIGKILL
  • Check process tree before killing
  • Name tmux sessions descriptively
  • Use tmux for long-running tasks

❌ BAD:

  • SIGKILL as first option
  • Kill without investigation
  • Leave orphan processes
  • Unnamed tmux sessions

Checklist

  • Process identified (PID/name)
  • Resource usage checked
  • Port conflicts resolved
  • Graceful termination attempted
  • Tmux sessions organized