Skip to content

liferay/liferay-portal / workspaces/clarity-solution-workspace/.agents/skills/guided-client-extension

guided-client-extension

Verified

Beginner friendly mentor walkthrough for creating, deploying, and verifying a first Liferay Client Extension. Use when the user appears new to Liferay or Client Extensions, or when the user explicitly asks for a guided experience. For experienced developers and advanced workflows, use `scaffold-client-extension` instead.

Guided Client Extension

Beginner friendly mentor walkthrough for creating, deploying, and verifying a first Liferay Client Extension.

Preflight Check

  • If the user appears to be new to Liferay or Client Extensions, ask if they would like a guided experience.
  • If they decline, use this document only for technical reference.

Guided One Shot Generation

  • Target directory: create a new folder at client-extensions/liferay-hello-world.
  • Source of truth: always reference official Liferay samples for the correct structure.
  • Key files:
    • client-extension.yaml: use the sample configuration as a base. Ensure the type matches the intended extension (e.g., customElement).
    • assets/index.js: standard entry point for JavaScript logic.
    • assets/style.css: standard entry point for component styling.
  • Autodetection: remind the user that no build.gradle is needed in the extension folder; the Liferay workspace plugin detects everything in client-extensions automatically by finding the client-extension.yaml.

Deployment Workflow

  • Mechanism: explain that Blade uses the Gradle Wrapper (blade gw) to package the code into a .zip file.
  • Prerequisites:
    • Tomcat: verify that a bundles folder exists. Ensure the server is running (http://localhost:${PORT}).
    • Docker: verify the Liferay container is running and healthy (curl --fail http://localhost:${PORT}/c/portal/status). Do not check for the bundles directory — it may not exist in a Docker workspace.
  • Execution:
    • Tomcat: run blade gw deploy. This compiles the assets and copies the zip to bundles/osgi/client-extensions.
    • Docker: run ./gradlew deploy "-Ddeploy.docker.container.id=$(docker compose ps --quiet liferay)". This deploys directly into the running container with no restart needed.

Runtime Verification

  • Logs: instruct the user (or search yourself) for the log entry: STARTED [extension-id].
  • Significance: explain that this log entry confirms Liferay has detected, registered, and started the extension in the OSGi registry.

UI Placement and Publishing

Guide the user through these manual steps in the Liferay Portal UI:

  1. Navigate to a Site Page and click the Pencil (Edit) icon.

  2. Open the Fragments and Widgets sidebar (the + icon).

  3. Select the Widgets tab and find the Client Extensions category.

  4. Drag your new extension onto the page.

  5. Click Publish.

Next Steps

  • Ask the user if they would like to explore other Client Extension types (e.g., Global CSS, IFrame, or Batch).
  • Refer to the official samples for more advanced patterns.
  • For advanced CET scaffolding (microservices, site initializers, batch CXs), use skills/scaffold-client-extension/SKILL.md.
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall