Agent skill · software engineering · aiskillstore
port-allocator
Automatically allocate and manage development server ports, avoiding port conflicts between multiple Claude Code instances
Why this skill is useful
Adds executable scripts for managing port allocations and configurations specific to Claude Code projects.
What it needs
Requires claude installed locally. About 4k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
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: 2. Append Rather Than Overwrite When Updating CLAUDE.md When updating ~/.claude/CLAUDE.md, must preserve the user's existing content: Execution Steps Command: /port-allocator allow Configure Claude Code to allow commands used by this skill, avoiding manual confirmation each time: 1. Read ~/.claude/settings.json (if exists) 2. Merge the following commands into permissions.allow array (preserve existing config): 3. Write updated settings.json 4. Output the list of added permissions Output Format: Command: /port-allocator config <path> Set the user's main code directory: 1. Verify path exists (required! Error and exit if not found) 2. Update coderoot field in ~/.claude/port-registry.json 3. Output confirmation First Run: Auto-Detection On first run (when ~/.claude/port-registry.json doesn't exist or has no coderoot), automatically detect the code directory: Auto-detection output: If no directory found: Command: /port-allocator scan Scan code directory, automatically discover and register projects: 1. Read ~/.claude/port-registry.json to get coderoot If config doesn't exist, run auto-detection first If coderoot directory doesn't exist, prompt user to configure 2. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/port-allocator