ui-apply-generic
Use when implementing a UI brief on a stack with no framework executor — Svelte, Astro, Angular, plain HTML. Stack-independent sibling of react-shadcn-ui; idiom from the stack corpus.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 19
- Forks
- 1
01 前言 Front Matter
- name
- ui-apply-generic
- packs
- [ "engineering-base" ]
- domain
- engineering
- personas
- [ "frontend-engineer" ]
- model_tier
- medium
- workspaces
- [ "engineering" ]
- description
- Use when implementing a UI brief on a stack with no framework executor — Svelte, Astro, Angular, plain HTML. Stack-independent sibling of react-shadcn-ui; idiom from the stack corpus.
02 资源文件 1
- 参考文档evals/triggers.json1.1 KB
03 SKILL.md 正文
ui-apply-generic
The
plainlane used to be a name with nothing behind it. This skill is the lane: it carries the implementation discipline that previously lived only inside the framework executors, and it gets framework idiom from the 16-stack corpus instead of from prose written here.That split is the whole point. One skill plus a corpus serves Svelte, Astro, Angular, Alpine, htmx and everything future at once. Sixteen framework skills would serve the same set and cost a single maintainer sixteen surfaces to keep current — the enumeration this package refuses.
When to use
state.stack.frontendresolves toplain, or to a label with no framework-specific overlay.- A stack whose
axes.reactivityoraxes.metais recognised but has no executor skill (svelte,angular,astro,solid,qwik,htmx). - As the base of a composition: an overlay skill (
livewire,flux,blade-ui,react-shadcn-ui) adds framework specifics on top of this contract, it does not replace it.
Do NOT use when a framework executor already covers the whole job — then this skill is the base and the executor is the overlay, dispatched together.
Procedure
Step 1 — Query the stack corpus (mandatory)
Read state.stack.axes and query per resolved axis value, most specific first:
meta → reactivity → component_lib.
node <skills-root>/corpus-grounding/scripts/ground.mjs search \
--manifest <skills-root>/design-intelligence/data/manifest.json \
--stack <axis-value> "<the concrete question>"
axes.meta: nuxt with axes.reactivity: vue means two queries —
--stack nuxtjs and --stack vue. A meta-framework does not replace the layer
it wraps; that conflation is the defect the axes exist to fix.
Cite what you used. The result names the corpus rows the implementation followed. An uncited pick is indistinguishable from the model's memory, and memory is exactly what the corpus exists to replace.
No corpus domain for the detected stack → say so, in the result:
No stack corpus for
<stack>— proceeding on the generic contract. Framework idiom below is not grounded and should be reviewed by someone who knows this stack.
Silence is the failure mode. An unstated gap reads as grounded output.
Step 2 — Apply the stack-independent contract
Every item is a hard requirement, and none of them is framework-specific:
- Verbatim floor. Microcopy comes from
state.ui_design.microcopyexactly as written — every label, empty-state line, and validation message. No paraphrase, no improvement. Where a source artifact was provided, it beats the brief (seedesign-fidelity). - Token discipline. Colour, spacing, radius and shadow values come from the
project's tokens. A raw hex or arbitrary px that no token backs is a finding,
not a choice. Validate with
design-tokens'tokens validate. - Component reuse. Check
state.ui_audit.components_foundbefore creating anything. In a run that has already added components, re-read the component directories — the audit inventory is computed once per state-file and does not refresh (seeexisting-ui-audit§ Gotchas). Control roles. For every control you add, look up its role in thecontrol_rolesofagent-config ui:audit(re-run it when the artifact is older than your last UI edit): use the canonical implementation and the siblings' box metrics. Role missing or tied → ask before inventing a control kind; a native control beside an existing primitive needs a statednative_control_reason. - a11y floor. Semantic elements over
div+ role; every interactive element reachable and labelled; focus visible; contrast meets the project's stated level, AA when unstated. - All five states.
empty,loading,error,success,disabledper the brief. An explicitn/ais legitimate for a surface that genuinely has no such state — declaring that is the opposite of inventing filler. - Asset discipline. Copy referenced assets into the project's asset path. Never hotlink; never fabricate a logo or a screenshot.
- No placeholders.
<placeholder>,lorem,todo:,tbd,xxxare rejected at the boundary — including inside arrays.
Step 3 — Verify, with honest degrade
Exercise the result with whatever the host actually has, and name which:
| Available | Do |
|---|---|
| Browser / Playwright | Render, check the states, exercise one interaction |
| Screenshot only | Capture and inspect layout at 375 / 768 / 1280 |
| Neither | Static inspection only, and say the render is unverified |
Never claim a state or interaction works without having exercised it. A caveat is a finding; a silent claim is a defect.
Output format
Four requirements, in order — each is checkable by a reader of the result:
- Name the corpora queried, or state that none exists for this stack.
- Cite the rows that changed a decision — not every row read.
- State the verification method and its caveats, never an unqualified "works".
- List components reused before components added, so a duplicate is visible rather than buried.
Write state.ticket["ui_apply"]:
ui_apply:
files: ["resources/js/UserCard.svelte"]
rendered:
"resources/js/UserCard.svelte": |
<full text, microcopy-locked>
components_added: ["UserCard"]
components_reused: ["Button"]
microcopy_lock: true
stack_corpus: # which corpora answered, or the degrade note
queried: ["svelte"]
cited: ["svelte.csv:12 — prefer stores over prop drilling"]
verify:
method: static_inspect # or playwright / screenshot
caveats: ["render not verified — no browser available"]
Gotchas
- Do not write framework prose into this skill. The moment it explains how Svelte stores work, it stops being one maintainable surface and starts being sixteen. Framework knowledge belongs in the corpus.
axes.reactivity: unknownis notnone.unknownmeans a project has manifests and no recognised reactivity layer — proceed, and say the stack was not recognised.nonemeans there genuinely is no reactivity layer, which is the normal shape for a static page.- A meta-framework needs its own query. Querying only
--stack vuefor a Nuxt project silently drops the routing, data-fetching and SSR idioms that are the whole reason Nuxt exists. - The generic contract is a floor, not a ceiling. Where an overlay skill is dispatched with this one, its framework rules win on their subject.
- The floor now lives in exactly one place, and that is the point. Overlay
composition applies this contract to every lane, so a future change to any of
its seven items is a one-point edit here rather than four lane patches that
drift apart. Concretely: the five-states requirement reaches every lane
through this skill. That requirement is deliberately unconditional — an
explicit
n/ais the escape for a surface that genuinely has no such state (asserted inui_lane_matrix.test.ts), so this is not a defect being broadened. But if the decision is ever revisited, revisit it here.
Do NOT
- Emit framework code from memory and present it as grounded.
- Skip the corpus query because the stack "looks obvious".
- Claim a render or an interaction was verified when no primitive was available.
- Invent states, sections, or copy the brief does not carry.
- Treat a missing corpus as an evidence gap — it is a missing pack, and the two must not be recorded the same way.
See also
design-intelligence— the--stackcorpus this skill queries (16 stacks).existing-ui-audit— the inventory Step 2 checks, and its once-per-state-file limit.design-tokens—tokens validate.fe-design— where the brief's selection decisions come from, and what it does when the corpus is not installed.ui-component-architect,tailwind-engineer— stack-neutral companions this skill composes with.
04 同仓库更多 Skills
unknown-key-fixture
Declares a key the schema does not know.
portable-fixture
Declares only semantics the MCP-lite carrier transports whole.
non-portable-fixture
Declares a runtime semantic the carrier drops.
candidate-zero-width
A candidate whose prose carries an invisible joiner.
candidate-disclosure-suppression
A candidate whose prose tells the agent to withhold from the user.
candidate-dangerous-frontmatter
A candidate claiming an unscoped tool grant and a permission bypass.