Skip to content
Skill Authoring
Skill

/environments-manager

Set up per-worktree environments for Claude Code, Cursor, or Codex. Use for worktree-ready repos, IDE environment config, worktree-up/down scripts, or dev.sh wiring.

From plugin
aiblueprint
26916 skills4 agents

Claude Code

$ npx -y skills add melvynx/aiblueprint --skill environments-manager --agent claude-code

SKILL.md

environments-manager.SKILL.md
name: environments-manager
description: Set up per-worktree environments for Claude Code, Cursor, or Codex. Use for worktree-ready repos, IDE environment config, worktree-up/down scripts, or dev.sh wiring.
disable-model-invocation: true
user-invocable: true

Ask before writing. Use the host's question UI. Shared logic lives in `scripts/*.sh`; IDE configs only point at those files. Read a matching `examples/` file before writing, then adapt.

1. Ask what a fresh worktree should do (multi-select): copy ignored env files; install deps; isolate or seed a data backend; run codegen. Capture extra project steps in one follow-up. 2. Ask the backend. PostgreSQL → [postgresql.md](references/postgresql.md). Convex → [convex.md](references/convex.md). None → skip isolation. Any other backend: research official docs and an in-repo example; do not guess CLI flags; summarize before editing. 3. Ask which IDEs to wire (Claude Code, Cursor, Codex). Generate `scripts/` once. Then load [claude.md](references/claude.md), [cursor.md](references/cursor.md), and/or [codex.md](references/codex.md) for linking config only.

Required files: `scripts/worktree-up.sh`, `scripts/worktree-down.sh`, `scripts/dev.sh` (all must end in `.sh`). Put them on the source checkout, not only the current worktree.

Resolve paths as `WORKTREE_PATH="${CODEX_WORKTREE_PATH:-${CURSOR_WORKTREE_PATH:-$(pwd)}}"` and `SOURCE_PATH="${CODEX_SOURCE_TREE_PATH:-${ROOT_WORKTREE_PATH:-}}"`. Claude: use `WorktreeCreate`, never `SessionStart`; the wrapper adds the worktree then runs `worktree-up.sh` with `ROOT_WORKTREE_PATH` — see [claude.md](references/claude.md). Hook wrappers must survive a missing `/dev/tty`, a wrong default Node version, and CLI prompts.

`worktree-up.sh` is idempotent: `set -euo pipefail`, cd to the worktree, then the selected steps in order. Prefer `.worktreeinclude` for Claude env copy. Detect the lockfile for install. Read resource names from env/config or setup metadata; never invent them from branch names. Provide a reset escape hatch via `<PROJECT>_RESET_<RESOURCE>=1`.

`worktree-down.sh` cleans only resources this setup created. Missing tools: print one line and exit 0.

`dev.sh` picks a free port from `${DEV_PORT_START:-3910}`. Never hardcode a port.

Never commit or log secrets. Never embed multi-line programs in IDE config. Never destroy or import production data unless the user set an override env var. Put this guard in any import/replay helper:

assert_non_prod_ref() {
  case "$1" in
    prod|prod:*|prod/*|production|production:*|production/*)
      echo "refusing prod source: $1" >&2; exit 1 ;;
    *prod*|*production*)
      [ "${ALLOW_PROD_SOURCE:-0}" = "1" ] || { echo "looks like prod: $1" >&2; exit 1; } ;;
  esac
}

Expose Dev, typecheck, unit tests, and lint through the IDE; add E2E only if cheap.

After writing: `bash -n` the three scripts, `git status --short`, and parse generated TOML/JSON when those files exist.

Read more
@melvynx
Ships withaiblueprint

Supercharge Claude Code and Codex with security hooks, reusable skills, a lightweight statusline, and workflow automation.

26916 skills4 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
269
Star history of melvynx/aiblueprint on GitHub, a chart by star-history.com

Other skills on aiblueprint.

update-config

update-config

Sync existing skills from ~/.claude/skills into this repo and refresh skills/ symlinks. Use when asked to update config, sync…

@melvynx@melvynxInstall Skill
fix-on-my-computer

fix-on-my-computer

Setup wizard that verifies Bun, installs dependencies, runs tests, and fixes failures until every test passes. Use when the…

@melvynx@melvynxInstall Skill
agents-manager

agents-manager

Create, edit, debug, and orchestrate Claude Code agents and Task-tool workflows. Use when writing agent files, configuring tools…

@melvynx@melvynxInstall Skill
apex

apex

Run adaptive APEX implementation with scoped delegation, durable checkpoints, risk-based tests and review, and proof-backed…

@melvynx@melvynxInstall Skill
app-icon

app-icon

Generate a vibrant dimensional iOS and Android app icon, then post-process it for store specs. Use for creating, regenerating, or…

@melvynx@melvynxInstall Skill
appstore-connect

appstore-connect

Drive App Store Connect through the asc CLI for apps, builds, TestFlight, reviews, sales, metadata, IAP, signing, and…

@melvynx@melvynxInstall Skill

More skills from other plugins.

gstack-openclaw-ceo-review

gstack-openclaw-ceo-re…

Use when asked to review a plan, challenge a proposal, run a CEO review, poke holes in an approach, think bigger about scope, or…

gstack3w138k
@garrytan@garrytanInstall Skill
book-to-skill

book-to-skill

Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…

@virgiliojr94@virgiliojr94Install Skill
distilly

distilly

Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…

@titanwings@titanwingsInstall Skill

Questions about environments-manager.

Which coding agents can use environments-manager?
environments-manager installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.