[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BR9CVMRMBNK0S1DPHZGPMX":3,"skill-same:01M7BR9CVMRMBNK0S1DPHZGPMX":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7BR9CVMRMBNK0S1DPHZGPMX","render-android-ui-candidates",null,"Use when an Android or Compose appearance decision needs showing rather than describing: which icon, how large, which colour, one row or two. Fires when a design question has round-tripped in prose, when someone asks \"show me\" or \"let's try\", or before changing a component whose look is the point. Renders each candidate through the project's own screenshot harness and then MEASURES the result, because \"it looks too big\" is settled by numbers and not by more adjectives. Do NOT fire for a behavioural question, for a component that does not exist yet, or to record goldens, which the baseline-record skill owns. This skill is complete for Android on its own. Off Android, or where what keeps being misread is a requirement rather than an appearance choice, `render-the-candidates` in the verification plugin is the general form if that plugin is installed.","damson\u002Fhard-won-skills","damson","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F804217?v=4","01M7BR01SMVEGA4HRD46VV1SXF","Damien D.","01M7BR01TR37MB9R73C1C0ENGG",1,"MIT","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmobile-ui\u002Fskills\u002Frender-android-ui-candidates\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: render-android-ui-candidates\ndescription: >\n  Use when an Android or Compose appearance decision needs showing rather than\n  describing: which icon, how large, which colour, one row or two. Fires when a\n  design question has round-tripped in prose, when someone asks \"show me\" or\n  \"let's try\", or before changing a component whose look is the point. Renders\n  each candidate through the project's own screenshot harness and then MEASURES\n  the result, because \"it looks too big\" is settled by numbers and not by more\n  adjectives. Do NOT fire for a behavioural question, for a component that does\n  not exist yet, or to record goldens, which the baseline-record skill owns.\n  This skill is complete for Android on its own. Off Android, or where what\n  keeps being misread is a requirement rather than an appearance choice,\n  `render-the-candidates` in the verification plugin is the general form if that\n  plugin is installed.\n---\n\n# Render Android UI candidates, then measure them\n\nA rendered candidate ends an argument that prose extends. But a render alone\nstill leaves \"it looks a bit big\", which is unanswerable until someone measures\nthe thing next to it. The measuring is the half people skip, and it is the half\nthat produces a decision.\n\n## Procedure\n\n### 1. Render through the project's harness, not a new one\n\nFind the screenshot test that already captures this component and copy its\nsetup: its runner, its qualifiers, its capture helper. A harness invented for\nthe occasion renders a component in a theme, density and window the app never\nuses, and every judgement made from it is about that fiction.\n\n**Capture the `@Preview` functions, not a rebuilt component.** A rebuild drifts\nfrom the real call site, which is exactly what you are trying to judge.\n\n### 2. Parameterise the candidate, temporarily\n\nAdd one parameter carrying the variants, an enum with a preview each:\n\n```kotlin\nenum class Trial(val ring: Dp, val glyph: Dp) { A(36.dp, 26.dp), B(30.dp, 21.dp) }\n```\n\nThread it through with a default so every existing call site still compiles,\nand delete it before the change ships. It is scaffolding, not API.\n\n### 3. Find the harness's own record task, and list what it wrote\n\n**Ask the project which task records**, rather than recalling a name. The\nharnesses differ in exactly the way that matters here: some gate capture behind\na task of their own, so the ordinary unit-test task passes having written\nnothing, and others hook the unit-test task and do write from it.\n\n```bash\n( cd \"$wt\" 2>\u002Fdev\u002Fnull || cd . ) && .\u002Fgradlew :app:tasks --all \\\n  | grep -iE 'record|screenshot|paparazzi|roborazzi|snapshot'\n```\n\nWhere that lists a record task, use it; where the only screenshot tasks are the\nordinary test ones, the harness writes from those and there is nothing to switch\nto. Either way the check is the same and it is not the exit code:\n\n```bash\nout=app\u002Fbuild\u002Foutputs\u002Froborazzi                # whatever the task reports\nbefore=$(find \"$out\" -name '*.png' 2>\u002Fdev\u002Fnull | wc -l | tr -d ' ')\n.\u002Fgradlew :app:recordRoborazziDebug            # the task the list named\nafter=$(find \"$out\" -name '*.png' 2>\u002Fdev\u002Fnull | wc -l | tr -d ' ')\necho \"png files: $before -> $after\"\n```\n\n**A count that did not move is the failure this step exists to catch**, and it\ncomes with a green build. Reading the directory is what separates a harness that\nwas inert from one that recorded.\n\n### 4. Get both themes by merging qualifiers, not by concatenating them\n\nRobolectric merges a method-level `@Config` onto the class's, and only that way\nround. A qualifier string glued together by hand fails to parse, and the\nsegment order is fixed, so `night` sits before density and not at the end.\n\nThe cheap shape is one abstract class holding the cases and two subclasses that\ndiffer only in `+night` and `+notnight`.\n\n### 5. Label and stack them at one scale\n\nOne image, one row per candidate, each labelled with what it is in words the\nperson used. Crop across the axis under discussion, never along it. Then open\nit, rather than only sending it: a decision gets made in front of the picture.\n\n### 6. Measure the ink, in the units the code uses\n\nThe step that ends the argument. Read the rendered pixels, find the bounding box\nof each control's ink, and convert with the density the qualifier pinned:\n\n```python\nPPD = image_width_px \u002F window_width_dp        # eg 1078 \u002F 411\n```\n\nReport each candidate **and its neighbours**, because the question is never\n\"how big is it\" but \"how big is it beside the others\".\n\nExpect the neighbours to disagree with each other. Material's keyline grid is\ndeliberately uneven, so square glyphs, wide glyphs and the odd one out all\npaint different amounts of ink inside the same box. Match the family the new\ncontrol belongs to rather than the box size.\n\n### 7. Ask with the numbers attached\n\nOne question, one option per candidate, each carrying its measurement and what\nit costs. A choice offered without its price gets re-opened later.\n\n## When to STOP\n\n- **The question is not visual.** When something happens, what it stores, who\n  can see it: these render identically either way. Ask in words.\n- **There is no component yet.** Build the plainest version first; there is\n  nothing to vary until something exists to vary.\n- **The harness cannot render it** (a real ad, a camera, a system dialog).\n  Say so and drive it on a device instead, which `android-verify-on-device`\n  owns.\n- **Recording goldens.** A candidate render is throwaway output to a scratch\n  directory. Goldens are committed artefacts with their own procedure in\n  `android-screenshot-baseline-record`, and mixing the two overwrites the\n  baselines with an experiment.\n- **The person has already chosen.** Re-asking a settled question reads as not\n  having listened. Implement, and say which reading you took.\n","# Render Android UI candidates, then measure them\n\nA rendered candidate ends an argument that prose extends. But a render alone\nstill leaves \"it looks a bit big\", which is unanswerable until someone measures\nthe thing next to it. The measuring is the half people skip, and it is the half\nthat produces a decision.\n\n## Procedure\n\n### 1. Render through the project's harness, not a new one\n\nFind the screenshot test that already captures this component and copy its\nsetup: its runner, its qualifiers, its capture helper. A harness invented for\nthe occasion renders a component in a theme, density and window the app never\nuses, and every judgement made from it is about that fiction.\n\n**Capture the `@Preview` functions, not a rebuilt component.** A rebuild drifts\nfrom the real call site, which is exactly what you are trying to judge.\n\n### 2. Parameterise the candidate, temporarily\n\nAdd one parameter carrying the variants, an enum with a preview each:\n\n```kotlin\nenum class Trial(val ring: Dp, val glyph: Dp) { A(36.dp, 26.dp), B(30.dp, 21.dp) }\n```\n\nThread it through with a default so every existing call site still compiles,\nand delete it before the change ships. It is scaffolding, not API.\n\n### 3. Find the harness's own record task, and list what it wrote\n\n**Ask the project which task records**, rather than recalling a name. The\nharnesses differ in exactly the way that matters here: some gate capture behind\na task of their own, so the ordinary unit-test task passes having written\nnothing, and others hook the unit-test task and do write from it.\n\n```bash\n( cd \"$wt\" 2>\u002Fdev\u002Fnull || cd . ) && .\u002Fgradlew :app:tasks --all \\\n  | grep -iE 'record|screenshot|paparazzi|roborazzi|snapshot'\n```\n\nWhere that lists a record task, use it; where the only screenshot tasks are the\nordinary test ones, the harness writes from those and there is nothing to switch\nto. Either way the check is the same and it is not the exit code:\n\n```bash\nout=app\u002Fbuild\u002Foutputs\u002Froborazzi                # whatever the task reports\nbefore=$(find \"$out\" -name '*.png' 2>\u002Fdev\u002Fnull | wc -l | tr -d ' ')\n.\u002Fgradlew :app:recordRoborazziDebug            # the task the list named\nafter=$(find \"$out\" -name '*.png' 2>\u002Fdev\u002Fnull | wc -l | tr -d ' ')\necho \"png files: $before -> $after\"\n```\n\n**A count that did not move is the failure this step exists to catch**, and it\ncomes with a green build. Reading the directory is what separates a harness that\nwas inert from one that recorded.\n\n### 4. Get both themes by merging qualifiers, not by concatenating them\n\nRobolectric merges a method-level `@Config` onto the class's, and only that way\nround. A qualifier string glued together by hand fails to parse, and the\nsegment order is fixed, so `night` sits before density and not at the end.\n\nThe cheap shape is one abstract class holding the cases and two subclasses that\ndiffer only in `+night` and `+notnight`.\n\n### 5. Label and stack them at one scale\n\nOne image, one row per candidate, each labelled with what it is in words the\nperson used. Crop across the axis under discussion, never along it. Then open\nit, rather than only sending it: a decision gets made in front of the picture.\n\n### 6. Measure the ink, in the units the code uses\n\nThe step that ends the argument. Read the rendered pixels, find the bounding box\nof each control's ink, and convert with the density the qualifier pinned:\n\n```python\nPPD = image_width_px \u002F window_width_dp        # eg 1078 \u002F 411\n```\n\nReport each candidate **and its neighbours**, because the question is never\n\"how big is it\" but \"how big is it beside the others\".\n\nExpect the neighbours to disagree with each other. Material's keyline grid is\ndeliberately uneven, so square glyphs, wide glyphs and the odd one out all\npaint different amounts of ink inside the same box. Match the family the new\ncontrol belongs to rather than the box size.\n\n### 7. Ask with the numbers attached\n\nOne question, one option per candidate, each carrying its measurement and what\nit costs. A choice offered without its price gets re-opened later.\n\n## When to STOP\n\n- **The question is not visual.** When something happens, what it stores, who\n  can see it: these render identically either way. Ask in words.\n- **There is no component yet.** Build the plainest version first; there is\n  nothing to vary until something exists to vary.\n- **The harness cannot render it** (a real ad, a camera, a system dialog).\n  Say so and drive it on a device instead, which `android-verify-on-device`\n  owns.\n- **Recording goldens.** A candidate render is throwaway output to a scratch\n  directory. Goldens are committed artefacts with their own procedure in\n  `android-screenshot-baseline-record`, and mixing the two overwrites the\n  baselines with an experiment.\n- **The person has already chosen.** Re-asking a settled question reads as not\n  having listened. Implement, and say which reading you took.\n",{"name":5,"description":7},"main","9435f9fa04b69d2217f8cab3c817dd5c3c1d1021","plugins\u002Fmobile-ui\u002Fskills\u002Frender-android-ui-candidates",0,"https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills","https:\u002F\u002Fgithub.com\u002Fdamson","http:\u002F\u002Fgoo.gl\u002F3UwFRt","2026-11-14 14:28:11",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add damson\u002Fhard-won-skills --skill render-android-ui-candidates",{"tool":38,"command":39},"bunx","bunx skills add damson\u002Fhard-won-skills --skill render-android-ui-candidates",{"tool":41,"command":42},"pnpm","pnpm dlx skills add damson\u002Fhard-won-skills --skill render-android-ui-candidates","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmobile-ui\u002Fskills\u002Frender-android-ui-candidates\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"README.md","REFERENCE","参考文档",2537,"https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmobile-ui\u002Fskills\u002Frender-android-ui-candidates\u002FREADME.md",[53,60,66,71,76,81],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7BRCESR9BRFAH87J2ZQY5T2","skill-two","Fixture skill","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fwrong_welcome_total\u002Fplugins\u002Falpha\u002Fskills\u002Fskill-two\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7BRCDPHEPZES71BYBRTZ1G3","skill-one","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fwrong_welcome_total\u002Fplugins\u002Falpha\u002Fskills\u002Fskill-one\u002FSKILL.md",[],[],{"skillNo":67,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7BRCCHHB3Q07BR0QN339D3F","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fwrong_table_count\u002Fplugins\u002Falpha\u002Fskills\u002Fskill-two\u002FSKILL.md",[],[],{"skillNo":72,"name":62,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7BRC9J97QKZHGKVXMER5ZEE","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fwrong_table_count\u002Fplugins\u002Falpha\u002Fskills\u002Fskill-one\u002FSKILL.md",[],[],{"skillNo":77,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7BRC8C39NM8VVAQ3TKP0CRS","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fvalid_marketplace\u002Fplugins\u002Falpha\u002Fskills\u002Fskill-two\u002FSKILL.md",[],[],{"skillNo":82,"name":62,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7BRC75THG394KDGYV35ET19","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fvalid_marketplace\u002Fplugins\u002Falpha\u002Fskills\u002Fskill-one\u002FSKILL.md",[],[]]