# Allocate Development Ports Without Conflicts

Concurrent development projects often compete for the same local ports. This skill assigns predictable port ranges and records them in a shared registry.

## Install

```bash
npx skillstore add guo-yu/port-allocator
```

## Metadata

- Status: approved
- Slug: guo-yu-port-allocator
- Skillstore revision: r2
- Version status: missing
- Tree hash: 1d85017d0fc12f7da93f727b37a51041add286b5b565fc7aa17047a44e2d8b8c
- Author: guo-yu
- GitHub username: guo-yu
- License: MIT
- Repository: https://github.com/guo-yu/skills/tree/master/port-allocator
- Ref: 286d37c9c189ddd1aafd3548415fb031d1df79d5
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, filesystem
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/guo-yu-port-allocator
- Manifest: https://skillstore.pages.dev/api/skills/guo-yu-port-allocator/manifest

## Capabilities

- Assigns ten consecutive ports to each project containing package.json.
- Lists existing project-to-port assignments from a shared registry.
- Scans a configured code root for unregistered package-based projects.
- Adds a project directory to the registry manually.
- Configures the main code directory used for project discovery.
- Documents commands for inspecting listeners within assigned port ranges.

## Use Cases

- Start a local application: Reserve a predictable port range before launching a frontend and its supporting services.
- Coordinate several repositories: Scan a shared code directory and record distinct ranges for each package-based project.
- Standardize team port assignments: Review current allocations and add missing projects using a consistent ten-port convention.

## Prompt Templates

### Allocate my current project

```
Check whether the current directory contains package.json. Allocate or report its port range without changing global permissions.
```

### Review existing allocations

```
List every registered project and port range. Highlight duplicate or overlapping assignments, but do not modify the registry.
```

### Discover projects under a code root

```
Scan [CODE_ROOT] to depth three for package.json files. Exclude build artifacts and propose ranges for unregistered projects before writing changes.
```

### Audit and repair port coordination

```
Review the registry for overlaps, stale paths, and active listener conflicts. Propose an atomic repair plan and require confirmation before terminating processes.
```

## Limitations

- It only recognizes projects that contain package.json.
- It uses fixed ten-port ranges beginning at port 3000.
- The instructions do not define locking for concurrent registry updates.
- Permission setup changes user-level Claude Code configuration and requires careful review.

## Best Practices

- Review proposed assignments before updating the shared registry.
- Confirm process ownership before terminating any listener on an assigned port.
- Keep permission grants limited to the registry and selected project root.

## Anti Patterns

- Do not terminate every Node process when one development server conflicts.
- Do not grant wildcard read access across the entire Claude configuration directory.
- Do not overwrite global instructions or registry data without preserving existing content.

## Security Audit

- Audited at: 2026-08-05T11:37:02.592\+00:00
- Summary: Most static alerts are false positives caused by Markdown backticks, translated text, path references, and /dev/null. Confirmed risks include forceful process termination, persistent global instruction edits, and broad unattended access to ~/.claude files. The documented registry update also lacks concurrency control.

## Stats

- Views: 149
- Downloads: 8
- Favorites: 0
- Popularity score: 0
