← ClaudeAtlas

port-allocatorlisted

Automatically allocate and manage development server ports, avoiding port conflicts between multiple Claude Code instances
aiskillstore/marketplace · ★ 329 · AI & Automation · score 79
Install: claude install-skill aiskillstore/marketplace
# Port Allocator Smart port allocator that only assigns ports to real projects containing `package.json`. ## Usage | Command | Description | |---------|-------------| | `/port-allocator` | Allocate/query port for current project | | `/port-allocator list` | List all allocated ports | | `/port-allocator scan` | Scan code directory, discover and allocate ports for new projects | | `/port-allocator config <path>` | Set the main code directory path | | `/port-allocator add <dir-path>` | Manually add port allocation for a project | | `/port-allocator allow` | Configure Claude Code permissions for this skill's commands | ## Important Rules ### 1. Only Operate on Current Project's Ports When Restarting Services When restarting the development server, **only kill processes within the current project's port range**, never affect other ports: ```bash # Correct: Only kill current project ports (e.g., 3000-3009) lsof -ti:3000 | xargs kill -9 2>/dev/null lsof -ti:3001 | xargs kill -9 2>/dev/null # Wrong: Kill all node processes or other ports pkill -f node # Will affect other projects! lsof -ti:3010 | xargs kill # This is another project's port! ``` ### 2. Append Rather Than Overwrite When Updating CLAUDE.md When updating `~/.claude/CLAUDE.md`, **must preserve the user's existing content**: ```bash # Correct: Check and append or update specific sections # Wrong: Directly overwrite the entire file ``` ## Execution Steps ### Command: `/port-allocator allow` Configure Claude