Summary
The localdev plugin gives Claude a systematic approach to setting up and verifying local development environments. Instead of ad-hoc "try running npm install," it detects the full stack, checks prerequisites, runs setup steps in order, and verifies everything works. This is valuable because local dev setup is the #1 pain point when onboarding to a project and Claude's default behavior is to try one thing at a time reactively.
Original Intent
Plugin that configures Claude Code with local development workflow — which services to start and restart, which data to seed or clear, how to hard reset, clear cache, how to check requirements, debug across stack, etc.
Commands
/localdev:setup
Purpose: Analyze the project and perform full local environment setup.
Behavior:
-
Detect project stack by scanning for manifest/config files:
| File |
Detects |
Setup Action |
package.json + bun.lockb |
Bun project |
bun install |
package.json + package-lock.json |
Node/npm project |
npm ci |
package.json + yarn.lock |
Yarn project |
yarn install --frozen-lockfile |
package.json + pnpm-lock.yaml |
pnpm project |
pnpm install --frozen-lockfile |
pyproject.toml |
Python project |
uv sync or pip install -e . |
requirements.txt |
Python (legacy) |
uv pip install -r requirements.txt |
go.mod |
Go project |
go mod download |
Cargo.toml |
Rust project |
cargo build |
Gemfile |
Ruby project |
bundle install |
docker-compose.yml |
Docker services |
docker compose up -d |
Makefile |
Make targets |
Check for setup / install target |
-
Check prerequisites — verify required tools are installed:
- Runtime version matches (
.node-version, .python-version, .tool-versions, rust-toolchain.toml)
- Docker running if docker-compose present
- Database CLI tools if migrations detected
-
Environment setup:
- Copy
.env.example → .env if .env doesn't exist
- Warn about any missing required env vars
-
Install dependencies in detected order (backend before frontend in monorepos)
-
Database setup (if detected):
- Check if database is reachable (parse connection string from
.env)
- Run migrations:
prisma migrate dev (Prisma)
alembic upgrade head (SQLAlchemy)
diesel migration run (Diesel)
rake db:migrate (Rails)
knex migrate:latest (Knex)
- Run seed if seed script/file detected
-
Verify setup:
- Run test suite (quick sanity check, first 5 tests or smoke tests)
- Start dev server and check if it responds
- Report results
-
Output setup summary:
Local Dev Setup Complete
✓ Dependencies installed (bun install — 142 packages)
✓ Environment configured (.env created from .env.example)
✓ Database migrated (3 pending migrations applied)
✓ Seed data loaded (15 records)
✓ Tests passing (23/23)
✓ Dev server starts (http://localhost:3000)
Commands:
bun run dev — Start development server
bun test — Run tests
bun run build — Build for production
Edge cases:
- Monorepo (Turborepo, Nx, Lerna) → detect workspace structure, setup in dependency order
- Multiple services (microservices) → setup each, document inter-service dependencies
- Missing runtime version → offer to install via asdf/nvm/pyenv
- Setup script already exists (
scripts/setup.sh, make setup) → prefer running it over custom logic
/localdev:check
Purpose: Health-check the local environment and diagnose issues.
Behavior:
- Run the same detection as
setup but in verify-only mode
- Check each component:
Environment Health Check
Runtime & Tools
✓ bun 1.3.8 (matches .tool-versions)
✓ node 22.22.0 (matches .node-version)
✗ python — not found (required by scripts/analyze.py)
Dependencies
✓ node_modules/ exists and up-to-date
⚠ bun.lockb is newer than node_modules — run `bun install`
Environment
✓ .env exists
✗ Missing: REDIS_URL (defined in .env.example)
Services
✓ PostgreSQL — responding on localhost:5432
✗ Redis — not responding on localhost:6379
✓ Docker — running (3 containers up)
Database
✓ Connected to myapp_dev
⚠ 2 pending migrations
Ports
✓ 3000 — available (dev server)
✗ 5173 — in use by PID 12345 (vite)
- For each failure, provide a fix command
- Offer to auto-fix what can be fixed
Edge cases:
- Database not reachable → suggest starting Docker or checking connection string
- Port in use → identify the process and offer to kill it (with user confirmation)
- Stale lock file → suggest removing and reinstalling
/localdev:reset (new)
Purpose: Hard reset local environment to clean state.
Behavior:
- Ask user what to reset (with checkboxes):
- Confirm with user before destructive operations:
⚠ This will:
- Remove node_modules/ (142 packages)
- Drop database myapp_dev (15 tables, ~2300 rows)
- Remove .next/ cache (48 MB)
Proceed? [y/N]
- Execute selected resets in order
- Re-run
/localdev:setup to rebuild
- Output: summary of what was reset and rebuilt
Edge cases:
- User selects git reset but has uncommitted work → extra strong warning
- Database reset fails (other connections) → suggest closing other connections first
Hooks
None — this plugin operates through commands only. (Considered a hook on project open, but that would be too intrusive.)
File Manifest
| File |
Est. Lines |
Purpose |
commands/setup.md |
120-150 |
Full environment setup |
commands/check.md |
90-110 |
Health check and diagnosis |
commands/reset.md |
80-100 |
Hard reset to clean state |
README.md |
160-200 |
Full plugin documentation |
.claude-plugin/plugin.json |
15-20 |
Plugin manifest |
README Outline
- Overview — What localdev does: systematic setup, health checking, and reset
- Quick Start — Installation +
/localdev:check to see current state
- Commands — Table with all 3 commands
- Detection Matrix — Full table of what the plugin detects and how
- Database Support — Supported ORMs/migration tools
- Monorepo Support — How workspace detection works
- Customization — How to add project-specific setup steps
- Troubleshooting — Common issues and fixes
Prerequisites
- No external tools required — the plugin detects and uses whatever's available
- Project-specific tools (Docker, database CLIs, etc.) are checked and reported
Quality Checklist
Summary
The
localdevplugin gives Claude a systematic approach to setting up and verifying local development environments. Instead of ad-hoc "try running npm install," it detects the full stack, checks prerequisites, runs setup steps in order, and verifies everything works. This is valuable because local dev setup is the #1 pain point when onboarding to a project and Claude's default behavior is to try one thing at a time reactively.Original Intent
Commands
/localdev:setupPurpose: Analyze the project and perform full local environment setup.
Behavior:
Detect project stack by scanning for manifest/config files:
package.json+bun.lockbbun installpackage.json+package-lock.jsonnpm cipackage.json+yarn.lockyarn install --frozen-lockfilepackage.json+pnpm-lock.yamlpnpm install --frozen-lockfilepyproject.tomluv syncorpip install -e .requirements.txtuv pip install -r requirements.txtgo.modgo mod downloadCargo.tomlcargo buildGemfilebundle installdocker-compose.ymldocker compose up -dMakefilesetup/installtargetCheck prerequisites — verify required tools are installed:
.node-version,.python-version,.tool-versions,rust-toolchain.toml)Environment setup:
.env.example→.envif.envdoesn't existInstall dependencies in detected order (backend before frontend in monorepos)
Database setup (if detected):
.env)prisma migrate dev(Prisma)alembic upgrade head(SQLAlchemy)diesel migration run(Diesel)rake db:migrate(Rails)knex migrate:latest(Knex)Verify setup:
Output setup summary:
Edge cases:
scripts/setup.sh,make setup) → prefer running it over custom logic/localdev:checkPurpose: Health-check the local environment and diagnose issues.
Behavior:
setupbut in verify-only modeEdge cases:
/localdev:reset(new)Purpose: Hard reset local environment to clean state.
Behavior:
/localdev:setupto rebuildEdge cases:
Hooks
None — this plugin operates through commands only. (Considered a hook on project open, but that would be too intrusive.)
File Manifest
commands/setup.mdcommands/check.mdcommands/reset.mdREADME.md.claude-plugin/plugin.jsonREADME Outline
/localdev:checkto see current statePrerequisites
Quality Checklist