跳到正文
cccskills
免费在 GitHub 公开

worktree-status

Inspect Liferay Git worktrees to see each worktree’s HTTP port, running status, port offset, and database name. You can also request the full port table and database summary for one worktree. The skill reads configuration and process information without changing state.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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/liferay-portal星标 2,267(GitHub 2,267 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • See which Liferay worktrees are running
  • Compare ports and databases across worktrees
  • Check the port configuration for one worktree

包含的文件(1)

  • SKILL.md3.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Worktree Status

Inspect Liferay worktrees and the ports and databases they are configured to use. The skill never mutates state.

Determine Action

Parse ${ARGUMENTS} and conversation context:

  • "list" or user asks which worktrees exist or what is running → List All
  • "status" or user asks what ports a single worktree uses → Status Check
  • No argument → default to List All

Port Defaults

Offset 0 is reserved for the main worktree. All ports shift by the same offset N: port = default + N.

ServiceDefaultConfig Location
Arquillian32763<bundles>/osgi/configs/...ArquillianConnector.config
DataGuard42763<bundles>/osgi/configs/...DataGuardConnector.config
Elasticsearch Sidecar HTTP9201<bundles>/osgi/configs/...ElasticsearchConfiguration.config
Elasticsearch Transport9301<bundles>/osgi/configs/...ElasticsearchConfiguration.config
Glowroot4000<bundles>/glowroot/admin.json
HTTPS Redirect8443<tomcat>/conf/server.xml
JPDA Debug8000<tomcat>/bin/setenv.sh
OSGi Console11311<tomcat>/webapps/ROOT/WEB-INF/classes/portal-developer.properties
Tomcat AJP8009<tomcat>/conf/server.xml
Tomcat HTTP8080<tomcat>/conf/server.xml
Tomcat Shutdown8005<tomcat>/conf/server.xml

Database Naming

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_.

List All

Show a summary table of every Git worktree with its HTTP port, running status, offset, and database.

  1. Run git worktree list --porcelain to enumerate all worktrees.

  2. 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.

  3. Read <bundles>/.worktree-port-offset to obtain the offset, then derive the HTTP port and database name.

  4. 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

Status Check

Read <bundles>/.worktree-port-offset for the current worktree and print the full port table plus the derived database name. Make no modifications.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use this skill to format Liferay source files according to the project’s conventions. It describes the formatter workflows for modules and committed changes, how to handle Go and shell files, and which generated files to leave untouched.

中文简介正在准备中。当前显示英语简介。

  • Formatting source files in a module
  • Checking formatting across committed changes
  • Applying the separate Go or shell formatting rules
liferay/liferay-portal22672026年10月29日 更新

jira-bug

免费

Use this skill to file a bug in the LPD Jira project from a description or fix commit. It gathers reproduction steps and expected versus actual behavior, applies required project fields, and returns the created ticket key and link.

中文简介正在准备中。当前显示英语简介。

  • Filing a newly reported LPD bug
  • Turning a fix commit into a bug ticket
  • Recording reproduction steps and expected behavior
liferay/liferay-portal22672026年10月29日 更新

jira-task

免费

Use this skill to create a Task ticket in the LPD Jira project from a description or commit. It gathers missing details, selects a matching component, formats the description with acceptance criteria when applicable, and returns the ticket key and link.

中文简介正在准备中。当前显示英语简介。

  • Creating an LPD task from a short description
  • Turning a commit into a task ticket
  • Adding acceptance criteria to a Jira task
liferay/liferay-portal22672026年10月29日 更新

Format Markdown files for Liferay repositories by aligning front matter, heading capitalization, shell examples, and prose with the project’s style rules. Use it to clean up or copy-edit a document and receive a summary of the changes.

中文简介正在准备中。当前显示英语简介。

  • Formatting a Markdown guide for a Liferay repository
  • Cleaning up headings and front matter in a document
  • Polishing shell examples and prose in Markdown
liferay/liferay-portal22672026年10月29日 更新

Analyzes a Liferay Poshi `.testcase`, checks feasibility and existing coverage, then routes each test to Playwright, Jest, JUnit unit, or Java integration tests. It creates a migration plan and can implement the approved changes using repository patterns.

中文简介正在准备中。当前显示英语简介。

  • Migrating Poshi test cases to modern test layers
  • Finding existing specs that already cover Poshi tests
  • Planning Playwright, Jest, or JUnit test conversions
liferay/liferay-portal22672026年10月29日 更新

Plan and carry out a reduction of a Liferay component’s Poshi test suite by identifying overlapping tests and combining their unique assertions. The skill inventories matching test files, preserves tests with special setup or properties, and commits each planned rename or merge separately.

中文简介正在准备中。当前显示英语简介。

  • Reduce overlapping Poshi tests for a component
  • Prepare a test suite for migration to another test layer
  • Review a file-by-file plan for merging functional tests
liferay/liferay-portal22672026年10月29日 更新

查看 liferay 的全部技能

报告此技能的问题