用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill a2ui-generation命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | a2ui-generation |
| description | | Use when this capability is needed. |
updateComponents and updateDataModelDTO Component modeUser requirements firstBefore entering mode selection, determine whether the user input is an information summary card scenario:
Trigger conditions: The user provides a natural language search query, place name, person name, event name, or concept word (e.g., "Snow in the Forbidden City", "West Lake", "Su Dongpo") and asks for an information card.
⚠️ CRITICAL WARNING — English model content inflation risk: When generating cards for query/search-term inputs in English, there is a strong model tendency to produce article-style content with long paragraphs, full narrative sections, and detail-page structures. This is always wrong for summary cards. Treat every word below as a hard constraint, not a suggestion.
Mandatory card shape for this scenario (non-negotiable):
Title → Core attributes (1–3) → Brief summary (≤ 2 lines) → Tag group → Optional CTAList child templates (i.e., children.componentId-driven template rows such as tips_item_template) — this is a detail-page structure, not a summary cardaspect-ratio: 16/9 + width: 100%) — this is a page header, not a card elementCanonical layout patterns (choose one; do not invent new structures):
Horizontal summary card: small thumbnail on the left + title / core metrics / tags / CTA on the right (suitable for POIs, attractions, products)Vertical summary card: title section at top + core metrics row (2–3 numeric metrics side by side) + one-line summary + tags + CTA (suitable for events, people, concepts)Pre-generation self-check (mandatory before writing any JSON):
Before starting, determine:
component/card or a full page?Default to generating a component / card for the user, unless the user explicitly says they want a full page.
Then enter exactly one of the following three modes:
Applicable when:
Deliverables:
updateComponents JSONupdateDataModel JSONUnified entry function:
def build_component_payload_from_dto(dto: dict) -> tuple[dict, dict]:
...
Applicable when:
Deliverables:
updateComponents JSONupdateDataModel JSONMandatory order (must not be reversed):
updateComponents) firstupdateDataModel) secondApplicable when:
Deliverables:
updateComponents JSONupdateDataModel JSONMandatory order (must not be reversed):
updateComponents) firstupdateDataModel) secondSupplementary rules:
Do not read all sub-documents by default. Load only what the current task requires:
| Task type | Required docs | Load on demand |
|---|---|---|
| DTO component | reference/dto-component-mode.md, reference/component-design.md | reference/component-catalog.md, reference/data-binding.md, reference/visual-interaction.md, reference/design-review.md, reference/spacing-elevation.md, reference/expressiveness-toolkit.md |
| Non-DTO component | reference/component-catalog.md, reference/component-design.md | reference/data-binding.md, reference/visual-interaction.md, reference/design-review.md, reference/spacing-elevation.md, reference/expressiveness-toolkit.md |
| Non-DTO page | reference/component-catalog.md, reference/page-design.md, reference/visual-interaction.md | reference/data-binding.md, reference/review-validation.md, reference/design-review.md, reference/spacing-elevation.md |
| Bug fix / review / iterating on existing artifacts | reference/review-validation.md | Whichever doc is directly related to the issue |
Additional notes:
Load reference/component-catalog.md when you need to verify atomic components, charts, fields, allowed values, or style whitelists
Load reference/data-binding.md when you need to verify path binding, template binding, or relative path rules
Load reference/component-design.md when you need to verify component height budgets, card content budgets, or multi-column text budgets
Load reference/page-design.md when you need to verify full-page structure, layout composition, or page-level sectioning
Load reference/spacing-elevation.md when you need spacing scale, shadow elevation, or border radius guidance
Load reference/expressiveness-toolkit.md when you need to add visual richness: inline color, color blocks, icons, opacity, pseudo-gradients
Load reference/design-review.md when performing model-level design review after script validation passes
Final artifacts should be written to files by default, and the user should be told the paths explicitly.
Priority order:
Default file naming:
*_components.json*_datamodel.json*_transformer.py or *_vo.pyNon-DTO mode write order (mandatory):
*_components.json first*_datamodel.json secondTo save tokens:
1 explicit design improvement before proceeding to formal outputscripts/validate_a2ui.py immediately; if it fails, fix the file directly and re-run until it passesreference/design-review.md; apply improvements directly to the on-disk fileWhen a "user explicitly required item conflicts with a rule":
overrides.json to exempt only the conflicting checks at minimum scopeOnly truly irreplaceable business invariants that scripts cannot fully substitute are listed here:
updateComponents) before data (updateDataModel)Button + actionvariant to guess the runtime background colorComponent/card mode must not silently become page-like; do not deliver a near-full-screen large cardList sub-templates (i.e., children.componentId-driven template rows); no full-width hero image (aspect-ratio: 16/9 + width: 100%); body paragraphs ≤ 2; if any item fails, converge first or escalate to page explicitly — bypassing is not allowedTitle → Core attributes (1–3) → Brief summary (≤ 2 lines) → Tag group → CTA; expanding into article narrative structure is forbiddenbackground + border-radius + drop-shadow) inside a Card is forbiddenRow + flex fill; downgrade to a horizontal scroll container (List direction=horizontal) only when narrow-screen clipping risk is realSub-document index: reference.md
Component catalog: reference/component-catalog.md
Data binding: reference/data-binding.md
DTO mode: reference/dto-component-mode.md
Component design: reference/component-design.md
Page design: reference/page-design.md
Visual & interaction: reference/visual-interaction.md
Spacing & elevation: reference/spacing-elevation.md
Expressiveness toolkit: reference/expressiveness-toolkit.md
Design review: reference/design-review.md
Review & validation: reference/review-validation.md
Validation script: scripts/validate_a2ui.py
Source: AGenUI/AGenUI — distributed by TomeVault.
CTA buttons default to content-driven width via padding + border-radius; do not write a fixed narrow width unless explicit alignment requirements exist and readability has been verified1 explicit improvement round is required; the first version in your head must not be delivered directly as the final first draftreference/component-catalog.md.
Do NOT invent, translate, or import names from React / Flutter / SwiftUI / Tailwind.
Allowed components: Column, Row, List, Card, Tabs, Modal, Divider, Carousel, Text, RichText, Markdown, Image, Icon, Video, AudioPlayer, Lottie, Web, Button, TextField, CheckBox, ChoicePicker, Slider, DateTimeInput, Chart, Table.
Common wrong names and their correct replacements:
Card (bordered) or Column with paddingColumn (vertical) or Row (horizontal)Text with rounded background stylesTabs or toggle visibility via styles display: "none"Chart with chartType: "bar" | "line" | "donut" | "bar_grouped"{"path": "..."} bindings inside a template component (i.e., the component referenced by children.componentId) must be relative paths (e.g. text, userName, author/name). Absolute paths such as /children/xxx or /item/xxx are forbidden. Relative paths are plain field names; use / to separate nested fields — dot notation is not allowedRow and List(direction=horizontal) must not contain more than 3 direct children. More than 3 items in a single horizontal row risks overflow and clipping on mobile narrow screens. If more items are needed, switch to vertical layout, use a scrollable List(direction=horizontal) with template-driven dynamic children, or split into multiple rows