Crowi Dev Ports logo

Crowi Dev Ports

OrganizationPopular
crowi
crowi-dev-ports

並行 worktree の dev ポート割当・dev portal (:4300)・reverse proxy・tailscale serve・DB isolation の仕組みと運用。`pnpm dev` のポートが読めない / 実機 (iPhone 等) から確認したい / collab や presence が繋がらない / worktree ごとに DB を分けたい / migrate apply が worktree で拒否される、といったときに読む。 固定ポートのツールを追加するとき (4300-4999 帯を避ける必要がある) にも参照。 キーワード: dev port, ポート, portal, proxy, caddy, tailscale, 実機確認, mobile, isolateDb, DB 分離, anchor, 4300, collab 繋がらない

Overview

Publishercrowi
Repositorycrowi
Skill namecrowi-dev-ports
Stars
1.1K
Forks
166
Bundled files
Instructions only
LicenseMIT
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 crowi on GitHub. Read the source before you install it.

Installation

Install the Crowi Dev 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/crowi/crowi/tree/main/.claude/skills/crowi-dev-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/crowi/crowi.git /tmp/crowi
mkdir -p .claude/skills
cp -r /tmp/crowi/.claude/skills/crowi-dev-ports .claude/skills/crowi-dev-ports
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Crowi Dev 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 Crowi Dev 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 Crowi Dev 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.

Crowi dev ports / portal / tailscale

pnpm dev auto-detects the worktree and assigns each one a deterministic 4-port block (stride 10): api = anchor, web = anchor+1, site = anchor+2, proxy = anchor+3. main is pinned to anchor 4301 (today's ports, no migration); every other worktree gets the next free block starting at 4310, recorded in ~/.crowi-dev-ports.json (outside the repo, shared across every worktree checkout) so the same worktree always gets the same anchor. Pin one explicitly with pnpm dev --anchor 4350. Fixed-port tooling must stay outside this 4300-4999 band or it clashes with a worktree's block — e.g. the e2e servers sit just below at 4290/4291 (packages/e2e/src/config.ts).

  • The proxy (anchor+3) is the canonical dev entry point, not the raw web port. pnpm dev fronts api + web + the collab/presence/notifications WebSocket namespaces behind one same-origin reverse proxy (Caddy if installed, otherwise a zero-dep node fallback — see scripts/dev-caddy.mjs), the same routing table as the prod front proxy (Caddyfile). This is what lets realtime editing work at all: Next's rewrites() is HTTP-only and can't forward a WS upgrade, so opening the web port directly skips the proxy and collab/presence/notifications won't connect (see the doc comment in packages/web/src/lib/resolve-ws-url.ts).
  • tailscale serve publishes only the proxy port (tailscale serve --bg --https=<anchor+3> localhost:<anchor+3>) so an iPhone/other Mac on the same tailnet can open https://<your-machine>.<tailnet>.ts.net:<anchor+3> and get full realtime editing without restarting pnpm dev. Requires tailnet HTTPS/MagicDNS enabled; missing/not-logged-in tailscale just warns and continues (localhost still works). Ctrl-C / closing a worktree only turns off that worktree's serve (--https=<anchor+3> off — never tailscale serve reset, which would also drop every other worktree's proxy).
  • The dev portal is a read-only dashboard on a fixed :4300 listing every live worktree (from git worktree list) with its up/down status (proxy port probe), reachable proxy URLs (localhost + this host's LAN/tailscale IPs + the tailscale MagicDNS URL, rendered as a mobile-friendly card layout), and DB (shared vs. isolated). It's a separate long-lived process so restarting one worktree doesn't take the portal down for the others, and self-GCs registry entries for worktrees that no longer exist. The main worktree's pnpm dev auto-starts it (main is the always-around home base; feature worktrees rely on main's). Run it standalone with pnpm dev:portal, or opt main out with CROWI_DEV_NO_PORTAL=1. Both the portal and each worktree's proxy bind 0.0.0.0, so they're reachable by IP (http://<ip>:4300 / http://<ip>:<anchor+3>) from a phone on the tailnet or LAN even without the tailscale CLI (dev-only; also LAN-exposed, an accepted tradeoff).
  • DB isolation is opt-in and mongo-only (redis/ES always stay shared — redis's URL parser ignores the db-number path segment, and both are ephemeral state). Add dev.local.json at the worktree root (gitignored): { "isolateDb": true }, or pass --isolate-db; the mongo DB name becomes crowi_<key> instead of the shared one. pnpm migrate apply (the only destructive migrate subcommand — --dry-run/plan/status are exempt) refuses to run from a non-main worktree against the shared DB unless you isolate it, pass --yes, or set CROWI_MIGRATE_FORCE=1 (non-interactive environments fail closed instead of hanging on a prompt).
  • Implementation lives in scripts/dev-ports.mjs (registry/lock/key normalization), scripts/dev-caddy.mjs (proxy config generation + fallback), scripts/dev-portal/ (the dashboard), and the scripts/dev.mjs / scripts/migrate.mjs extensions that wire them together.

Frequently asked questions

What does the Crowi Dev Ports AI skill do?

並行 worktree の dev ポート割当・dev portal (:4300)・reverse proxy・tailscale serve・DB isolation の仕組みと運用。`pnpm dev` のポートが読めない / 実機 (iPhone 等) から確認したい / collab や presence が繋がらない / worktree ごとに DB を分けたい / migrate apply が worktree で拒否される、といったときに読む。 固定ポートのツールを追加するとき (4300-4999 帯を避ける必要がある) にも参照。 キーワード: dev port, ポート, portal, proxy, caddy, tailscale, 実機確認, mobile, isolateDb, DB 分離, anchor, 4300, collab 繋がらない

Why use Crowi Dev Ports on TypingMind?

Because you install it once and use it with any model. Crowi Dev 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 Crowi Dev Ports in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/crowi/crowi/tree/main/.claude/skills/crowi-dev-ports. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Crowi Dev 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 Crowi Dev Ports?

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

Is the Crowi Dev Ports AI skill free?

Yes. It is published on GitHub by crowi under the MIT 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 👇