Skip to content
Back to skills

Worktree Ports

ASecurity

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.

  • 1,206 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added August 31, 2026
ai-agentstestingdebugging

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 20, 2026

npx -y skills add FranciscoMoretti/chat-js --skill worktree-ports --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Worktree Ports?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Worktree Ports
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/franciscomoretti-worktree-ports/badge)](https://www.skillsdirectory.com/skills/franciscomoretti-worktree-ports)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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/`.

Files in this skill

  • SKILL.md929 B
  • assets/worktree-env.schema.json1.6 KB
  • scripts/worktree-env.ts1.6 KB
  • scripts/worktree-runtime.test.ts3.2 KB
  • scripts/worktree-runtime.ts4.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.