# Dev Server

> Monitor and auto-fix the development environment. Use when: debugging backend/frontend errors, watching log streams, diagnosing startup failures, or running make dev.

- **Type:** Skill
- **Install:** `agentstack add skill-benja-pauls-serpentstack-dev-server`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Benja-Pauls](https://agentstack.voostack.com/s/benja-pauls)
- **Installs:** 0
- **Category:** [Search](https://agentstack.voostack.com/c/search)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Benja-Pauls](https://github.com/Benja-Pauls)
- **Source:** https://github.com/Benja-Pauls/SerpentStack/tree/main/.skills/dev-server
- **Website:** https://www.npmjs.com/package/serpentstack

## Install

```sh
agentstack add skill-benja-pauls-serpentstack-dev-server
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Dev Server

## Starting the Dev Environment

```bash
make dev          # Starts Postgres, Redis, runs migrations, launches backend + frontend
make dev-docker   # Alternative: run everything in Docker
```

Backend: http://localhost:8000 · API docs: http://localhost:8000/api/docs
Frontend: http://localhost:5173

If `make dev` fails, check `docker compose ps` to verify Postgres is healthy.

## Error Detection Patterns

### Backend (FastAPI) — Structured JSON Logs

| Pattern | Meaning | Fix |
|---|---|---|
| `"level": "ERROR"` | Application error | Read `traceback`, `module`, `lineno` fields |
| `ModuleNotFoundError` | Missing dependency | `cd backend && uv add ` |
| `sqlalchemy.exc.OperationalError` | Database connection failed | Check Postgres is running, migrations are current |
| `sqlalchemy.exc.ProgrammingError: relation "X" does not exist` | Missing migration | `cd backend && uv run alembic upgrade head` |
| `pydantic.ValidationError` | Schema field mismatch | Compare request payload against Pydantic model |
| `ImportError: cannot import name 'X' from 'app.models'` | Model not exported | Add import to `backend/app/models/__init__.py` |

### Frontend (Vite/React)

| Pattern | Meaning | Fix |
|---|---|---|
| `TS\d{4}:` (e.g., `TS2345`) | TypeScript error | Read file path + line number from message |
| `[vite] Internal server error` | Build failure | Read full error below the message |
| `Module not found: Can't resolve` | Missing package | `cd frontend && npm install` or add the dependency |
| `Uncaught Error:` | React runtime error | Read component stack trace |
| `[hmr] Failed to reload` | HMR failure (usually syntax) | File path is in the message |

## Auto-Fix Workflow

When an error is detected:

1. **Classify**: syntax, type, import, runtime, or database error
2. **Locate**: extract file path and line number from the error output
3. **Check recent changes**: `git diff HEAD~1 -- `
4. **Read the file**: open at the relevant line, read 20 lines of surrounding context
5. **Fix**: apply the minimal change to resolve the error
6. **Verify**: wait for hot-reload, confirm the error is gone

## Verification

```bash
make verify   # Runs lint + typecheck + test for both backend and frontend
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Benja-Pauls](https://github.com/Benja-Pauls)
- **Source:** [Benja-Pauls/SerpentStack](https://github.com/Benja-Pauls/SerpentStack)
- **License:** MIT
- **Homepage:** https://www.npmjs.com/package/serpentstack

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-benja-pauls-serpentstack-dev-server
- Seller: https://agentstack.voostack.com/s/benja-pauls
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
