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
+77-5Lines changed: 77 additions & 5 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,68 @@ 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
+
## Adminforth UI Defaults
19
+
20
+
Apply all of these to every piece of UI you write under `custom/`, especially 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">`.
30
+
3. **Form controls come from AFCL.** `Input`, `Textarea`, `Select`, `Checkbox`, `Toggle`, `DatePicker`,
31
+
`Dropzone`. Preferably not a bare `<input>`, `<select>`, or `<textarea>` styled by hand — that is the main way
32
+
custom pages end up looking foreign.
33
+
4. **Accents use `lightPrimary` / `darkPrimary`.** Anything that carries brand or "this is the important
34
+
one" meaning — accent fills, highlighted values, active states, links, focus emphasis, the main chart
35
+
series — should use `bg-lightPrimary dark:bg-darkPrimary`, `text-lightPrimary dark:text-darkPrimary`,
0 commit comments