Skip to content
cccskills
FreePublished on 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.

OriginalShow the original description

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-portal2,267 stars(GitHub 2,267 + cccskills 0)

Run score Not tested

See how to install

Good for

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

Files included (1)

  • SKILL.md3.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.

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

format-source

FreeSummary

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-portal2.3KUpdated Oct 29, 2026

jira-bug

FreeSummary

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-portal2.3KUpdated Oct 29, 2026

jira-task

FreeSummary

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-portal2.3KUpdated Oct 29, 2026

markdown-format

FreeSummary

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-portal2.3KUpdated Oct 29, 2026

poshi-migrate

FreeSummary

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-portal2.3KUpdated Oct 29, 2026

poshi-shrink

FreeSummary

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-portal2.3KUpdated Oct 29, 2026

See all skills by liferay

Report a problem with this skill