Processes Ports logo

Processes Ports

Community
0xBakeer
processes-ports

Starting servers and long-running commands from an agent shell - background with logs, waiting for a port, health checks, finding and killing stale processes, timeouts, and cleaning up at the end.

Overview

Publisher0xBakeer
RepositoryTandemLLM
Skill nameprocesses-ports
Stars
75
Forks
14
Bundled files
Instructions only
LicenseAGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by 0xBakeer on GitHub. Read the source before you install it.

Installation

Install the Processes Ports AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/0xBakeer/TandemLLM/tree/main/packages/library/processes-ports
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/0xBakeer/TandemLLM.git /tmp/TandemLLM
mkdir -p .claude/skills
cp -r /tmp/TandemLLM/packages/library/processes-ports .claude/skills/processes-ports
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Processes Ports in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Processes Ports on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Processes Ports is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Processes and ports

Rules:

  • A server never runs in the foreground of the tool shell. Start it with (cmd > {tandem_scratch}/run.log 2>&1 &), note the PID, then wait for the port.
  • Wait with a loop (up to 20 s): curl -sf localhost:PORT/healthz or a port check; read the log tail when it fails.
  • Before starting, check the port is free: lsof -i :PORT. Kill only the process you own or the stale one from your last run, by PID, and say so.
  • Use absolute paths and set the working directory in the command (cd /abs/path && ...), since each tool call may start fresh.

What goes wrong:

  • The tool call times out because the server held the foreground; nothing after it ran.
  • "Address already in use" from the previous attempt; find it with lsof, do not pick a random new port silently.
  • The server started but on 127.0.0.1 while the test calls another host, or on a different port than the one curl uses.

Check: port check before, start line with PID, the wait loop's result, one health call with its status code, the log tail, and the stop with a second port check.

Done when:

  • lsof -i :PORT before and after in the result (free, then your PID, then free).
  • A health call with status 200 and the first 20 log lines.
  • The stop command and its result (process gone).

Reference

bash
PORT=8000; LOG={tandem_scratch}/run.log; mkdir -p {tandem_scratch}
lsof -i :$PORT -sTCP:LISTEN -t && { echo "port busy"; lsof -i :$PORT -sTCP:LISTEN; }   # decide, then kill by PID
cd /abs/project && (PYTHONUNBUFFERED=1 uvicorn app.main:app --port $PORT > $LOG 2>&1 & echo $! > {tandem_scratch}/server.pid)
for i in $(seq 1 20); do curl -sf localhost:$PORT/healthz >/dev/null && break; sleep 1; done
curl -s -o /dev/null -w 'health %{http_code}\n' localhost:$PORT/healthz; tail -n 20 $LOG
# ... work ...
kill "$(cat {tandem_scratch}/server.pid)" && sleep 1; kill -0 "$(cat {tandem_scratch}/server.pid)" 2>/dev/null && echo "still running" || echo "stopped"

Node: (node src/server.js > {tandem_scratch}/run.log 2>&1 & echo $! > {tandem_scratch}/server.pid); Vite: (npm run dev -- --port 5173 > {tandem_scratch}/dev.log 2>&1 & echo $! > {tandem_scratch}/dev.pid). Find what listens: lsof -nP -iTCP -sTCP:LISTEN | grep -E ':(3000|5173|8000)'; kill a tree: pkill -P PID; kill PID. Long job: (pytest -q > {tandem_scratch}/test.log 2>&1 & echo $! > {tandem_scratch}/test.pid), then kill -0 $(cat {tandem_scratch}/test.pid) && echo running || tail -n 5 {tandem_scratch}/test.log. Timeout a command: timeout 120 cmd (Linux) or gtimeout (macOS with coreutils); otherwise background plus a poll.

More rules:

  • Long jobs (builds, tests over 60 s) go to the background with a log; poll with tail -n 20 and check kill -0 PID.
  • At the end of the task, stop what you started and show it is stopped.

More pitfalls:

  • The log is empty because output is buffered; PYTHONUNBUFFERED=1, --log-level info, or stdbuf -oL.
  • A zombie from a nohup without a PID; always capture $!.

Frequently asked questions

What does the Processes Ports AI skill do?

Starting servers and long-running commands from an agent shell - background with logs, waiting for a port, health checks, finding and killing stale processes, timeouts, and cleaning up at the end.

Why use Processes Ports on TypingMind?

Because you install it once and use it with any model. Processes Ports is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Processes Ports in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/0xBakeer/TandemLLM/tree/main/packages/library/processes-ports. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Processes Ports?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Processes Ports?

As many as you like. As long as a model supports skills, you can use Processes Ports with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Processes Ports AI skill free?

Yes. It is published on GitHub by 0xBakeer under the AGPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇