一键导入
liferay-fragment-linting
Instructions for running, analyzing, and satisfying the Liferay fragments quality gate and linter rules.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Instructions for running, analyzing, and satisfying the Liferay fragments quality gate and linter rules.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Activate this skill whenever you are running E2E tests, capturing screenshots, promoting visual baselines, or interpreting E2E test results for Liferay fragments. It specifies the exact commands for full-suite runs, targeted fragment runs, and visual baseline promotion, and documents the current known platform blocker.
Activate this skill when a task is large enough to benefit from splitting work across concurrent or hierarchical subagents — for example, running research and implementation in parallel, or delegating lint/test execution to a background agent while the coordinator continues planning. It defines the collaboration patterns, spawn constraints, output integration rules, and conflict resolution protocol.
Activate this skill when executing any multi-phase fragment development task — scaffolding, linting, compatibility build, E2E testing, or documentation update — where the output of one phase is the required input to the next. It defines the canonical pipeline phases, their inputs/outputs, and the active constraints that prevent a downstream phase from starting before its upstream gate has passed.
Activate this skill whenever you are creating a branch, opening a Pull Request, merging code, or performing any Git / GitHub CLI operation in the liferay-fragments repository. It enforces branch naming conventions, pre-commit validation gates, the PR auto-merge protocol, and the code-review requirement.
Activate this skill whenever you are planning a new feature, bug fix, enhancement, or any tracked piece of work. It mandates issue-first development and prescribes the exact workflow for creating, syncing, and closing GitHub Issues using the gh-issue-sync.cjs automation tool.
Activate this skill whenever you are building, packaging, or releasing fragment ZIP collections. It defines the mandatory three-target build strategy that produces separate ZIPs for Liferay 2026.Q1+, pre-2026.Q1, and pre-2025.Q3, and specifies the exact dataType and checkbox default-value transformation rules for each target.
| name | liferay-fragment-linting |
| description | Instructions for running, analyzing, and satisfying the Liferay fragments quality gate and linter rules. |
This skill guides AI agents and developers in running the quality gate, auditing fragment directories, and resolving issues identified by the linter.
To execute the linting suite, run the following command from the workspace root:
npm run lint
This triggers node scripts/lint-fragments.js. The linter acts as a strict quality gate that must pass with 0 errors and 0 warnings before committing changes.
The linter enforces several categories of rules across all page fragments:
fragment.json and configuration.json against the AJV-compiled JSON schemas.fragment.json schema mismatch or configuration.json schema mismatch.htmlPath, jsPath, cssPath, configurationPath, name, type) are defined. Verify field definitions contain name, type, and label.configuration.json exists as a key in Language_en_US.properties.Missing localization for label: lfr.my-fragment.title or Lazy localization found....Language_en_US.properties or form-fragments/Language_en_US.properties for form components). Do not map a key to itself (e.g. lfr.some-key=lfr.some-key)."string", "number", "boolean", or "object". Note that legacy "int" is NOT allowed in modern schema configurations (it is generated at build-time for older targets).text, textarea, select, checkbox, colorPicker, colorPalette, length, item, itemSelector, url, or navigationMenuSelector.checkbox must have dataType: "boolean" (or omit it).select must have dataType: "string" (or omit it).dataType: "number", its defaultValue must be a string-based representation (e.g., "10" instead of 10). This ensures backward compatibility during build-time transformations.dataType: "boolean", its defaultValue must be a strict boolean literal (true or false), not a string representation.index.css files for hardcoded hex colors.Hardcoded colors found in CSS: #ffffff. Use var() tokens..ftl files to ensure all opening square-bracket directive tags (e.g. [#if], [#list]) have matching closing tags (e.g., [/#if], [/#list]).Mismatched FreeMarker [#if] tags in index.ftl..md files (excluding ignore list) for broken relative paths, missing local anchors, and broken image links.docs/images/live/) are reported as warnings since they depend on E2E test executions, but other broken relative links are treated as fatal errors.docs/gallery.md with the latest generated structure.node scripts/generate-gallery.js