一键导入
ui-review
// Generate screenshot coverage for screen-level Compose previews from the current diff or a specific target, check required visual and data variations, and produce a compact visual report
// Generate screenshot coverage for screen-level Compose previews from the current diff or a specific target, check required visual and data variations, and produce a compact visual report
Run the Android AI Assistant headless smoke regression harness without launching UI.
Build, install, and visually verify the app on an Android emulator or device. Uses the Android CLI for agents (android) when available with a full mobile-mcp/adb fallback.
Create a pull request following project conventions. Triggers on any request to create, open, make, submit, file, send, push, spin up, put up, draft, raise, or prepare a PR/pull request.
POS analytics tracking patterns (WooPosAnalyticsEvent sealed class, WooPosAnalyticsTracker, WooPosAnalyticsEventConstant). Use when writing, editing, exploring, debugging, or reviewing analytics tracking in POS (WooPos*) code. NOT for main store app — use the `store-analytics` skill instead.
POS unit testing patterns (WooPosCoroutineTestRule, runTest, advanceUntilIdle, mockito-kotlin, event bus mocking, analytics verification). Use when writing, editing, exploring, debugging, or reviewing unit tests for POS (WooPos*) code. NOT for main store app tests — use the `store-tests` skill instead.
Review code changes against project architecture, style, and conventions
| name | ui-review |
| description | Generate screenshot coverage for screen-level Compose previews from the current diff or a specific target, check required visual and data variations, and produce a compact visual report |
| user-invocable | true |
Run a visual review for the screens affected by the current diff or a specific target.
This skill supports two starting modes:
Diff mode: use the current diff to find the affected Compose code and trace it to the right screen previewsTarget mode: when the user explicitly provides a Compose name, class name, or file name, use that as the starting point instead of the diffIn Target mode:
When the user explicitly invokes this skill, default to Diff mode.
At the start:
Target modeDiff modeui-review report outputThe final output is a visual report at:
WooCommerce/build/reports/ui-review/index.html
The report may keep a small assets/ folder next to it for images used by the report.
Keep the output contract fixed:
WooCommerce/build/reports/ui-review/index.htmlWooCommerce/build/reports/ui-review/assets/...These are the final artifacts and must remain after the run.
After the skill finishes, git status should not show screenshot junk.
Before starting a new run, delete any existing WooCommerce/build/reports/ui-review folder so the report is always rebuilt from a clean slate.
Because this skill runs Android's Compose Preview Screenshot Testing tasks, every screenshot preview must live in
WooCommerce/src/screenshotTest/kotlin/... and must be annotated with @PreviewTest.
This skill only supports Compose UI targets.
Supported targets:
Unsupported targets:
Do not modify preview annotations in the main source set for this workflow.
Keep the main project preview files unchanged and create screenshot-specific previews only in UiReviewTemp.kt.
Reuse existing screen preview coverage by recreating the same Compose screen and state in UiReviewTemp.kt.
If the original preview or its sample data is private, copy only the minimum required setup into the temp file.
Do not default to isolated component previews. Only create a component-level preview when the changed UI cannot be seen clearly in any selected screen preview.
For screenshot previews in UiReviewTemp.kt, use explicit @Preview(...) definitions so each rendered image changes only one intended variable.
For each screenshot preview:
@PreviewTestLight, Dark, Large Font, RTL, and Landscape@Preview(...) per functionUse these exact @Preview definitions for each variant:
Light: @Preview(name = "Light", showBackground = true, uiMode = UI_MODE_NIGHT_NO)Dark: @Preview(name = "Dark", showBackground = true, uiMode = UI_MODE_NIGHT_YES)Large Font: @Preview(name = "Large Font", showBackground = true, fontScale = 2.0f, uiMode = UI_MODE_NIGHT_NO)RTL: @Preview(name = "RTL", showBackground = true, locale = "ar", uiMode = UI_MODE_NIGHT_NO)Landscape: @Preview(name = "Landscape", showBackground = true, device = Devices.PIXEL_9, widthDp = 640, heightDp = 360, uiMode = UI_MODE_NIGHT_NO)Treat Data variation 1 - Long strings, Data variation 2 - Null data, and any additional data variations as separate data previews.
Only create a data variation when the affected screen has visible inputs that make that variation meaningful.
For example:
Data variation 1 - Long strings applies only when visible string content can be made longerData variation 2 - Null data applies only when visible nullable inputs can be set to nullDo not mix them into every visual variation.
If the screen is Compose-based but has no usable preview at all, create a full temp screen preview for that screen.
Every affected screen should be checked in these visual conditions when practical:
Data variations are optional. A screen may have zero data variations if none of its visible inputs support them.
When they exist, use these slots first:
Data variation 1 - Long stringsData variation 2 - Null dataAfter those, add zero or more additional data variations only when the affected screen needs them:
Empty listRules:
Data variation 1 - Long strings: make the visible strings longer in that preview onlyData variation 2 - Null data: set the visible nullable fields to null in that preview onlyEmpty list: use emptyList() in that preview onlyFor each Data variation 2 - Null data preview, keep a short list of which fields were set to null.
If the app already has a dedicated empty-screen composable or preview, treat it like any other screen and include it through normal coverage. Do not give it special handling just because it is an empty state.
Temporary previews are required for this workflow, and they must follow these rules:
WooCommerce/src/screenshotTest/kotlin/...@PreviewTestUse stable names:
UiReviewTemp.ktui-reviewindex.htmlGenerate screenshots with:
./gradlew --no-configuration-cache -Pandroid.experimental.enableScreenshotTest=true :WooCommerce:updateVanillaDebugScreenshotTest
Do not run this in the background.
Use the fixed HTML template at:
$skill_path/assets/report-template.html
Do not redesign the report on each run. Only fill the placeholders in the template.
The hero section is fixed:
0 issues found, 1 issue found, or N issues foundUI ReviewReviewed screens, followed by only a bullet list of the reviewed screen names in the hero bodyThe report should:
Issue 1, Issue 2, Issue 3, and so onWhen you need text below a variant title, use the fixed template classes directly:
.meta.meta-label for the label.meta-value for the value textFor Data variation 1 - Long strings cards in the report:
For Data variation 2 - Null data cards in the report:
.meta line under the variant titlenullNull fields: customerName, billingAddressCopy only the screenshots that will actually be shown in the final report into ui-review/assets.
If dark mode is part of the generated set, make sure the final report includes at least one dark screenshot.
The final report must use only the screenshots copied into ui-review/assets.
After those files are copied, the raw screenshot output folders can be deleted.
When variants are shown in the report, always keep this order:
First, show any issue variants.
After that, keep this order for the remaining variants:
If one of these variants does not exist for the current screen, skip it and keep the remaining order unchanged.
Look for:
Treat the following as issues when they are clearly visible in the rendered images:
These are common examples, not an exhaustive list. Also report any other clearly visible visual regression that would likely matter to a user of the screen.
Only report issues that are clearly visible in the rendered images. Do not report an issue against a required variation if the screenshot also contains an unintended second variation.
Before finishing:
WooCommerce/build/reports/ui-review/assetsUiReviewTemp under the screenshot reference
source set for the variant that was run, for example WooCommerce/src/screenshotTest<Variant>/**;
do not delete the source-set directory or any non-UiReviewTemp filesWooCommerce/build/outputs/screenshotTest-resultsWooCommerce/build/reports/screenshotTestWooCommerce/build/reports/tests/<screenshotTaskName> and
WooCommerce/build/test-results/<screenshotTaskName> if they were created by this run