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: skills/igniteui-angular-generate-from-image-design/SKILL.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,27 +19,27 @@ Before writing any implementation code, you must complete these steps in order:
19
19
1. Analyze the image and identify all visible regions and UI patterns.
20
20
2. Read [references/component-mapping.md](references/component-mapping.md) and [references/gotchas.md](references/gotchas.md).
21
21
3. Call `detect_platform`.
22
-
4.If theming is needed, use the theming workflow from this skill and the dedicated `igniteui-angular-theming` skill; use `get_component_design_tokens`, `create_component_theme`, and `get_color` instead of styling from memory.
22
+
4.To apply a theme, use the theming workflow from this skill and the dedicated `igniteui-angular-theming` skill; use the `igniteui-theming` MCP tools instead of styling from memory.
23
23
5. Call `get_doc` for every chosen component family before using it.
24
24
6. Only then start coding.
25
25
26
26
## Workflow
27
27
28
-
1.**Analyze the design image** - Read the image, identify every UI section, component, layout structure, colors, and data patterns
28
+
1.**Analyze the design image** - Read the image, identify every UI section, component, layout structure.
29
29
2.**Detect platform** - Call `detect_platform` to confirm Angular + licensed status
30
30
3.**Discover components** - Call `list_components` with targeted filters to find matching components for each UI pattern
31
31
4.**Look up component docs** - Call `get_doc` for every chosen component family before coding
32
32
5.**Get best practices** - Call `get_best_practices` with the workspace path
33
-
6.**Generate theme** - (a) Inspect `styles.scss` for an existing theme before changing anything. (b) If a global theme must be generated, seed it from colors extracted from the image. (c) After a palette exists, prefer palette tokens or scoped semantic CSS variables over raw literals. (d) New projects: call `create_theme` / `create_palette`. (e) For every Ignite UI component, call `get_component_design_tokens`, map image colors to token roles, then call `create_component_theme` with only the differing tokens
34
-
7.**Install packages** - Resolve and install only the additional DV packages required by the chosen charts, maps, or gauges
35
-
8.**Implement** - Build the screenshot-first layout, data, and view components
36
-
9.**Validate and refine** - Build, test, run, compare against the image, and fix differences
33
+
6.**Generate theme** - (a) To generate a theme, first extract colors and create a color palette using `create_palette` or `create_custom_palette` depending on the scenario. Then extract elevations and call `create_elevations`. Then extract typography and call `create_typography`. Then call `create_theme` with the palette, elevations, and typography. (b) After a theme exists, prefer using design tokens or scoped semantic CSS variables over raw literals. (c) For every Ignite UI component, call `get_component_design_tokens`, map extracted image tokens to token roles, then call `create_component_theme` with the tokens differing from the global theme for the specific component.
34
+
7.**Implement** - Build the screenshot-first layout, data, and view components
35
+
8.**Validate and refine** - Build, test, run, compare against the image, and fix differences
37
36
38
37
## Step 1: Analyze the Design Image
39
38
40
39
Read the input image carefully. For each visual section, identify:
41
40
42
41
-**Layout structure**: grid rows/columns, sidebar, navbar, content area proportions, and estimated fixed widths or percentages for major regions
42
+
> Note: Do not guess the exact CSS properties at this stage; just identify the high-level structure and relative proportions. Do not try to fit the view into exact breakpoints or pixel values. Try to generate a flexible layout that preserves the observed proportions and can adapt to different screen sizes. You will refine the exact CSS rules in Step 8 after building a first version of the view.
43
43
-**Component type**: chart, list, card, map, gauge, table, form, etc.
44
44
-**Color palette**: primary, secondary, surface/background, accent, text colors
45
45
-**Typography**: font sizes, weights, letter-spacing patterns
@@ -141,9 +141,8 @@ Read and act on any luminance warnings returned. If the design needs multiple su
141
141
For **every** core Ignite UI component chosen in Steps 3-4, follow this MCP-first loop - query MCP before touching the image:
142
142
143
143
1.**Discover (MCP first)** - call `get_component_design_tokens(component)` before looking at the image for that component. Read the full token list with names, types, and descriptions. Identify which tokens correspond to visible surfaces, text, borders, icons, and interaction states.
144
-
2.**Extract (image second)** - now that you know the exact token names, go to the image region for that component and read the exact color value for each relevant token slot. Do not guess; zoom into the component region.
145
-
3.**Resolve token values** - after a palette exists, convert the extracted colors into palette token references with `get_color` whenever possible. If the palette cannot express a required distinction, create a local semantic CSS variable for that view rather than leaving a raw literal in the final styles.
146
-
4.**Generate** - call `create_component_theme(component, platform, licensed, tokens)` passing only the tokens whose resolved value differs from the default (or from what the existing palette already provides in an existing-app scenario). This produces scoped SCSS with the minimal override set.
144
+
2.**Extract (image second)** - now that you know the exact token names, go to the image region for that component and read the exact token value for each relevant token slot. Do not guess; zoom into the component region.
145
+
3.**Generate** - call `create_component_theme(component, platform, licensed, tokens)` passing only the tokens whose resolved value differs from the global theme. This produces scoped SCSS with the minimal override set.
147
146
148
147
**Example - theming a grid:**
149
148
-`get_component_design_tokens("grid")` returns `header-background`, `content-background`, `row-hover-background` among many others
@@ -160,9 +159,9 @@ Do not run `create_component_theme` for regions built with custom HTML/CSS only.
160
159
Apply in this exact order:
161
160
162
161
1.`detect_platform`
163
-
2. Inspect `styles.scss` -> existing theme or blank? (Step 5a)
4. For each Ignite UI component: `get_component_design_tokens` -> map image colors -> resolve values to palette tokens or semantic CSS variables -> `create_component_theme` (Step 5c)
162
+
2. Inspect `styles.scss` -> existing theme or blank?
163
+
3.Create or update a theme: `create_theme` (Step 5a)
164
+
4. For each Ignite UI component: `get_component_design_tokens` -> map image design tokens -> resolve values to design tokens or semantic CSS variables -> `create_component_theme` (Step 5c)
166
165
5. Use `get_color` after palette generation whenever a palette token can represent the final color intent
167
166
168
167
If you use typography mixins with a comma-separated font family list, wrap the font families in parentheses as described in [references/gotchas.md](references/gotchas.md).
0 commit comments