start-local
Start local development environment with auto-detected services in a persistent tmux session
Best use case
start-local is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Start local development environment with auto-detected services in a persistent tmux session
Teams using start-local should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/start-local/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How start-local Compares
| Feature / Agent | start-local | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Start local development environment with auto-detected services in a persistent tmux session
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# /start-local - Start Local Development Environment in tmux
Start local development environment with auto-detected services in a persistent tmux session.
## Usage
```bash
/start-local # Uses .env or .env.development
/start-local staging # Uses .env.staging
/start-local production # Uses .env.production
```
## Process
### Step 1: Determine Environment
```bash
ENVIRONMENT=${1:-development}
ENV_FILE=".env.${ENVIRONMENT}"
# Fallback to .env if specific file doesn't exist
if [ ! -f "$ENV_FILE" ] && [ "$ENVIRONMENT" = "development" ]; then
ENV_FILE=".env"
fi
if [ ! -f "$ENV_FILE" ]; then
echo "❌ Environment file not found: $ENV_FILE"
ls -1 .env* 2>/dev/null
exit 1
fi
```
### Step 2: Detect Project Type
```bash
detect_project_type() {
if [ -f "package.json" ]; then
grep -q "\"next\":" package.json && echo "nextjs" && return
grep -q "\"vite\":" package.json && echo "vite" && return
grep -q "\"react-scripts\":" package.json && echo "cra" && return
grep -q "\"@vue/cli\":" package.json && echo "vue" && return
echo "node"
elif [ -f "requirements.txt" ] || [ -f "pyproject.toml" ]; then
grep -q "django" requirements.txt pyproject.toml 2>/dev/null && echo "django" && return
grep -q "flask" requirements.txt pyproject.toml 2>/dev/null && echo "flask" && return
echo "python"
elif [ -f "Cargo.toml" ]; then
echo "rust"
elif [ -f "go.mod" ]; then
echo "go"
else
echo "unknown"
fi
}
PROJECT_TYPE=$(detect_project_type)
```
### Step 3: Detect Required Services
```bash
NEEDS_SUPABASE=false
NEEDS_POSTGRES=false
NEEDS_REDIS=false
[ -f "supabase/config.toml" ] && NEEDS_SUPABASE=true
grep -q "postgres" "$ENV_FILE" 2>/dev/null && NEEDS_POSTGRES=true
grep -q "redis" "$ENV_FILE" 2>/dev/null && NEEDS_REDIS=true
```
### Step 4: Generate Random Port
```bash
DEV_PORT=$(shuf -i 3000-9999 -n 1)
while lsof -i :$DEV_PORT >/dev/null 2>&1; do
DEV_PORT=$(shuf -i 3000-9999 -n 1)
done
```
### Step 5: Create tmux Session
```bash
PROJECT_NAME=$(basename "$(pwd)")
BRANCH=$(git branch --show-current 2>/dev/null || echo "main")
TIMESTAMP=$(date +%s)
SESSION="dev-${PROJECT_NAME}-${TIMESTAMP}"
tmux new-session -d -s "$SESSION" -n servers
```
### Step 6: Start Services
```bash
PANE_COUNT=0
# Main dev server
case $PROJECT_TYPE in
nextjs|vite|cra|vue)
tmux send-keys -t "$SESSION:servers.${PANE_COUNT}" "PORT=$DEV_PORT npm run dev 2>&1 | tee dev-server-${DEV_PORT}.log" C-m
;;
django)
tmux send-keys -t "$SESSION:servers.${PANE_COUNT}" "python manage.py runserver $DEV_PORT 2>&1 | tee dev-server-${DEV_PORT}.log" C-m
;;
flask)
tmux send-keys -t "$SESSION:servers.${PANE_COUNT}" "FLASK_RUN_PORT=$DEV_PORT flask run 2>&1 | tee dev-server-${DEV_PORT}.log" C-m
;;
*)
tmux send-keys -t "$SESSION:servers.${PANE_COUNT}" "PORT=$DEV_PORT npm run dev 2>&1 | tee dev-server-${DEV_PORT}.log" C-m
;;
esac
# Additional services (if needed)
if [ "$NEEDS_SUPABASE" = true ]; then
PANE_COUNT=$((PANE_COUNT + 1))
tmux split-window -v -t "$SESSION:servers"
tmux send-keys -t "$SESSION:servers.${PANE_COUNT}" "supabase start" C-m
fi
if [ "$NEEDS_POSTGRES" = true ] && [ "$NEEDS_SUPABASE" = false ]; then
PANE_COUNT=$((PANE_COUNT + 1))
tmux split-window -v -t "$SESSION:servers"
tmux send-keys -t "$SESSION:servers.${PANE_COUNT}" "docker-compose up postgres" C-m
fi
if [ "$NEEDS_REDIS" = true ]; then
PANE_COUNT=$((PANE_COUNT + 1))
tmux split-window -v -t "$SESSION:servers"
tmux send-keys -t "$SESSION:servers.${PANE_COUNT}" "redis-server" C-m
fi
tmux select-layout -t "$SESSION:servers" tiled
```
### Step 7: Create Additional Windows
```bash
# Logs window
tmux new-window -t "$SESSION" -n logs
tmux send-keys -t "$SESSION:logs" "tail -f dev-server-${DEV_PORT}.log 2>/dev/null || sleep infinity" C-m
# Work window
tmux new-window -t "$SESSION" -n work
# Git window
tmux new-window -t "$SESSION" -n git
tmux send-keys -t "$SESSION:git" "git status" C-m
```
### Step 8: Save Metadata
```bash
cat > .tmux-dev-session.json <<EOF
{
"session": "$SESSION",
"project_name": "$PROJECT_NAME",
"branch": "$BRANCH",
"type": "$PROJECT_TYPE",
"environment": "$ENVIRONMENT",
"env_file": "$ENV_FILE",
"dev_port": $DEV_PORT,
"created": "$(date -Iseconds)"
}
EOF
```
### Step 9: Display Summary
```bash
echo ""
echo "✨ Dev Environment Started: $SESSION"
echo ""
echo "Environment: $ENVIRONMENT ($ENV_FILE)"
echo "Dev Server: http://localhost:$DEV_PORT"
[ "$NEEDS_SUPABASE" = true ] && echo "Supabase: http://localhost:54321"
echo ""
echo "Attach: tmux attach -t $SESSION"
echo "Detach: Ctrl+a d"
echo "Status: /tmux-status"
echo ""
```
## Notes
- Auto-detects framework/stack from project files
- Auto-detects services from .env and config files
- Random ports prevent conflicts
- Session persists across disconnects
- Metadata saved to `.tmux-dev-session.json`Related Skills
tanstack-start
TanStack Start full-stack React framework patterns. Use when working with file-based routing, API routes, server handlers, TanStack Router layouts, or integrating AI/MCP features in this codebase.
supastarter-nextjs-skill
Guides development with supastarter for Next.js only (not Vue/Nuxt): tech stack, setup, configuration, database (Prisma), API (Hono/oRPC), auth (Better Auth), organizations, payments (Stripe), AI, customization, storage, mailing, i18n, SEO, deployment, background tasks, analytics, monitoring, E2E. Use when building or modifying supastarter Next.js apps, adding features, or when the user mentions supastarter Next.js, Prisma, oRPC, Better Auth, or related Next.js stack topics.
start
Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work
solidstart-websocket
SolidStart WebSocket: experimental WebSocket endpoints, connection handling, message events, real-time communication, bidirectional data flow.
solidstart-api-routes
SolidStart API routes: export GET/POST/PATCH/DELETE functions, handle APIEvent with request/params/fetch, GraphQL and tRPC integration, session management.
software-localisation
Production-grade i18n/l10n patterns for React, Vue, Angular, Next.js, and Node.js. Covers library selection (i18next/react-i18next, FormatJS/react-intl, next-intl, vue-i18n, @angular/localize, Lingui, typesafe-i18n), ICU message format, RTL support, locale routing/detection, TMS integration, string extraction, and CI/CD translation workflows. Use when setting up or debugging localisation in a codebase.
setup-tanstack-start
Bootstrap a new web project with TanStack Start, React, Tailwind CSS v4, and shadcn/ui on top of the base tooling stack. Consult this skill whenever creating a web app, setting up a frontend project, starting a React application, or initializing anything involving TanStack Start, TanStack Router, TanStack Query, Tailwind, shadcn, or Vite.
session-start
Initialize a new mission with role selection and persona naming
session-start-routine
Execute work session initialization routine at conversation start. Identifies new skills, researches improvements for existing skills, and updates skill library. Triggers automatically at session start.
polaris-local-forge
**[REQUIRED]** Use for **ALL** requests involving local Apache Polaris: setup, API queries, catalog operations, cleanup, teardown. **AUTO-ACTIVATE:** If `.snow-utils/snow-utils-manifest.md` contains `polaris-local-forge:` this skill MUST handle ALL operations including cleanup. **DO NOT** use `polaris` CLI (does not exist), curl to Polaris endpoints (needs OAuth), or docker ps checks - invoke this skill first. Triggers: polaris local, local iceberg catalog, local polaris setup, rustfs setup, create polaris cluster, try polaris locally, get started with polaris, apache polaris quickstart, polaris dev environment, local data lakehouse, replay from manifest, reset polaris catalog, teardown polaris, clean up, cleanup, delete cluster, remove resources, polaris status, list catalogs, show namespaces, list tables, show catalog, describe table, list principals, show principal roles, list views, polaris namespaces, polaris catalogs, query data, query table, query iceberg, query catalog data, show my data, show table data, show records, how many rows, count rows, count records, run sql, run query, duckdb query, select from, group by, aggregate.
nextjs-supabase-starter
Rules and best practices for building a Next.js starter app with Supabase (auth, profiles, RLS, declarative schemas, setup script). Use when working on Next.js + Supabase integration, authentication, migrations, or this starter app codebase.
local-qa
Run local QA for the repository. Use when asked to run formatting, linting, or pre-commit checks, when verifying local QA, or whenever any file has been updated and local QA should be re-run.