搜索

PythonReactSEOPDF
GitHub Skill

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.

sydevs☆ 0 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 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/me endpoint
  • Logs: .claude/skills/dev-server/state/server.log

URLs

Once running:

Admin Credentials

How It Works

The skill uses PID-based state tracking to ensure a single server across all Claude instances:

  1. PID File: Tracks running server process
  2. Stale Detection: Cleans up if process died
  3. Port Check: Detects conflicts with other processes
  4. 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 logs command)
  • After configuration changes (use restart command)
  • When switching branches or pulling changes (use restart command)

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!