rebuild
Skill44 starsChanged 16 days agoMITView on GitHub
サーバーをリビルドして再起動する。「リビルド」「再起動」「サービス再起動」「本番環境を再起動」「ビルドして起動」などの指示で使用する。
- Reads credentials
4 other projects use a version of this.
Adopted by
Most recently taken up by
- ascaniolocorotondo/rebuildtheir own version, first seen Nov 8, 2026
- laaielichter/Reverseporttheir own version, first seen Oct 20, 2026
- ray-project/raytheir own version, first seen Oct 8, 2026
- angelgabrieljacintohuayllasco/clipboard-skillstheir own version, first seen Sep 20, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- ray-project/ray★ 44ksame name
- laaielichter/Reverseport★ 18same name
- ascaniolocorotondo/rebuild★ 1same name
- angelgabrieljacintohuayllasco/clipboard-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- website/llms.txtllms.txt
- cmate-verifySkill
- demo-videoSkill
- video-to-gifSkill
- catalog-reconcileSkill
- cmate-verifySkill
- demo-videoSkill
- orchestrate-monitorSkill
- release-postSkill
- releaseSkill
- video-to-gifSkill
The file
Files
Rebuild
サーバーを停止し、ビルドしてバックグラウンドで再起動します。
⚠️ 最初に決めること: ビルドは要るのか(Issue #2132)
ビルドは「アプリケーションのコードが変わったとき」だけ必要です。
npm run build は .next/BUILD_ID を書き換えるため、開いているブラウザタブが chunk を取得できなくなって壊れます
(.commandmate/verify.yaml が skipInPrimaryCheckout: true でビルドを外しているのと同じ理由)。
| 状況 | 使うもの | ビルド |
src/ などコードを変更した | このスキル(build-and-start.sh --daemon) | する |
.env / 設定だけ変えた | ./scripts/restart-nobuild.sh | しない |
| クラッシュしたサーバーを復帰させたい | ./scripts/restart-nobuild.sh | しない |
| 停止中のサーバーを起こすだけ | ./scripts/start.sh --daemon | しない |
ビルド不要と判断したら Step 2 の代わりに次を 1 回の Bash 呼び出しで実行し、完了報告形式はそのまま使う:
cd {TARGET_DIR} && ./scripts/restart-nobuild.sh
cd {TARGET_DIR} && CM_PORT={port} ./scripts/restart-nobuild.sh # ポート指定あり手製の nohup npm start を使わないこと。 その前に source scripts/load-env.sh を叩く形になりますが、
このスクリプトは bash 専用で、zsh から source すると .env を 1 変数も読み込みません
(Issue #2132 以降はエラーで失敗しますが、正しい手段は上記の 2 スクリプトです)。
使用方法
/rebuild # 現在のリポジトリで実行
/rebuild feature/235-worktree # 指定ブランチのWorktreeで実行
/rebuild --port 3011 # ポート3011で起動
/rebuild feature/235-worktree --port 3011 # ブランチ指定+ポート指定パラメータ
- branch_name: 対象ブランチ名(省略可)。指定時は
git worktree listからディレクトリを解決する。 - --port {number}: 起動ポート番号(省略可)。指定時は
CM_PORT環境変数を設定してサーバーを起動する。未指定時はデフォルト(3000)。
実行手順
Step 1: 実行ディレクトリの決定
- ブランチ名が指定された場合:
git worktree listを実行し、指定ブランチに対応するディレクトリを取得する- 見つからない場合はエラー終了(「ブランチ '{branch_name}' に対応するWorktreeが見つかりません」)
- 見つかったディレクトリを
TARGET_DIRとする
- ブランチ名が未指定の場合:
- 現在の作業ディレクトリ(プロジェクトルート)を
TARGET_DIRとする
- 現在の作業ディレクトリ(プロジェクトルート)を
Step 2: サーバー停止・ビルド・再起動
停止とビルド・再起動を 1回のBash呼び出し で実行する(ユーザーへの許可確認を1回に抑えるため)。
ポート指定なしの場合:
cd {TARGET_DIR} && ./scripts/stop.sh && ./scripts/build-and-start.sh --daemonポート指定ありの場合:
cd {TARGET_DIR} && CM_PORT={port} ./scripts/stop.sh && CM_PORT={port} ./scripts/build-and-start.sh --daemon注意: ポート競合が発生した場合は lsof -nP -iTCP:{port} -sTCP:LISTEN -t で待ち受け中のプロセスを特定し、killしてから再試行する。
-sTCP:LISTEN を外すと、そのポートに接続しているだけのプロセス(CommandMate を開いているブラウザの network service、他セッションの CLI など)まで返り、止めると CommandMate 以外のタブの通信も一斉に切れる(Issue #2473)。
完了報告形式
✅ サーバー再起動完了!
📋 サーバー情報:
ディレクトリ: {TARGET_DIR}
ブランチ: {branch_name}
PID: [プロセスID]
ポート: {port} (デフォルト: 3000)
URL: http://localhost:{port}
ログ: {TARGET_DIR}/logs/server.log
🔧 操作コマンド:
ログ確認: tail -f {TARGET_DIR}/logs/server.log
停止: cd {TARGET_DIR} && CM_PORT={port} ./scripts/stop.sh注意:
./scripts/stop.sh/./scripts/build-and-start.sh/./scripts/start.sh/./scripts/restart-nobuild.shはプロジェクトルートの.envファイルを自動読み込みする(CM_PORT,CM_DB_PATH等)。--portオプションでCM_PORTを明示指定した場合、.envの値より優先される(環境変数が既にセットされている場合は.envで上書きされない仕様)。- 複数ポートで起動している場合、特定ポートだけ停止するには必ず
CM_PORT={port}を付けること。 - 起動ログに
[env] ...の警告が出た場合、.envは存在するのに 1 変数も読み込めていない(Issue #2132)。その状態では Web Push・DB パス・worktree ルートがすべて既定値になっているので、報告して原因を潰すこと。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

