opsfuse-ui 0.1.24 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,198 +1,198 @@
1
- ---
2
- name: design-tokens
3
- description: Generate a design tokens file (CSS variables or Tailwind config) based on a chosen aesthetic philosophy, with light and dark mode palettes, spacing scale, type ramp, and component-level tokens. Use when starting a new project, establishing a visual system, setting up tokens, or mentions "tokens" or "design system".
4
- ---
5
-
6
- This skill generates the foundational design tokens for a project. Run this after the design brief and before building any components. Every component built after this references these tokens instead of hardcoding values.
7
-
8
- ## Example prompts
9
-
10
- - "Set up design tokens for this project"
11
- - "Generate a token system based on Dieter Rams"
12
- - "I need a spacing scale and color palette before I start building"
13
- - "Create tokens that match our brief"
14
-
15
- ## Process
16
-
17
- 1. **Check what already exists.** Before generating anything, scan the codebase for:
18
- - CSS variable definitions (`:root`, `[data-theme]`, custom property files)
19
- - Tailwind config (`tailwind.config.js`, `tailwind.config.ts`) and any theme extensions
20
- - Theme provider files (Material UI `createTheme`, Chakra `extendTheme`, shadcn `globals.css`)
21
- - Design token JSON files (Style Dictionary format, Figma token exports)
22
- - Any `tokens.css`, `variables.css`, `theme.css`, or similarly named files
23
- - `package.json` for UI framework dependencies (tailwindcss, @mui/material, @chakra-ui/react, etc.)
24
-
25
- If tokens already exist, **extend them** rather than replacing. Identify gaps (missing dark mode, incomplete spacing scale, no motion tokens) and fill those.
26
-
27
- 2. **Read the brief.** Look for a design brief at `.design/*/DESIGN_BRIEF.md`. If multiple subfolders exist, use the most recently modified one, or ask the user which feature they are working on. If a philosophy is named, use the parameters from `/frontend-design` to derive token values. If no brief exists, ask the user what direction they want.
28
-
29
- 3. **Generate tokens** in the format that matches the project's tech stack:
30
- - Tailwind project → extend `tailwind.config.js` and write to `globals.css`
31
- - CSS/HTML project → write to a `tokens.css` file
32
- - CSS-in-JS project → write to a `theme.ts` or `theme.js` file
33
- - If unclear, default to CSS custom properties (most portable)
34
-
35
- 4. **Always generate both light and dark mode palettes.** Use `[data-theme="dark"]` or `prefers-color-scheme` media query. Both palettes should feel intentional for the chosen philosophy, not just inverted values.
36
-
37
- ## Token Categories
38
-
39
- ### Color
40
-
41
- ```css
42
- /* Semantic color tokens, not raw values */
43
- --color-bg-primary: /* Main background */
44
- --color-bg-secondary: /* Secondary/card background */
45
- --color-bg-tertiary: /* Subtle background (inputs, wells) */
46
- --color-bg-inverse: /* Inverted background */
47
-
48
- --color-text-primary: /* Main text */
49
- --color-text-secondary: /* Subdued text */
50
- --color-text-tertiary: /* Placeholder, disabled text */
51
- --color-text-inverse: /* Text on inverse backgrounds */
52
- --color-text-link: /* Link color */
53
-
54
- --color-border-primary: /* Default borders */
55
- --color-border-secondary: /* Subtle borders */
56
- --color-border-focus: /* Focus ring color */
57
-
58
- --color-accent-primary: /* Primary action color */
59
- --color-accent-primary-hover:
60
- --color-accent-primary-active:
61
- --color-accent-secondary: /* Secondary action color */
62
-
63
- --color-status-success:
64
- --color-status-warning:
65
- --color-status-error:
66
- --color-status-info:
67
-
68
- --color-surface-overlay: /* Modal/dropdown backdrop */
69
- ```
70
-
71
- **OpsFuse UI (this repo):** Prefer the shadcn-aligned variables defined in `src/brands.css` — e.g. `--background`, `--foreground`, `--card`, `--muted`, `--accent`, `--popover`, `--destructive`, `-*-foreground`, and semantic `-*-muted` / `-*-muted-foreground`. See the `opsfuse-color-theme` skill for the full ladder and usage rules.
72
-
73
- ### Spacing
74
-
75
- Generate a consistent scale. The base unit should match the philosophy:
76
- - Tight philosophies (Brutalist, Swiss): 4px base
77
- - Balanced philosophies (Rams, Scandinavian): 4px or 8px base
78
- - Spacious philosophies (Japanese Minimalism, Editorial): 8px base with larger multipliers
79
-
80
- ```css
81
- --space-0: 0;
82
- --space-1: /* base * 0.25 */
83
- --space-2: /* base * 0.5 */
84
- --space-3: /* base * 0.75 */
85
- --space-4: /* base * 1 */
86
- --space-5: /* base * 1.5 */
87
- --space-6: /* base * 2 */
88
- --space-7: /* base * 3 */
89
- --space-8: /* base * 4 */
90
- --space-9: /* base * 6 */
91
- --space-10: /* base * 8 */
92
- --space-11: /* base * 12 */
93
- --space-12: /* base * 16 */
94
- ```
95
-
96
- ### Typography
97
-
98
- ```css
99
- --font-family-display: /* Headline/display font */
100
- --font-family-body: /* Body text font */
101
- --font-family-mono: /* Code/monospace font */
102
-
103
- --font-size-xs:
104
- --font-size-sm:
105
- --font-size-base:
106
- --font-size-md:
107
- --font-size-lg:
108
- --font-size-xl:
109
- --font-size-2xl:
110
- --font-size-3xl:
111
- --font-size-4xl: /* Hero/display size */
112
-
113
- --font-weight-normal:
114
- --font-weight-medium:
115
- --font-weight-semibold:
116
- --font-weight-bold:
117
-
118
- --line-height-tight: /* Headings: 1.1-1.3 */
119
- --line-height-normal: /* Body: 1.4-1.6 */
120
- --line-height-relaxed: /* Spacious body: 1.6-1.8 */
121
-
122
- --letter-spacing-tight: /* Display type */
123
- --letter-spacing-normal:
124
- --letter-spacing-wide: /* All-caps, labels */
125
- ```
126
-
127
- ### Layout
128
-
129
- ```css
130
- --max-width-content: /* Max reading width (65-75ch equivalent) */
131
- --max-width-wide: /* Wide content area */
132
- --max-width-page: /* Full page max width */
133
-
134
- --border-radius-sm:
135
- --border-radius-md:
136
- --border-radius-lg:
137
- --border-radius-full: /* Pill/circle */
138
-
139
- --shadow-sm:
140
- --shadow-md:
141
- --shadow-lg:
142
- --shadow-focus: /* Focus ring shadow */
143
- ```
144
-
145
- ### Motion
146
-
147
- ```css
148
- --duration-instant: 50ms;
149
- --duration-fast: 150ms;
150
- --duration-normal: 250ms;
151
- --duration-slow: 400ms;
152
- --duration-slower: 600ms;
153
-
154
- --easing-default: cubic-bezier(0.4, 0, 0.2, 1);
155
- --easing-in: cubic-bezier(0.4, 0, 1, 1);
156
- --easing-out: cubic-bezier(0, 0, 0.2, 1);
157
- --easing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
158
- ```
159
-
160
- ### Responsive Breakpoints
161
-
162
- ```css
163
- --breakpoint-sm: 375px; /* Mobile */
164
- --breakpoint-md: 768px; /* Tablet */
165
- --breakpoint-lg: 1024px; /* Small desktop */
166
- --breakpoint-xl: 1280px; /* Desktop */
167
- --breakpoint-2xl: 1536px; /* Wide desktop */
168
- ```
169
-
170
- ## Dark Mode
171
-
172
- Always generate dark mode tokens alongside light mode. Rules:
173
-
174
- - Do not simply invert colors. Dark backgrounds should be warm or cool depending on the philosophy.
175
- - Reduce contrast slightly in dark mode (pure white text on pure black is harsh).
176
- - Shadows should use darker, more transparent values in dark mode, not the same shadows as light.
177
- - Accent colors may need lightness adjustments to maintain contrast ratios.
178
- - Include a `prefers-color-scheme` media query AND a `[data-theme="dark"]` attribute selector so the user can support both system preference and manual toggle.
179
-
180
- ```css
181
- :root {
182
- /* Light mode tokens */
183
- }
184
-
185
- [data-theme="dark"] {
186
- /* Dark mode overrides */
187
- }
188
-
189
- @media (prefers-color-scheme: dark) {
190
- :root:not([data-theme="light"]) {
191
- /* System-preference dark mode, unless user explicitly chose light */
192
- }
193
- }
194
- ```
195
-
196
- ## Output
197
-
198
- Save the tokens file in the appropriate location for the project's tech stack. State which philosophy the tokens are derived from and note any deviations or choices made.
1
+ ---
2
+ name: design-tokens
3
+ description: Generate a design tokens file (CSS variables or Tailwind config) based on a chosen aesthetic philosophy, with light and dark mode palettes, spacing scale, type ramp, and component-level tokens. Use when starting a new project, establishing a visual system, setting up tokens, or mentions "tokens" or "design system".
4
+ ---
5
+
6
+ This skill generates the foundational design tokens for a project. Run this after the design brief and before building any components. Every component built after this references these tokens instead of hardcoding values.
7
+
8
+ ## Example prompts
9
+
10
+ - "Set up design tokens for this project"
11
+ - "Generate a token system based on Dieter Rams"
12
+ - "I need a spacing scale and color palette before I start building"
13
+ - "Create tokens that match our brief"
14
+
15
+ ## Process
16
+
17
+ 1. **Check what already exists.** Before generating anything, scan the codebase for:
18
+ - CSS variable definitions (`:root`, `[data-theme]`, custom property files)
19
+ - Tailwind config (`tailwind.config.js`, `tailwind.config.ts`) and any theme extensions
20
+ - Theme provider files (Material UI `createTheme`, Chakra `extendTheme`, shadcn `globals.css`)
21
+ - Design token JSON files (Style Dictionary format, Figma token exports)
22
+ - Any `tokens.css`, `variables.css`, `theme.css`, or similarly named files
23
+ - `package.json` for UI framework dependencies (tailwindcss, @mui/material, @chakra-ui/react, etc.)
24
+
25
+ If tokens already exist, **extend them** rather than replacing. Identify gaps (missing dark mode, incomplete spacing scale, no motion tokens) and fill those.
26
+
27
+ 2. **Read the brief.** Look for a design brief at `.design/*/DESIGN_BRIEF.md`. If multiple subfolders exist, use the most recently modified one, or ask the user which feature they are working on. If a philosophy is named, use the parameters from `/frontend-design` to derive token values. If no brief exists, ask the user what direction they want.
28
+
29
+ 3. **Generate tokens** in the format that matches the project's tech stack:
30
+ - Tailwind project → extend `tailwind.config.js` and write to `globals.css`
31
+ - CSS/HTML project → write to a `tokens.css` file
32
+ - CSS-in-JS project → write to a `theme.ts` or `theme.js` file
33
+ - If unclear, default to CSS custom properties (most portable)
34
+
35
+ 4. **Always generate both light and dark mode palettes.** Use `[data-theme="dark"]` or `prefers-color-scheme` media query. Both palettes should feel intentional for the chosen philosophy, not just inverted values.
36
+
37
+ ## Token Categories
38
+
39
+ ### Color
40
+
41
+ ```css
42
+ /* Semantic color tokens, not raw values */
43
+ --color-bg-primary: /* Main background */
44
+ --color-bg-secondary: /* Secondary/card background */
45
+ --color-bg-tertiary: /* Subtle background (inputs, wells) */
46
+ --color-bg-inverse: /* Inverted background */
47
+
48
+ --color-text-primary: /* Main text */
49
+ --color-text-secondary: /* Subdued text */
50
+ --color-text-tertiary: /* Placeholder, disabled text */
51
+ --color-text-inverse: /* Text on inverse backgrounds */
52
+ --color-text-link: /* Link color */
53
+
54
+ --color-border-primary: /* Default borders */
55
+ --color-border-secondary: /* Subtle borders */
56
+ --color-border-focus: /* Focus ring color */
57
+
58
+ --color-accent-primary: /* Primary action color */
59
+ --color-accent-primary-hover:
60
+ --color-accent-primary-active:
61
+ --color-accent-secondary: /* Secondary action color */
62
+
63
+ --color-status-success:
64
+ --color-status-warning:
65
+ --color-status-error:
66
+ --color-status-info:
67
+
68
+ --color-surface-overlay: /* Modal/dropdown backdrop */
69
+ ```
70
+
71
+ **OpsFuse UI (this repo):** Prefer the shadcn-aligned variables defined in `src/brands.css` — e.g. `--background`, `--foreground`, `--card`, `--muted`, `--accent`, `--popover`, `--destructive`, `-*-foreground`, and semantic `-*-muted` / `-*-muted-foreground`. See the `opsfuse-color-theme` skill for the full ladder and usage rules.
72
+
73
+ ### Spacing
74
+
75
+ Generate a consistent scale. The base unit should match the philosophy:
76
+ - Tight philosophies (Brutalist, Swiss): 4px base
77
+ - Balanced philosophies (Rams, Scandinavian): 4px or 8px base
78
+ - Spacious philosophies (Japanese Minimalism, Editorial): 8px base with larger multipliers
79
+
80
+ ```css
81
+ --space-0: 0;
82
+ --space-1: /* base * 0.25 */
83
+ --space-2: /* base * 0.5 */
84
+ --space-3: /* base * 0.75 */
85
+ --space-4: /* base * 1 */
86
+ --space-5: /* base * 1.5 */
87
+ --space-6: /* base * 2 */
88
+ --space-7: /* base * 3 */
89
+ --space-8: /* base * 4 */
90
+ --space-9: /* base * 6 */
91
+ --space-10: /* base * 8 */
92
+ --space-11: /* base * 12 */
93
+ --space-12: /* base * 16 */
94
+ ```
95
+
96
+ ### Typography
97
+
98
+ ```css
99
+ --font-family-display: /* Headline/display font */
100
+ --font-family-body: /* Body text font */
101
+ --font-family-mono: /* Code/monospace font */
102
+
103
+ --font-size-xs:
104
+ --font-size-sm:
105
+ --font-size-base:
106
+ --font-size-md:
107
+ --font-size-lg:
108
+ --font-size-xl:
109
+ --font-size-2xl:
110
+ --font-size-3xl:
111
+ --font-size-4xl: /* Hero/display size */
112
+
113
+ --font-weight-normal:
114
+ --font-weight-medium:
115
+ --font-weight-semibold:
116
+ --font-weight-bold:
117
+
118
+ --line-height-tight: /* Headings: 1.1-1.3 */
119
+ --line-height-normal: /* Body: 1.4-1.6 */
120
+ --line-height-relaxed: /* Spacious body: 1.6-1.8 */
121
+
122
+ --letter-spacing-tight: /* Display type */
123
+ --letter-spacing-normal:
124
+ --letter-spacing-wide: /* All-caps, labels */
125
+ ```
126
+
127
+ ### Layout
128
+
129
+ ```css
130
+ --max-width-content: /* Max reading width (65-75ch equivalent) */
131
+ --max-width-wide: /* Wide content area */
132
+ --max-width-page: /* Full page max width */
133
+
134
+ --border-radius-sm:
135
+ --border-radius-md:
136
+ --border-radius-lg:
137
+ --border-radius-full: /* Pill/circle */
138
+
139
+ --shadow-sm:
140
+ --shadow-md:
141
+ --shadow-lg:
142
+ --shadow-focus: /* Focus ring shadow */
143
+ ```
144
+
145
+ ### Motion
146
+
147
+ ```css
148
+ --duration-instant: 50ms;
149
+ --duration-fast: 150ms;
150
+ --duration-normal: 250ms;
151
+ --duration-slow: 400ms;
152
+ --duration-slower: 600ms;
153
+
154
+ --easing-default: cubic-bezier(0.4, 0, 0.2, 1);
155
+ --easing-in: cubic-bezier(0.4, 0, 1, 1);
156
+ --easing-out: cubic-bezier(0, 0, 0.2, 1);
157
+ --easing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
158
+ ```
159
+
160
+ ### Responsive Breakpoints
161
+
162
+ ```css
163
+ --breakpoint-sm: 375px; /* Mobile */
164
+ --breakpoint-md: 768px; /* Tablet */
165
+ --breakpoint-lg: 1024px; /* Small desktop */
166
+ --breakpoint-xl: 1280px; /* Desktop */
167
+ --breakpoint-2xl: 1536px; /* Wide desktop */
168
+ ```
169
+
170
+ ## Dark Mode
171
+
172
+ Always generate dark mode tokens alongside light mode. Rules:
173
+
174
+ - Do not simply invert colors. Dark backgrounds should be warm or cool depending on the philosophy.
175
+ - Reduce contrast slightly in dark mode (pure white text on pure black is harsh).
176
+ - Shadows should use darker, more transparent values in dark mode, not the same shadows as light.
177
+ - Accent colors may need lightness adjustments to maintain contrast ratios.
178
+ - Include a `prefers-color-scheme` media query AND a `[data-theme="dark"]` attribute selector so the user can support both system preference and manual toggle.
179
+
180
+ ```css
181
+ :root {
182
+ /* Light mode tokens */
183
+ }
184
+
185
+ [data-theme="dark"] {
186
+ /* Dark mode overrides */
187
+ }
188
+
189
+ @media (prefers-color-scheme: dark) {
190
+ :root:not([data-theme="light"]) {
191
+ /* System-preference dark mode, unless user explicitly chose light */
192
+ }
193
+ }
194
+ ```
195
+
196
+ ## Output
197
+
198
+ Save the tokens file in the appropriate location for the project's tech stack. State which philosophy the tokens are derived from and note any deviations or choices made.