skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-09
- Stars
- ★ 344
- Forks
- 7
01 前言 Front Matter
- name
- manage-environments
- description
- Manage workspace environment configurations (local/dev/uat/prod), promote changes between environments, export object data models, and capture a running site as a reusable site initializer CET. Use when the user asks to promote to UAT, export this site, migrate object data, or set up environment specific properties.
02 资源文件 17
- 参考文档agents/analyzer.md10.1 KB
- 参考文档agents/comparator.md7.1 KB
- 参考文档agents/grader.md8.8 KB
- 资产文件assets/eval_review.html6.9 KB
- 脚本eval-viewer/generate_review.py16.0 KB
- 参考文档eval-viewer/viewer.html43.9 KB
- 许可证LICENSE.txt11.1 KB
- 参考文档references/schemas.md11.8 KB
- 脚本scripts/__init__.py—
- 脚本scripts/aggregate_benchmark.py14.0 KB
- 脚本scripts/generate_report.py12.5 KB
- 脚本scripts/improve_description.py10.9 KB
- 脚本scripts/package_skill.py4.1 KB
- 脚本scripts/quick_validate.py3.9 KB
- 脚本scripts/run_eval.py11.2 KB
- 脚本scripts/run_loop.py13.3 KB
- 脚本scripts/utils.py1.6 KB
03 SKILL.md 正文
Manage Environments
Switch portal configurations per deployment target, promote property changes between environments, export data models, and capture a live site as a site initializer.
When to Invoke
- "Promote to UAT", "add a UAT environment config"
- "Export the object definitions so we can import them to production"
- "Capture the current site as a site initializer for version control"
- "Set up a database connection for dev"
- Called by
build-siteafter runtime iteration when the user wants to commit the site to source control
Workspace Environment Model
configs/ holds one directory per environment. Each directory may contain a portal-ext.properties that overrides the common config.
configs/
common/ # Applied to every environment
local/ # Developer workstation (default)
dev/ # Shared dev server
uat/ # User acceptance testing
prod/ # Production
docker/ # Docker / container deployments
The active environment is set by liferay.workspace.environment in gradle.properties. Default is local.
Blade merges properties in order: common/portal-ext.properties then <env>/portal-ext.properties. The merge result lands in bundles/portal-ext.properties.
Workflow
Declare the Target Environment
Check gradle.properties:
grep "liferay.workspace.environment" gradle.properties
To switch environments:
# Edit gradle.properties
liferay.workspace.environment=uat
Then run blade gw initBundle to merge and push configs (applies to remote/UAT server initialization only — do not use for local dev bundles; see deploy-and-verify). Alternatively, set the environment at deploy time:
blade gw deploy -Pliferay.workspace.environment=uat
Add or Update Environment Properties
Edit configs/<env>/portal-ext.properties with the target environment's values. Common properties per environment:
# Database (dev example)
jdbc.default.driverClassName=org.mariadb.jdbc.Driver
jdbc.default.url=jdbc:mariadb://localhost:3306/liferay_dev
jdbc.default.username=liferay
jdbc.default.password=liferay
# Elasticsearch
com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.operationMode=REMOTE
com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.networkHostAddresses=["https://elasticsearch-dev:9200"]
# Mail (disable for dev)
mail.send.blacklist=*
Export Object Definitions
There is no /object-definitions/{id}/export or /object-definitions/import endpoint. Migrate object definitions through the Batch Engine endpoints on object-admin:
# Export object definitions
curl \
--data '{"callbackURL": "", "fieldNames": ["name", "label", "pluralLabel", "scope", "objectFields"], "taskItemDelegateName": "DEFAULT"}' \
--header "Content-Type: application/json" \
--request POST \
--silent \
--url "http://localhost:${PORT}/o/object-admin/v1.0/object-definitions/export-batch" \
--user "test@liferay.com:test"
# Import on the target environment (batch create/update)
curl \
--data @object-definitions.json \
--header "Content-Type: application/json" \
--request POST \
--silent \
--url "http://localhost:${PORT}/o/object-admin/v1.0/object-definitions/batch" \
--user "test@liferay.com:test"
Confirm the exact request bodies against the OpenAPI spec (get-openapi MCP tool, or fetch GET /o/object-admin/v1.0/openapi.json with curl). For source controlled migration, prefer a site-initializer batch/ file (see rules/site-initializer-format.md).
Export Object Data (Batch)
Export entries from a live environment for bulk import elsewhere:
# Request an export task
curl \
--data '{
"fieldNames": ["<field1>", "<field2>"],
"taskItemDelegateName": "<pluralLabel>"
}' \
--header "Content-Type: application/json" \
--request POST \
--silent \
--url "http://localhost:${PORT}/o/headless-batch-engine/v1.0/export-task/com.liferay.object.rest.dto.v1_0.ObjectEntry/JSON" \
--user "test@liferay.com:test"
Poll the task until "executeStatus": "COMPLETED", then download the content from the returned contentURL.
Batch Engine — Silent Field Skipping
BatchEngine silently skips unrecognized fields during import — it logs a Cannot invoke warning to catalina.out rather than failing the task. The import reports success and the task transitions to COMPLETED even when entire fields were dropped.
Ensure JSON field names exactly match the target Object Definition's field names before importing. Treat any Cannot invoke warning in catalina.out during an import as a hard error and cross check field names before retrying. After every import, GET a sample entry and confirm the imported fields actually persisted.
Capture a Site as a Site Initializer
The siteInitializer CET pattern stores the site in source control so any environment can recreate it.
Step 1 — Scaffold the CET structure via scaffold-client-extension with type siteInitializer.
Step 2 — Capture pages: For each live page, call the Headless Admin Site API and write the result to site-initializer/layouts/<NN-page-name>/page.json and page-definition.json:
curl \
--silent \
--url "http://localhost:${PORT}/o/headless-admin-site/v1.0/sites/<site-erc>/site-pages/<page-erc>?nestedFields=pageSpecifications" \
--user "test@liferay.com:test" \
| jq '{friendlyURL: .friendlyUrlPath_i18n.en_US, name: .name_i18n.en_US, type: .type}' \
> site-initializer/layouts/01_home/page.json
# Note: there is no /site-pages/{id}/page-definition subresource. The page composition lives in
# the page's pageSpecifications (fetched via ?nestedFields=pageSpecifications above) and must be
# reshaped into the initializer's page-definition.json format. Confirm the shape via the OpenAPI
# spec (get-openapi MCP tool, or GET /o/headless-admin-site/v1.0/openapi.json).
Step 3 — Capture object definitions: Export definitions and place them under site-initializer/batch/02-object-definition.batch-engine-data.json using the batch engine data format (see rules/site-initializer-format.md).
Step 4 — Capture fragments: Copy the deployed fragment source directories into site-initializer/fragments/group/.
Step 5 — Capture picklists: Export list type definitions to site-initializer/batch/00-list-type-definition.batch-engine-data.json.
Step 6 — Commit and deploy to the target environment via deploy-and-verify.
Promote a Config Change to UAT
-
Edit
configs/uat/portal-ext.propertieswith the new value. -
Commit the change.
-
Trigger the deployment pipeline (CI/CD), or push to the UAT server and run
blade gw initBundle. -
Bounce Tomcat on the UAT server to pick up the new properties.
Success Signal
TODO / inferred — verify against a running bundle. Confirm (per the steps above) that the merged config reaches bundles/portal-ext.properties, the batch export task reaches "executeStatus": "COMPLETED", and an entry fetched again shows the imported fields persisted.
04 同仓库更多 Skills
PromptScript 脚本编写与排查
promptscript
PromptScript 语言专家,用于读取、编写、修改和排查 .prs 文件。适用于处理 PromptScript 语法、创建或编辑 .prs 文件、添加 @identity、@standards、@restrictions、@shortcuts、@skills 或 @agents 等块、配置 promptscript.yaml、解决编译错误、理解继承(@inherit)、组合(@use、@extend、@override)、上下文 @header 元数据,或将 AI 指令迁移到 PromptScript。当用户询问 50 个内置编码智能体编译目标(包括 GitHub Copilot、Claude Code、Cursor、Antigravity、Factory AI 以及基于 AGENTS.md 的平台),或询问用于应用提示词的 bundle 和 prompt-text 目标时,也适用此技能。
基础专家技能
expert
基础专家技能。
测试驱动开发工作流
tdd-workflow
测试驱动开发(TDD)工作流。
Alpha 技能
alpha
Alpha 技能
PDF 文件处理
pdf-processing
提取 PDF 文本、填写表单、合并文件。用于处理 PDF 时。
React 组件编写规范
react-component-patterns
在此代码库中编写 React 组件的约定。