Skip to content
Skills Library
DevOps & cloud · Automation

hung-process

/hung-process

Use when a command hangs or something blocks the next run on the Windows PC: no output for 5 minutes, a busy port, EADDRINUSE, EBUSY, a file lock, a Gradle daemon, taskkill Access is denied, a stuck CI runner. Also on "kill it", "the port is taken", "процесс завис", "порт занят". Finds the dev tool holding the port or lock, ends only safe process trees, reruns the step, gives an elevated command when needed, logs a repeat to TODO.md.

Licence
MIT
Last repository change
13.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when a command hangs or something blocks the next run on the Windows PC: no output for 5 minutes, a busy port, EADDRINUSE, EBUSY, a file lock, a Gradle daemon, taskkill Access is denied, a stuck CI runner. Also on "kill it", "the port is taken", "процесс завис", "порт занят". Finds the dev tool holding the port or lock, ends only safe process trees, reruns the step, gives an elevated command when needed, logs a repeat to TODO.md.

Triggers from the description

kill itthe port is takenпроцесс зависпорт занят
Original author description

Use when a command hangs or something blocks the next run on the Windows PC: no output for 5 minutes, a busy port, EADDRINUSE, EBUSY, a file lock, a Gradle daemon, taskkill Access is denied, a stuck CI runner. Also on "kill it", "the port is taken", "процесс завис", "порт занят". Finds the dev tool holding the port or lock, ends only safe process trees, reruns the step, gives an elevated command when needed, logs a repeat to TODO.md.

How it works

  1. Steps
  2. Folders held open
Original SKILL.md headings · 46 lines, 358 words
SKILL.md preview
---
name: hung-process
description: 'Use when a command hangs or something blocks the next run on the Windows PC: no output for 5 minutes, a busy port, EADDRINUSE, EBUSY, a file lock, a Gradle daemon, taskkill Access is denied, a stuck CI runner. Also on "kill it", "the port is taken", "процесс завис", "порт занят". Finds the dev tool holding the port or lock, ends only safe process trees, reruns the step, gives an elevated command when needed, logs a repeat to TODO.md.'
---

# Stop a hung process

An agent MUST find and stop the processes that hang its work. The person
SHOULD only say yes to an admin prompt.

## Steps

1. **Spot** a command MUST count as hung after 5 minutes without new output,
   or when a busy port, a file lock or `EBUSY` blocks the next run.
2. **Find** the agent SHOULD list the dev tools of this worktree and the ones
   without a live parent, and the owner of the port:

   ```powershell
   $dev = 'node.exe', 'java.exe', 'cargo.exe', 'rustc.exe', 'python.exe', 'adb.exe', 'gh.exe'
   Get-CimInstance Win32_Process | Where-Object { $_.Name -in $dev -and ($_.CommandLine -like "*$PWD*" -or -not (Get-Process -Id $_.ParentProcessId -EA 0)) } | Select-Object ProcessId, Name, CommandLine
   Get-NetTCPConnection -LocalPort 5173 -State Listen | Select-Object OwningProcess
   ```

3. **Pick** the agent MAY stop a dev tool, such as `node` or `java`, whose
   command line holds its own worktree path. A dev tool without a live parent
   MAY go only when it holds the port or the lock the step needs, since Git
   Bash and other sessions leave live processes without a parent too. The
   agent MUST NOT stop the person's editor, browser, terminal, a system
   process, the adb server or the Gradle daemon unless it blocks the step.
4. **Stop** the agent MUST end the whole tree with `taskkill /PID <pid> /T /F`,
   then run the step once more. A second hang MUST go in `TODO.md` with the
   command and its last output.
5. **Admin** when `taskkill` answers "Access is denied", or the local CI
   runner service hangs, the agent MUST give the person the elevated command.
   It MUST then check that the process is gone:

   ```powershell
   Start-Process powershell -Verb RunAs -ArgumentList '-NoExit','-Command','taskkill /PID 1234 /T /F'
   Start-Process powershell -Verb RunAs -ArgumentList '-NoExit','-Command','Restart-Service actions.runner.*'
   ```

## Folders held open

- **Gradle** a folder an Android build used SHOULD get `gradlew --stop` before
  its removal, and the shell MUST leave the folder first. Either one holds it
  open on Windows.
- **Long jobs** a job of several hours MUST start outside the agent's process
  tree, with `Invoke-CimMethod Win32_Process -MethodName Create`. A process
  the session started dies when the session restarts.

Versions

The database has no other skills named hung-process.

Database snapshot: 13.11.2026 · package version cc96b136992b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100proc-cli
    Find, inspect and control processes and ports with the proc CLI (macOS, Linux, Windows), with JSON output for agents. Use it instead of lsof, ps, pgrep, pkill, kill, netstat, pstree or top whenever you need to: see what is on a port or free it (EADDRINUSE, "address already in…
  • 100portman
    Keeps a registry of the localhost ports each project uses, so dev servers never collide. Lists the registered ports with what holds each one right now, suggests free ports that avoid common defaults such as 3000, 5173, 8000, and 8080, finds duplicates, collisions, and ports…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.