본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)23k · #10142

witr

하는 일

실행 중인 프로세스, 포트, 컨테이너, 열린 파일을 이를 시작한 서비스, 셸, 예약 작업까지 거슬러 추적합니다. 포트가 사용 중이거나 모르는 프로세스가 보이는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓포트가 이미 사용 중이고 무엇이 점유하는지 알아야 할 때.
  • ✓개발 서버나 다른 프로그램이 남아서 실행 중인 것 같을 때.
  • ✓알 수 없는 프로세스가 실행 중이고 무엇이 시작했는지 알고 싶을 때.

스킬 링크

https://github.com/pranshuparmar/witr/blob/main/plugins/witr/skills/witr/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/pranshuparmar/witr/blob/main/plugins/witr/skills/witr/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“3000번 포트가 이미 사용 중이에요. 무엇이 시작했는지 알려 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 지정한 프로세스나 포트를 검사해, 그것을 시작하고 계속 실행하게 한 연결 고리를 보고하고, 의심스러운 점도 함께 알려 줍니다. 읽기만 하며 아무것도 멈추지 않습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

witr: why is this running?

witr traces a process, port, container or open file back to what started it and keeps it running (a systemd unit, launchd job, container, cron job, shell, PM2 or supervisor, a Windows service, ...), and flags anything suspicious. It only reads. It never stops, kills or changes anything.

Reach for it instead of chaining lsof, ps, ss, netstat and docker ps.

Before you start

Check that it's installed with witr --version. If it isn't, tell the user and suggest one of these; don't install anything without asking:

  • macOS or Linux: brew install witr, or curl -fsSL https://raw.githubusercontent.com/pranshuparmar/witr/main/install.sh | bash
  • Windows: winget install -e --id PranshuParmar.witr
  • With Go: go install github.com/pranshuparmar/witr/cmd/witr@latest

Always give a target and --json. Without a target, --json exits with code 4 and asks for one; a bare witr opens an interactive dashboard, or exits with code 4 when there's no terminal.

Pick the command

Situation Command
Port already in use (EADDRINUSE) witr --port 3000 --json
A process by name witr node --json (matches substrings; add --exact for the exact name)
A known PID witr --pid 1234 --json
A container witr --container web --json (name, image, Compose service or ID prefix)
What holds a file or lock witr --file /var/lib/dpkg/lock --json
Just the chain of parents witr --pid 1234 --short (one line) or --tree
Several things at once witr --port 3000 --port 5432 --json (a JSON list, one entry per target, in order)
A process's environment witr --pid 1234 --env --json
More detail add --verbose (memory, I/O, open files, socket state)

Read the result

Check the exit code first:

Exit Meaning What to do
0 Found, no warnings Report it
1 Found, with warnings. Not a failure Report it and mention the warnings that matter
2 Not found Nothing on this system runs or listens there; say so. For a port, Error may say something outside this system (another WSL distro, a VM) holds it
3 Permission denied It belongs to another user; suggest re-running with sudo, and ask first
4 Ambiguous or bad input Matches lists the candidates: re-run with --pid for the right one, or fix the input. Servers with same-named workers (nginx, postgres) list every worker; the one you want is usually the parent
5 Internal error Report the Error
6 Found, but what started it can't be traced (Linux, macOS, FreeBSD) The process that started it has exited; say so

With several targets, the most severe result wins.

Then the JSON (the full contract is in the README, section "7.3 JSON Output"):

  • Found: Process (PID, Command, Cmdline, User, StartedAt, WorkingDir, Sockets, ...), Ancestry (the chain from the top down to the process), Source (Type: systemd, launchd, bsdrc, container, shell, ssh, cron, supervisor, windows_service, init or unknown; Name; Description), Warnings, and Container when it runs in one.
  • Failed lookup: {Target, Error}, plus Matches when the target was ambiguous.
  • --short --json: a list of {PID, Command}. Where the process that started one has exited, that entry also has PPID and ParentExited: true.
  • A container whose processes aren't visible (Docker Desktop, a VM): {ContainerName, Image, Ports, ..., Note}.

Match on fields and exit codes, not on wording: the text of Error, Note, Description and warnings can change between releases.

Explain it to the user

Lead with the answer: what it is, and what started it. For example: "Port 3000 is held by node (pid 4821), started by PM2 from ~/work/api." Mention warnings that matter, such as a public bind, running as root, a deleted binary or a restart loop.

Freeing a port or stopping something

witr only explains. Don't kill or stop anything on your own: tell the user what holds the port and what manages it, and ask before acting.

When they agree, stop it through whatever manages it, or it will come straight back. Use Source.Type, Source.Name and Container:

Managed by Stop with
systemd systemctl stop <unit> (--user for a user unit)
launchd launchctl bootout gui/$(id -u)/<label> (`sudo launchctl bootout system/<label
자주 묻는 질문

프로세스를 멈추나요?

아닙니다. 정보만 읽으며 아무것도 종료하거나 바꾸지 않습니다.

Windows에서도 작동하나요?

네. Windows 설치 옵션이 있으며 Windows 서비스도 설명할 수 있습니다.

에이전트에 도구를 먼저 설치해야 하나요?

네. 먼저 도구가 있는지 확인하고, 없으면 설치를 제안하지만 무엇이든 설치하기 전에 묻습니다.

상세 정보

작성자의 원본 설명

Explains why a process is running and what started it, using the witr CLI. Use when a port is already in use (EADDRINUSE), a dev server or other process was left running, an unknown or stuck process needs explaining, or you need to know which service, container, shell, supervisor or scheduled job started a process, holds a port or holds a file lock. Use it instead of chaining lsof, ps, ss, netstat and docker ps.

repo: pranshuparmar/witr

인기도

GitHub 스타
23k
순위
#10142
라이선스
Apache-2.0
업데이트
2026. 10. 23.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

비슷한 스킬