[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E1BMJ7PNFPXD8SRCQ6WH1S":3,"skill-same:01M6E1BMJ7PNFPXD8SRCQ6WH1S":49},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":14,"categories":15,"keywords":16,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M6E1BMJ7PNFPXD8SRCQ6WH1S","project-form-patterns",null,"AkaraChen\u002Faghub","AkaraChen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F85140972?v=4","01M6E197RY34TPAFK03227R387","01M6E197X876C4624H0VJC1E5H",271,"MIT","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Faghub\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproject-form-patterns\u002FSKILL.md",[],[17,18,19],"patterns","project","project form patterns","2026-11-10 10:12:30",false,"---\nname: project-form-patterns\ndescription: Form implementation guidance for the aghub desktop app. Use when building or refactoring forms in `crates\u002Fdesktop\u002Fsrc`, especially HeroUI v3 + React forms, RHF integration, validation, custom editors, and error presentation. Triggers: MCP forms, settings dialogs, create\u002Fedit panels, `TextField`, `FieldError`, `Select`, `react-hook-form`, key-value editors, validation behavior.\n---\n\n# aghub Form Patterns\n\nFollow these rules when building forms in this project.\n\n## Source of Truth\n\n- Check the official docs first, not memory and not bundled\u002Flocal docs, when form behavior is in question.\n- For HeroUI, prefer the official site:\n    - `https:\u002F\u002Fv3.heroui.com\u002Fdocs\u002Freact\u002Fcomponents\u002Fform`\n    - `https:\u002F\u002Fv3.heroui.com\u002Fdocs\u002Freact\u002Fcomponents\u002Ftext-field`\n    - `https:\u002F\u002Fv3.heroui.com\u002Fdocs\u002Freact\u002Fcomponents\u002Ffield-error`\n    - `https:\u002F\u002Fv3.heroui.com\u002Fdocs\u002Freact\u002Fcomponents\u002Fselect`\n- Use local skill docs only as a convenience after confirming the official API.\n\n## Default Stack\n\n- Prefer `react-hook-form` for non-trivial forms.\n- Use `Controller` for HeroUI `Select` and any custom controlled widgets.\n- Keep one form state. Do not create a second derived validation state unless there is a concrete need the form library cannot express.\n\n## Validation Behavior\n\n- When RHF controls validation, set HeroUI form fields to `validationBehavior=\"aria\"`.\n- Do not rely on HeroUI\u002Fnative validation defaults together with RHF. Native validation can steal focus and submission flow while bypassing the error UI you expect from RHF.\n- Let RHF own validation rules and submission blocking.\n\n## Error Rendering\n\n- For HeroUI text fields, use:\n    - `isInvalid={Boolean(fieldState.error)}`\n    - Conditionally render `\u003CFieldError>{fieldState.error.message}\u003C\u002FFieldError>` inside the same `TextField`.\n- Do not invent unsupported props. In particular, do not assume `TextField` supports an `errorMessage` prop.\n- Keep the official anatomy:\n\n```tsx\n\u003CTextField isInvalid={Boolean(fieldState.error)} validationBehavior=\"aria\">\n\t\u003CLabel>Name\u003C\u002FLabel>\n\t\u003CInput {...inputProps} \u002F>\n\t{fieldState.error && \u003CFieldError>{fieldState.error.message}\u003C\u002FFieldError>}\n\u003C\u002FTextField>\n```\n\n- For non-form or custom composite controls, prefer HeroUI `ErrorMessage` instead of hand-rolled error text.\n- Use `ErrorMessage` for collection-style or custom editors that are not true form fields, including key\u002Fvalue editors, tag selectors, and similar composite controls.\n\n## Custom Editors\n\n- Custom widgets like `AgentSelector`, `EnvEditor`, `HttpHeaderEditor`, and `KeyPairEditor` should still be registered in RHF through `Controller`.\n- For custom editors that manage arrays or compound values, compute validation from the current field value and surface one aggregated error below the editor when possible.\n- For that aggregated error, prefer HeroUI `ErrorMessage`.\n- Do not inject per-row error UI into tight horizontal layouts unless the design explicitly calls for it.\n\n## Key\u002FValue Editors\n\n- Keep row layout simple:\n    - two inputs\n    - one delete button\n    - no extra wrappers that change flex behavior unless necessary\n- Prefer aggregate error text below the whole editor over inline row errors. This avoids breaking spacing and alignment.\n- Implement that aggregate error with HeroUI `ErrorMessage`, not a custom `\u003Cp>` block.\n- If you must show row-level issues, redesign the layout first; do not bolt error blocks into a row that was designed as a single-line control.\n\n## Practical Rules\n\n- Prefer `onPress` for HeroUI buttons.\n- Use `type=\"button\"` for non-submit buttons inside forms.\n- Preserve existing visual patterns in this repo; do not restyle forms while adding validation.\n- After form changes, run `bun run build` in `crates\u002Fdesktop` when possible and separate unrelated existing build failures from the changes you made.\n\n## Anti-Patterns\n\n- Do not mix RHF validation with a parallel `validationErrors` state for the same fields.\n- Do not depend on HeroUI default native validation when you expect RHF errors to drive the UI.\n- Do not push validation messages into each key\u002Fvalue row unless you intentionally redesign that editor.\n- Do not trust remembered HeroUI APIs for forms without checking the official site first.\n","# aghub Form Patterns\n\nFollow these rules when building forms in this project.\n\n## Source of Truth\n\n- Check the official docs first, not memory and not bundled\u002Flocal docs, when form behavior is in question.\n- For HeroUI, prefer the official site:\n    - `https:\u002F\u002Fv3.heroui.com\u002Fdocs\u002Freact\u002Fcomponents\u002Fform`\n    - `https:\u002F\u002Fv3.heroui.com\u002Fdocs\u002Freact\u002Fcomponents\u002Ftext-field`\n    - `https:\u002F\u002Fv3.heroui.com\u002Fdocs\u002Freact\u002Fcomponents\u002Ffield-error`\n    - `https:\u002F\u002Fv3.heroui.com\u002Fdocs\u002Freact\u002Fcomponents\u002Fselect`\n- Use local skill docs only as a convenience after confirming the official API.\n\n## Default Stack\n\n- Prefer `react-hook-form` for non-trivial forms.\n- Use `Controller` for HeroUI `Select` and any custom controlled widgets.\n- Keep one form state. Do not create a second derived validation state unless there is a concrete need the form library cannot express.\n\n## Validation Behavior\n\n- When RHF controls validation, set HeroUI form fields to `validationBehavior=\"aria\"`.\n- Do not rely on HeroUI\u002Fnative validation defaults together with RHF. Native validation can steal focus and submission flow while bypassing the error UI you expect from RHF.\n- Let RHF own validation rules and submission blocking.\n\n## Error Rendering\n\n- For HeroUI text fields, use:\n    - `isInvalid={Boolean(fieldState.error)}`\n    - Conditionally render `\u003CFieldError>{fieldState.error.message}\u003C\u002FFieldError>` inside the same `TextField`.\n- Do not invent unsupported props. In particular, do not assume `TextField` supports an `errorMessage` prop.\n- Keep the official anatomy:\n\n```tsx\n\u003CTextField isInvalid={Boolean(fieldState.error)} validationBehavior=\"aria\">\n\t\u003CLabel>Name\u003C\u002FLabel>\n\t\u003CInput {...inputProps} \u002F>\n\t{fieldState.error && \u003CFieldError>{fieldState.error.message}\u003C\u002FFieldError>}\n\u003C\u002FTextField>\n```\n\n- For non-form or custom composite controls, prefer HeroUI `ErrorMessage` instead of hand-rolled error text.\n- Use `ErrorMessage` for collection-style or custom editors that are not true form fields, including key\u002Fvalue editors, tag selectors, and similar composite controls.\n\n## Custom Editors\n\n- Custom widgets like `AgentSelector`, `EnvEditor`, `HttpHeaderEditor`, and `KeyPairEditor` should still be registered in RHF through `Controller`.\n- For custom editors that manage arrays or compound values, compute validation from the current field value and surface one aggregated error below the editor when possible.\n- For that aggregated error, prefer HeroUI `ErrorMessage`.\n- Do not inject per-row error UI into tight horizontal layouts unless the design explicitly calls for it.\n\n## Key\u002FValue Editors\n\n- Keep row layout simple:\n    - two inputs\n    - one delete button\n    - no extra wrappers that change flex behavior unless necessary\n- Prefer aggregate error text below the whole editor over inline row errors. This avoids breaking spacing and alignment.\n- Implement that aggregate error with HeroUI `ErrorMessage`, not a custom `\u003Cp>` block.\n- If you must show row-level issues, redesign the layout first; do not bolt error blocks into a row that was designed as a single-line control.\n\n## Practical Rules\n\n- Prefer `onPress` for HeroUI buttons.\n- Use `type=\"button\"` for non-submit buttons inside forms.\n- Preserve existing visual patterns in this repo; do not restyle forms while adding validation.\n- After form changes, run `bun run build` in `crates\u002Fdesktop` when possible and separate unrelated existing build failures from the changes you made.\n\n## Anti-Patterns\n\n- Do not mix RHF validation with a parallel `validationErrors` state for the same fields.\n- Do not depend on HeroUI default native validation when you expect RHF errors to drive the UI.\n- Do not push validation messages into each key\u002Fvalue row unless you intentionally redesign that editor.\n- Do not trust remembered HeroUI APIs for forms without checking the official site first.\n",{},"main","2a846f29fb144c9e738f1c79a4a9f17c2f5d0c19",".agents\u002Fskills\u002Fproject-form-patterns",19,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Faghub","https:\u002F\u002Faghub.akr.moe","https:\u002F\u002Fgithub.com\u002FAkaraChen","https:\u002F\u002Fakr.moe","button painter, string concatenator, log alchemist.\r\n\r\nNo slop, no lag.","2026-11-10 06:35:07",{"source":7,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add AkaraChen\u002Faghub --skill project-form-patterns",{"tool":41,"command":42},"bunx","bunx skills add AkaraChen\u002Faghub --skill project-form-patterns",{"tool":44,"command":45},"pnpm","pnpm dlx skills add AkaraChen\u002Faghub --skill project-form-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Faghub\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproject-form-patterns\u002FSKILL.md",true,[],[50,62,85,96,114,124],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":20},"01M6E1C5XRWJGK1FTMBYBP72EP","vercel-react-best-practices","Vercel React Best Practices","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Faghub\u002Fblob\u002Fmain\u002Ffixtures\u002F.agents\u002Fskills\u002Fvercel-react-best-practices\u002FSKILL.md",[],[57,58,59,60,61],"vercel","react best practices","best practices","vercel react best practices","react",{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":20},"01M6E1C1S4GGD447NC3B3B7KKQ","init-deep","Generate hierarchical AGENTS.md and ensure paired CLAUDE.md files for codebases. Creates root AGENTS.md + CLAUDE.md plus complexity-scored subdirectory files. Use when user asks to \"generate AGENTS.md files\", \"create codebase knowledge base\", \"run \u002Finit-deep\", or wants comprehensive project documentation. Supports update mode (default) and --create-new flag to regenerate from scratch.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Faghub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Finit-deep\u002FSKILL.md",[],[69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,18],"deep","init deep","init","complexity","documentation","create","generate","run","update","knowledge","user","use","files","default","base","knowledge base",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":20},"01M6E1BY84HFA0FF0W0APPNYH6","typeset","Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Faghub\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftypeset\u002FSKILL.md",[],[87,92,93,94,79,80,95],"type","readability","text","typography",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":20},"01M6E1BTSRZMPTXVD95MB7FA01","teach-impeccable","One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Faghub\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fteach-impeccable\u002FSKILL.md",[],[103,104,105,76,106,107,108,109,110,111,112,113,18],"teach impeccable","impeccable","teach","design","config","setup","guidelines","file","context","ai config","time",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":20},"01M6E1BQH59R5H8XA4MH3S083N","quieter","Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Faghub\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fquieter\u002FSKILL.md",[],[116,79,80,121,122,123],"aesthetic","intensity","quality",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":20},"01M6E1BHEDVTPKC1KS7A7B0VGZ","polish","Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Faghub\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fpolish\u002FSKILL.md",[],[126,79,123,131,132,133,134,135,136,137,138,139,80],"micro","issues","shipping","launch","go","detail","alignment","good","review"]