Use when adding new error messages to React, or seeing "unknown error code" warnings.
npx skills add 5hanth/zdev-skill
Or install specific skill: npx add-skill https://github.com/5hanth/zdev-skill
# Description
Manage isolated dev environments with git worktrees, auto ports, and preview URLs
# SKILL.md
name: zdev
description: Manage isolated dev environments with git worktrees, auto ports, and preview URLs
zdev Skill
Use zdev to manage isolated development environments when working on features. Each feature gets its own git worktree, ports, and optional public preview URL.
Prerequisites
zdevCLI installed (bunx zdevorbun add -g zdev)- Vite-based frontend project (Convex backend is optional, auto-detected)
Creating a New Project
# Basic TanStack Start project
zdev create my-app
# With Convex backend
zdev create my-app --convex
# Flat structure (no monorepo)
zdev create my-app --flat
Creates:
- TanStack Start app with clean routes
- .zdev/setup.sh for worktree setup
- Agentation for UI feedback (dev only)
Initializing an Existing Project
zdev init /path/to/project
Creates .zdev/project.json with project metadata.
Configuration
First-time setup (or to change settings):
zdev config --set devDomain=dev.example.com
zdev config --set traefikConfigDir=/etc/traefik/dynamic
zdev config --list
Before Starting Any Feature
# Check what's already running
zdev list
If your feature already exists, just cd to the worktree path shown.
Starting a New Feature
# Start feature with public URL
zdev start <feature-name> -p /path/to/project
# Start without public URL (local only)
zdev start <feature-name> -p /path/to/project --local
# Start with seed data (Convex projects)
zdev start <feature-name> -p /path/to/project --seed
# Use different base branch
zdev start <feature-name> -p /path/to/project --base-branch main
After starting:
1. .zdev/setup.sh runs automatically (installs deps, etc.)
2. Note the worktree path (e.g., ~/.zdev/worktrees/project-feature)
3. Note the local URL (e.g., http://localhost:5173)
4. Note the public URL if available (e.g., https://project-feature.dev.example.com)
5. cd to the worktree path to begin work
While Working
You're in an isolated git worktree with its own:
- Branch (feature/<name>)
- Node modules
- Convex dev instance (if applicable)
- Port allocation
Work normally. Commit often. Push when ready for review.
git add .
git commit -m "description"
git push -u origin feature/<name>
Stopping Work (End of Session)
# Stop servers but keep worktree (resume later)
zdev stop <feature-name> -p /path/to/project --keep
# Or just leave it running if you'll be back soon
Resuming Work
# Check status
zdev list
# If stopped, restart
zdev start <feature-name> -p /path/to/project
# If already running, just cd to the worktree
cd ~/.zdev/worktrees/project-feature
Presenting Output
When showing zdev output to users:
- Never put URLs inside markdown tables or code blocks — they won't be clickable
- Place URLs on their own line as plain text
- Use bold labels before URLs, not inline formatting
Example:
**Local:** http://localhost:5185
**Public:** https://project-feature.dev.example.com
NOT like this:
| Local | `http://localhost:5185` | ← URLs not clickable!
Creating a Pull Request
# Create PR with auto-generated title and preview URL
zdev pr -p /path/to/project
# Create PR with custom title
zdev pr -p /path/to/project --title "Add user authentication"
# Create draft PR
zdev pr -p /path/to/project --draft
# Open PR in browser instead of CLI
zdev pr -p /path/to/project --web
The PR body automatically includes the preview URL.
After PR is Merged
# Clean up completely
zdev clean <feature-name> -p /path/to/project
This removes the worktree, Traefik route, and port allocation.
Quick Reference
| Task | Command |
|---|---|
| Create new project | zdev create NAME |
| Init existing project | zdev init PATH |
| Configure | zdev config --list |
| See what's running | zdev list |
| Start feature | zdev start NAME -p PATH |
| Create PR | zdev pr -p PATH |
| Stop (keep files) | zdev stop NAME -p PATH --keep |
| Stop (full) | zdev stop NAME -p PATH |
| Remove after merge | zdev clean NAME -p PATH |
Troubleshooting
"Feature already exists" → It's already running. Use zdev list to find the worktree path.
"Failed to create worktree: invalid reference" → Use --base-branch master or the correct branch name.
Port conflict → Specify a port: zdev start NAME --port 5200
No public URL → Run zdev config --set devDomain=dev.example.com first.
Convex not working → Run bunx convex dev once in the main project first to select a Convex project.
Vite "host not allowed" / 403 on preview URL → zdev start auto-patches vite.config.ts with server.allowedHosts using the configured devDomain. If it didn't work: check zdev config --list has devDomain set, and that your vite config uses defineConfig({}) or export default {}.
# README.md
zdev-skill
Agent skill for zdev — multi-agent worktree development environment.
What is this?
This skill teaches AI coding agents (Claude Code, Clawdbot, etc.) how to use zdev for managing isolated development environments with git worktrees, automatic port allocation, and public preview URLs.
Installation
Claude Code
npx add-skill 5hanth/zdev-skill
Then in Claude Code:
/zdev
Clawdbot
Add to your Clawdbot skills directory:
git clone https://github.com/5hanth/zdev-skill ~/.clawdbot/skills/zdev
Other Agents
Copy the contents of SKILL.md into your agent's system prompt or context.
Usage
Once installed, prompt your agent:
Use zdev to create a new TanStack Start project called my-app with Convex backend.
Use zdev to start a worktree for add-auth feature on ./my-project
Run zdev list to show what's currently running.
Use zdev clean to remove the add-auth worktree after the PR is merged.
What the Agent Learns
zdev create— Scaffold new TanStack Start projectszdev init— Initialize existing projectszdev start— Create isolated worktrees with auto port allocationzdev list— Check running worktreeszdev stop— Stop serverszdev clean— Remove worktrees after PR mergezdev config— Configure Traefik for public URLs
Requirements
Related
- zdev — The CLI tool
- Clawdbot — AI agent platform
- Claude Code — Anthropic's coding agent
License
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.