Liferayのソースコードを対象に、対応する整形ツールとルールを使って形式をそろえ、生成ファイルを避けながら修正対象を確認できます。
- モジュールのソースを整形したいとき
- コミット済み変更の書式を確認したいとき
- Goやシェルの整形ルールを適用したいとき
LiferayのGit worktreeごとにHTTPポート、稼働状態、オフセット、データベース名を一覧表示し、単一worktreeのポート構成も確認します。
Use to list Liferay worktrees with their assigned ports, running status, offset, and database, or to print the port and database summary for a single worktree.
実行スコア 未検証
インストール方法を見るLiferayのGit worktreeを一覧にし、それぞれのHTTPポート、Tomcatの稼働状態、ポートのオフセット、データベース名を表で表示します。単一worktreeを指定した場合は、各サービスのポート一覧とデータベース名を確認できます。ポートはメインworktreeをオフセット0として、設定値に同じオフセットを加えて算出します。データベース名はオフセットではなく、worktreeのディレクトリ名から導きます。稼働状態はポートのスキャンではなく、Tomcatの起動プロセスとworktreeの設定を照合して判定します。
複数のworktreeを並行して使い、どの環境が起動中か、HTTPポートやデータベース名がどう割り当てられているか確認したいときに向いています。引数がない場合は全件一覧を表示し、list で一覧、status で現在のworktreeの構成を確認します。状態を調べるだけで、設定やworktreeへの変更は行いません。
git worktree、設定ファイル、Tomcatの起動プロセスを読み取れる環境が必要です。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Inspect Liferay worktrees and the ports and databases they are configured to use. The skill never mutates state.
Parse ${ARGUMENTS} and conversation context:
Offset 0 is reserved for the main worktree. All ports shift by the same offset N: port = default + N.
| Service | Default | Config Location |
|---|---|---|
| Arquillian | 32763 | <bundles>/osgi/configs/...ArquillianConnector.config |
| DataGuard | 42763 | <bundles>/osgi/configs/...DataGuardConnector.config |
| Elasticsearch Sidecar HTTP | 9201 | <bundles>/osgi/configs/...ElasticsearchConfiguration.config |
| Elasticsearch Transport | 9301 | <bundles>/osgi/configs/...ElasticsearchConfiguration.config |
| Glowroot | 4000 | <bundles>/glowroot/admin.json |
| HTTPS Redirect | 8443 | <tomcat>/conf/server.xml |
| JPDA Debug | 8000 | <tomcat>/bin/setenv.sh |
| OSGi Console | 11311 | <tomcat>/webapps/ROOT/WEB-INF/classes/portal-developer.properties |
| Tomcat AJP | 8009 | <tomcat>/conf/server.xml |
| Tomcat HTTP | 8080 | <tomcat>/conf/server.xml |
| Tomcat Shutdown | 8005 | <tomcat>/conf/server.xml |
The database name is derived from the worktree directory name, not the offset:
liferay-portal-LPD-12345 → lportal_lpd_12345
liferay-portal-hotfix → lportal_hotfix
liferay-portal → lportal (main)
Apply this rule: strip the liferay-portal- prefix, lowercase, replace nonalphanumeric runs with _, collapse consecutive _, truncate to 56 characters, then prepend lportal_.
Show a summary table of every Git worktree with its HTTP port, running status, offset, and database.
Run git worktree list --porcelain to enumerate all worktrees.
For each worktree, resolve <bundles> by reading app.server.parent.dir from app.server.${USER}.properties in the worktree root (falling back to app.server.properties). Substitute ${project.dir} with the worktree path.
Read <bundles>/.worktree-port-offset to obtain the offset, then derive the HTTP port and database name.
Detect the running status by matching -Dcatalina.base against each worktree's <tomcat> directory. Use process matching, not port scanning — port scanning cannot distinguish which Tomcat owns which port.
ps -eo args | grep --only-matching "\-Dcatalina\.base=[^ ]*" | sed "s/-Dcatalina.base=//"
Render the output like this:
Worktree Port Status Offset Database
liferay-portal - NO TOMCAT (none) -
liferay-portal-LPD-00000 8081 RUNNING 1 lportal_lpd_00000
liferay-portal-LPD-12345 8082 STOPPED 2 lportal_lpd_12345
Read <bundles>/.worktree-port-offset for the current worktree and print the full port table plus the derived database name. Make no modifications.
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
Liferayのソースコードを対象に、対応する整形ツールとルールを使って形式をそろえ、生成ファイルを避けながら修正対象を確認できます。
不具合の説明や修正コミットから必要事項を整理し、再現手順や期待・実際の動作を含むバグチケットをLPDプロジェクトのJiraに登録できます。
説明やコミット内容をもとに、必要な情報を整えてLPDプロジェクトのJiraにタスクを登録し、チケット番号と閲覧URLを受け取れます。
Liferay向けのMarkdown文書を、前付けの順序や見出しの表記、シェル記法、文章の調子まで整え、リポジトリの規約に沿った読みやすい形に仕上げます。
LiferayのPoshi `.testcase` を内容に応じてPlaywright、Jest、JUnit、Java統合テストへ移行し、既存テストとの重複や移行を妨げる条件も整理します。
LiferayコンポーネントのPoshiテストを調べ、重複するテストを統合・整理する計画を立ててから、確認しやすい単位でテスト数を減らします。