Skip to content
cccskills
FreePublished on GitHub

server-startup

開発サーバー・E2E・ブラウザ検証時に使用。既存プロセスを停止してからプロジェクト指定ポートで起動し、作業後に必ず停止する。

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md5.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Server Startup Skill - 開発サーバー起動

禁止事項(最重要)

以下は絶対に禁止。違反は許容されない。

  • ポート変更禁止: プロジェクトで指定されたポート以外での起動は禁止
  • ポート競合時に別ポート使用禁止: 必ず既存プロセスを停止する
  • 片方だけの起動禁止: 再起動時はフロントエンド・バックエンド両方を必ず再起動する
  • 停止確認省略禁止: 作業完了後はポートがLISTENしていないことまで確認する

適用対象

以下の作業では、必ずこのスキルを使用する。

  • 開発サーバーの起動・再起動
  • E2Eテスト
  • ブラウザ検証
  • UI実装後の動作確認
  • API疎通確認

worktree内で作業している場合は、worktree-parallel スキルで渡されたポートレジストリ(メインチェックアウト直下の .worktrees/.ports.json)で割り当てられたポートを「プロジェクト指定ポート」として扱う。

再起動手順(必須)

サーバーを使う作業の開始時は、必ず以下の手順を順番に実行すること。

Step 1: 既存プロセスの停止(毎回必ず実行)

起動前に必ず既存プロセスを確認し、動いていれば停止する。 この手順をスキップしてはならない。

Windows(MSYS/Git Bash):

# ポート確認と停止
netstat -ano | grep ":[PORT] " | grep LISTENING
# LISTENINGがあれば → taskkill //PID <PID> //F(Git Bash では `/PID` が MSYS のパス変換で壊れるので `//` と書く。詳細は documents/development/windows-shell.md)

Windows(PowerShell):

$connections = Get-NetTCPConnection -LocalPort [PORT] -State Listen -ErrorAction SilentlyContinue
$connections | Select-Object -ExpandProperty OwningProcess -Unique | ForEach-Object {
  Stop-Process -Id $_ -Force
}

macOS / Linux:

# ポート確認と停止
lsof -i :[PORT]
# プロセスがあれば → kill -9 <PID>

なぜ必須か: 古いプロセスが残っていると、新しいプロセスがEADDRINUSEで起動失敗し、 古い(コード変更が反映されていない)サーバーが動き続ける。

Step 2: バックエンド起動

プロジェクトの CLAUDE.md に記載されたバックエンド起動コマンドを実行する。 worktree内では、渡されたポートレジストリのバックエンド割当ポートを使用する。

Step 3: フロントエンド起動

プロジェクトの CLAUDE.md に記載されたフロントエンド起動コマンドを実行する。 worktree内では、渡されたポートレジストリのフロントエンド割当ポートを使用する。

Step 4: 起動確認(両方確認すること)

バックエンド・フロントエンドの両方がレスポンスを返すことを確認する。

両方が正常応答するまで起動完了とみなさない。

Step 5: 起動失敗時のログ確認

バックグラウンド実行したコマンドの出力を必ず確認し、 EADDRINUSE、FAILED TO START、Error 等がないことを確認する。


サーバー停止手順(作業完了後に必須)

E2Eテストやサーバーを使う作業が完了したら、必ずサーバーを停止すること。 サーバーを起動したまま放置すると、プロセスが大量に残りリソースを消費する。

停止手順

Windows(MSYS/Git Bash):

netstat -ano | grep ":[PORT] " | grep LISTENING
# LISTENINGがあれば → taskkill //PID <PID> //F //T(`//` の理由は同上)
# 停止後は netstat -ano | grep ":[PORT] .*LISTEN" が空になることでポート解放を確認する

Windows(PowerShell):

$connections = Get-NetTCPConnection -LocalPort [PORT] -State Listen -ErrorAction SilentlyContinue
$connections | Select-Object -ExpandProperty OwningProcess -Unique | ForEach-Object {
  Stop-Process -Id $_ -Force
}

macOS / Linux:

lsof -i :[PORT] -t | xargs kill -9

停止確認(必須)

停止後、ポートがLISTENしていないことを確認する。

Windows(PowerShell):

Get-NetTCPConnection -LocalPort [PORT] -State Listen -ErrorAction SilentlyContinue
# 何も表示されなければ停止完了

macOS / Linux:

lsof -i :[PORT]
# 何も表示されなければ停止完了

チェックリスト

  • 起動前に既存プロセスを確認した
  • 既存プロセスがあれば停止した
  • プロジェクト指定ポート、またはworktree割当ポートで起動した
  • 起動ログに EADDRINUSE や起動失敗がないことを確認した
  • 作業完了後にサーバーを停止した
  • 停止後、ポートがLISTENしていないことを確認した

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

バックエンド実装時に使用。DRY原則遵守。コーディング規約準拠。

The English summary is being prepared. Showing the original description.

Crearize/ai-dev-helm5Updated Oct 12, 2026

Use before implementing any feature, behavior change, or refactor - settles requirements and design, then gets the design independently reviewed and approved by the user before code is written

The English summary is being prepared. Showing the original description.

Crearize/ai-dev-helm5Updated Oct 12, 2026

作業開始時に使用。mainブランチでの作業禁止。Issue先行作成必須。

The English summary is being prepared. Showing the original description.

Crearize/ai-dev-helm5Updated Oct 12, 2026

UI実装後の検証時に使用。agent-browser CLIでブラウザ上の動作を手動検証する。「UIを確認」「画面テスト」と言われたら使用(プロジェクトの E2E スイート実行は quality-check Step 5(推奨度・範囲で自動実施または確認)/ server-startup が担当)。

The English summary is being prepared. Showing the original description.

Crearize/ai-dev-helm5Updated Oct 12, 2026

DBマイグレーション作成時に使用。バージョン番号競合防止。mainブランチ確認必須。

The English summary is being prepared. Showing the original description.

Crearize/ai-dev-helm5Updated Oct 12, 2026

Use when independent tasks benefit from parallel work without shared state or sequential dependencies

The English summary is being prepared. Showing the original description.

Crearize/ai-dev-helm5Updated Oct 12, 2026

See all skills by Crearize

Report a problem with this skill