dev-server
Manage the development server lifecycle. Use when starting, stopping, restarting the dev server, checking server status, viewing server logs, or before testing changes that require a running server.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Dev Server Management
This skill manages the development server for this Next.js/PayloadCMS project. It ensures a single server instance is shared across all Claude Code sessions.
Quick Start
# Default: Start server (if needed) + show 100 lines + tail logs
.claude/skills/dev-server/dev-server.sh
Commands
| Command | Description |
|---|---|
| (none) | Default: Start if needed, show last 100 lines, tail logs |
start |
Start server if not running |
stop |
Stop server gracefully |
restart |
Stop and start server |
status |
Show server status and health |
logs [N] |
Show last N lines (default 100) and tail |
health |
Quick health check |
Usage Examples
# Default - most common usage
.claude/skills/dev-server/dev-server.sh
# Start without tailing logs
.claude/skills/dev-server/dev-server.sh start
# Check if server is running and healthy
.claude/skills/dev-server/dev-server.sh status
# View logs only
.claude/skills/dev-server/dev-server.sh logs
# Restart after config changes
.claude/skills/dev-server/dev-server.sh restart
# Stop when done
.claude/skills/dev-server/dev-server.sh stop
Server Details
- Port: 3000 (configurable via PORT env var)
-
Start Command:
pnpm devsafe(cleans .next before starting) -
Health Check:
/api/managers/meendpoint -
Logs:
.claude/skills/dev-server/state/server.log
URLs
Once running:
- App: http://localhost:3000
- Admin: http://localhost:3000/admin
Admin Credentials
- Email: contact@sydevelopers.com
- Password: evk1VTH5dxz_nhg-mzk
How It Works
The skill uses PID-based state tracking to ensure a single server across all Claude instances:
- PID File: Tracks running server process
- Stale Detection: Cleans up if process died
- Port Check: Detects conflicts with other processes
- Health Check: Waits up to 60s for server to be healthy
When to Use
- Before testing any changes that require a running server
- When debugging server issues (use
logscommand) - After configuration changes (use
restartcommand) - When switching branches or pulling changes (use
restartcommand)
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!