Agent skill

Worktree Ports

by FranciscoMoretti in FranciscoMoretti/chat-js

Discover and use stable per-app ports assigned to a local monorepo worktree.

Apache-2.0Auto-check: notesDevelopment

Install Worktree Ports

skills CLI
$ npx skills add FranciscoMoretti/chat-js --skill worktree-ports -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install FranciscoMoretti/chat-js worktree-ports --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/FranciscoMoretti/chat-js.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/worktree-ports .claude/skills/worktree-ports && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
worktree-ports
GitHub stars
1.2k
Token cost
~231 tokens
SKILL.md length
88 words
Files
6 (incl. scripts, assets)
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Discover and use stable per-app ports assigned to a local monorepo worktree.

  • Debugging local apps
  • Runs TypeScript scripts from its folder; calls bun
  • Localhost ports
  • .worktree-env.json are involved

What it does

Worktree Ports is an agent skill from FranciscoMoretti/chat-js. Discover and use stable per-app ports assigned to a local monorepo worktree. Use when starting, opening, testing, or debugging local apps, or when worktree slots, localhost ports, PORT, app URLs, or .worktree-env.json are involved.

Its SKILL.md is about 230 tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and assets (for example `assets/worktree-env.schema.json`, `scripts/worktree-config.ts` and `scripts/worktree-env.ts`).

It sits in Development, covering Git worktrees and Monorepo tooling. It works with OpenAI and Google Gemini. The repository describes itself as: Production-ready AI chat. Start here and make it your own. Formerly Sparka AI. The licence is Apache-2.0.

When your agent uses it

  • Debugging local apps
  • Localhost ports
  • .worktree-env.json are involved

Example prompts

  • “/worktree-ports”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 573a6a7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • bun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Worktree Ports loads about 231 tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 88 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~231

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:9
    through the root `bun dev*` scripts so `.env.worktree.local` and `.env.local` are loaded before the wrapper runs.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from FranciscoMoretti/chat-js at commit 573a6a7, republished under its Apache-2.0 licence (© FranciscoMoretti). 88 words, ~231 tokens.

Download SKILL.mdSave it as .claude/skills/worktree-ports/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
worktree-ports
description
Discover and use stable per-app ports assigned to a local monorepo worktree. Use when starting, opening, testing, or debugging local apps, or when worktree slots, localhost ports, PORT, app URLs, or .worktree-env.json are involved.

Worktree Ports

  • Run bun dev:info --json before accessing local apps. Use the returned app URLs; never assume a port.
  • Start apps through the root bun dev* scripts so .env.worktree.local and .env.local are loaded before the wrapper runs.
  • Set the slot environment variable declared in .worktree-env.json in a worktree-local environment file.
  • Keep app offsets unique and below the configured range stride.
  • Declare every variable an app needs under its exports, including PORT.
  • Configure cross-app environment variables with {apps.<name>.url} templates.

The generic resolver and command wrapper are bundled in scripts/.

© FranciscoMoretti, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, assets) in .agents/skills/worktree-ports of FranciscoMoretti/chat-js.

  • SKILL.md
  • assets/worktree-env.schema.json
  • scripts/worktree-config.ts
  • scripts/worktree-env.ts
  • scripts/worktree-runtime.test.ts
  • scripts/worktree-runtime.ts

Open the folder on GitHubat commit 573a6a7

Compare with similar skills

Worktree Ports next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Worktree Ports compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Worktree Ports this skillFranciscoMoretti/chat-js1.2k—~231Automated safety check: NotesApache-2.0
Ccmanager Configkbwo/ccmanager1.3k—~1.5kAutomated safety check: PassMIT
DevSpace Manual QA SetupWaishnav/devspace5.2k—~440Automated safety check: PassMIT
Release Candidate Prepopenai/openai-agents-python30k—~4.9kAutomated safety check: PassMIT
Deep Reviewdyad-sh/dyad22k—~1.4kAutomated safety check: PassCustom licence
DeepChat Provider IntegrationThinkInAIXYZ/deepchat6.4k—~1.2kAutomated safety check: PassApache-2.0

Similar skills

  • Ccmanager Config

    kbwo/ccmanager

    Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.

    1.3k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • DevSpace Manual QA Setup

    Waishnav/devspace

    Prepares the current DevSpace checkout or worktree for isolated local manual QA, covering QA state seeding, UI asset builds and snapshot resets.

    5.2k GitHub stars~440 tokensUpdated today
    DevelopmentAuto-check passed
  • Release Candidate Prep

    openai/openai-agents-python

    Official

    Prepare a local Python SDK release candidate in a dedicated worktree.

    30k GitHub stars~4.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Deep Review

    dyad-sh/dyad

    Deep multi-agent code review run locally — a fleet of parallel finder agents reviews the diff from independent angles, then adversarial verifier agents reproduce each finding before it is reported.

    22k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed
  • DeepChat Provider Integration

    ThinkInAIXYZ/deepchat

    Guides adding an LLM provider to DeepChat through explicit source changes: collect the provider details, pick a transport path and add registry entries and tests.

    6.4k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Live Extension UI Automation

    qixing-jk/all-api-hub

    Control, debug, and test the live dev browser extension UI (Options, Popup, Sidepanel) via CDP with persistent login states and accounts.

    4.9k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed

More from FranciscoMoretti/chat-js

All 9 skills in this repo
  • Vitest Visual Testing

    FranciscoMoretti/chat-js

    Make @uiverify/vitest (Vitest browser-mode) captures deterministic so component visual tests stop coming back "changed" without a real change (flaky diffs).

    1.2k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Trpc Patterns

    FranciscoMoretti/chat-js

    Implement ChatJS tRPC routers, TanStack Query hooks, mutations, and cache invalidation.

    1.2k GitHub stars~288 tokensUpdated today
    Auto-check passed
  • Generate Code Snippet

    FranciscoMoretti/chat-js

    Generate a concise, shareable code snippet URL for code.franciscomoretti.com.

    1.2k GitHub stars~178 tokensUpdated today
    Auto-check passed
  • Lazy Prefetch Pattern

    FranciscoMoretti/chat-js

    Use the ChatJS React Query v5 lazy-prefetch pattern without blocking server rendering.

    1.2k GitHub stars~217 tokensUpdated today
    Auto-check passed
  • Create Vercel AI Issue

    FranciscoMoretti/chat-js

    Create a well-formed GitHub issue in vercel/ai using the gh CLI.

    1.2k GitHub stars~203 tokensUpdated today
    Auto-check passed
  • Dev Auth Bypass

    FranciscoMoretti/chat-js

    Authenticate a browser against a local ChatJS app without OAuth.

    1.2k GitHub stars~141 tokensUpdated today
    Auto-check passed

Categories

Questions about Worktree Ports

What does Worktree Ports do?

Discover and use stable per-app ports assigned to a local monorepo worktree. Worktree Ports is an agent skill from FranciscoMoretti/chat-js. Discover and use stable per-app ports assigned to a local monorepo worktree.

When should I use Worktree Ports?

Worktree Ports fits situations like: debugging local apps; localhost ports; .worktree-env.json are involved.

How do I install Worktree Ports in Claude Code?

Run `npx skills add FranciscoMoretti/chat-js --skill worktree-ports -a claude-code`. Or copy the skill folder (.agents/skills/worktree-ports in FranciscoMoretti/chat-js) into .claude/skills/worktree-ports in your project. Claude Code loads it when a task matches its description.

How do I install Worktree Ports in Codex?

Run `npx skills add FranciscoMoretti/chat-js --skill worktree-ports -a codex`. Or copy the skill folder (.agents/skills/worktree-ports in FranciscoMoretti/chat-js) into .agents/skills/worktree-ports in your project. Codex loads it when a task matches its description.

Can I use Worktree Ports in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add FranciscoMoretti/chat-js --skill worktree-ports -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/worktree-ports, .gemini/skills/worktree-ports, .github/skills/worktree-ports and .opencode/skills/worktree-ports in your project.

What does Worktree Ports need to run?

Going by SKILL.md and its folder, Worktree Ports needs TypeScript for the scripts in its folder and the command-line tools its instructions call (bun). Our summary lists: Node.js.

Does Worktree Ports access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Worktree Ports safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Worktree Ports use?

Worktree Ports is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Worktree Ports use?

About 231 tokens (SKILL.md is roughly 924 characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Worktree Ports?

Skills that share tags, products or a category with Worktree Ports: Ccmanager Config (kbwo/ccmanager, 1.3k stars), DevSpace Manual QA Setup (Waishnav/devspace, 5.2k stars), Release Candidate Prep (openai/openai-agents-python, 30k stars) and Deep Review (dyad-sh/dyad, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Worktree Ports?

FranciscoMoretti (a GitHub user) maintains it in FranciscoMoretti/chat-js, which has 1,201 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 8, 2026.

Source: FranciscoMoretti/chat-js on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.