Skip to content

dohoons/port-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

port-manager

A helper skill for AI coding agents to intelligently manage local development ports. Avoid unnecessary restarts and port conflicts by checking port status before starting dev servers.

Installation

Via npx skills (recommended)

npx skills add dohoons/port-manager

Manual installation

Claude Code:

mkdir -p ~/.claude/skills
cp -r port-manager ~/.claude/skills/

GitHub Copilot:

mkdir -p ~/.copilot/skills
cp -r port-manager ~/.copilot/skills/

What It Does

When you ask your AI agent to start a development server, port-manager:

  1. Checks if the port is already occupied - No more "port already in use" errors
  2. Identifies the running process - Knows if it's the same project or something else
  3. Skips unnecessary restarts - If your server is already running, it tells you
  4. Offers smart choices - When there's a conflict, asks what you want to do

Usage Examples

You: "Start the dev server"

If port 3000 is FREE:
  Agent: "✓ Starting dev server at http://localhost:3000"

If port 3000 has YOUR PROJECT:
  Agent: "✓ [my-app] dev server is already running at http://localhost:3000"

If port 3000 has ANOTHER PROCESS:
  Agent: "⚠️ Port 3000 is occupied by node (PID 1234). Options:
         1. Kill it and start my-app server
         2. Skip and keep existing
         What would you prefer?"

Supported Frameworks

Automatically detects common dev server ports:

  • Next.js, Nuxt: 3000
  • Vite: 5173
  • Create React App: 3000
  • Django, Flask: 8000
  • Rails: 3000
  • Express: 3000 (default, varies)

How It Works

The skill provides clear instructions to your AI agent:

  1. Identify the project's port from package.json or config files
  2. Check if port is occupied using lsof -i :<port>
  3. Handle the situation appropriately:
    • Free → Start the server
    • Same project → Skip and inform you
    • Different process → Ask what to do

Compatibility

Works with:

  • ✅ Claude Code
  • ✅ GitHub Copilot (VS Code, CLI)
  • ✅ Cursor
  • ✅ Windsurf
  • ✅ Any AI agent that supports the Agent Skills Open Standard

Platform Support

  • macOS / Linux: Uses lsof
  • Windows (WSL): Uses lsof
  • Windows native: Uses netstat

License

MIT

Author

dohoons


Built with the Agent Skills Open Standard

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors