You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adminforth/commands/createApp/templates/.agents/skills/adminforth-custom-vue/SKILL.md.hbs
+201-6Lines changed: 201 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: adminforth-custom-vue
3
-
description: "Use when implementing AdminForth custom Vue UI: field components, page injections, login or global injections, meta-driven component declarations, and frontend packages inside custom/."
3
+
description: "Use when implementing AdminForth custom Vue UI: AFCL components, theme colors and dark mode, field components, page injections, login or global injections, meta-driven component declarations, and frontend packages inside custom/."
4
4
user-invocable: true
5
5
---
6
6
@@ -13,6 +13,189 @@ user-invocable: true
13
13
- Adding resource page injections, login injections, or global layout injections.
14
14
- Passing `meta` into reusable Vue components.
15
15
- Installing frontend packages used only by custom AdminForth Vue code.
16
+
- Any task that produces visible UI in an AdminForth app, even when the task says nothing about how it should look.
17
+
18
+
## Non-Negotiable UI Defaults
19
+
20
+
Apply all of these to every piece of UI you write under `custom/`, including when the user gave no design
21
+
instructions at all. These are the defaults, not options — do not ask whether the user wants them, and do
22
+
not wait for a follow-up prompt about styling or dark mode.
23
+
24
+
1. **Build from AFCL first.** AFCL (AdminForth Components Library) is imported from `@/afcl` and is always
25
+
available in `custom/` without installing anything. Reach for a raw HTML control only when no AFCL
26
+
component covers the case.
27
+
2. **Buttons come from AFCL with an explicit intent.** Primary/confirming action is the default filled
28
+
accent `<Button>`. Secondary, cancel, and "back" actions are stroked `<Buttonvariant="secondary">`.
29
+
Destructive actions are `<Buttonvariant="danger">`. Never hand-roll a `<button>` with your own
30
+
background classes.
31
+
3. **Form controls come from AFCL.** `Input`, `Textarea`, `Select`, `Checkbox`, `Toggle`, `DatePicker`,
32
+
`Dropzone`. Never a bare `<input>`, `<select>`, or `<textarea>` styled by hand — that is the main way
33
+
custom pages end up looking foreign.
34
+
4. **Accents use `lightPrimary` / `darkPrimary`.** Anything that carries brand or "this is the important
35
+
one" meaning — accent fills, highlighted values, active states, links, focus emphasis, the main chart
36
+
series — should use `bg-lightPrimary dark:bg-darkPrimary`, `text-lightPrimary dark:text-darkPrimary`,
37
+
`text-lightPrimaryContrast dark:text-darkPrimaryContrast` on top of an accent fill, or
38
+
`bg-lightPrimaryOpacity dark:bg-darkPrimaryOpacity` for a subtle tint. Hardcoding an accent
39
+
(`bg-blue-600`, `text-indigo-500`) breaks apps whose theme sets a different brand color.
40
+
5. **Everything else may use Tailwind's stock palette.** `bg-white`, `bg-gray-50`, `text-gray-700`,
41
+
`text-red-600`, `border-gray-200`, `bg-pink-500`, and friends are all fine for neutrals, surfaces,
42
+
borders, and semantic colors. The theme tokens in the table below are still the better choice when a
43
+
block sits directly next to built-in AdminForth chrome and should match it exactly — but they are a
44
+
recommendation, not a restriction.
45
+
6. **Dark theme is part of writing the class, not a later pass.** Every color utility must be written as a
0 commit comments