port-guard
by ame · ★ 0 · updated yesterday
Refuses to start a second dev server while its port is already in use, and names the process holding it.
Install
/plugin marketplace add ameforge/claude-mods/plugin install port-guard@amemodsThen run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.
What it hooks into
From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.
- Events
tool.call- API calls
$.env.get$.fs.read$.process.run$.session.cwd- Can see
Bash callsPowerShell calls- Reach
- level 2 of 3 runs processesreads filesreads env vars
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/ameforge/claude-mods
- Path in repo
mods/port-guard- Source commit
2655a03the exact code the scan read- Author
- ame @ameforge
- License
- No license declared — ask the author before reusing code.
- First published
- Last pushed
- First listed here
Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.
More from ameforge/claude-mods
cache-handoff
ameforge/claude-mods
Writes a session handoff when about 5 minutes of the 1h prompt cache remain on an idle session, then, once that cache has gone cold, opens a new conversation from the handoff or pins a notice.
cache-keepalive
ameforge/claude-mods
Keeps an idle conversation's prompt cache warm with a tiny forked request shortly before the cache would expire, for a limited number of idle hours.
guards
ameforge/claude-mods
Shared guards that turn agent rules into checks: rg over recursive grep, a confirmation for git commit and push outside your own repos, a preview before a git command discards uncommitted changes, a confirmation before git add -A stages another session's files, a check before a reply hands back unchecked items, no bold or italic in markdown, no bullet character U+2022 in any file, no...
rename-jira-stamp
ameforge/claude-mods
Renames a conversation to the Jira ticket it is about, or a name you give, plus a timestamp.
whoami
ameforge/claude-mods
/whoami prints this session's name, the address other sessions use with SendMessage.
Related mods
Other mods in Guards, close to this one by stars.