refactor(viz-platform): extract skills and slim commands
Extract shared knowledge from 10 commands into 7 reusable skills: - mcp-tools-reference.md: All viz-platform MCP tool signatures - theming-system.md: Theme tokens, CSS variables, color palettes - accessibility-rules.md: WCAG contrast, color-blind safe palettes - dmc-components.md: DMC categories, validation, common props - responsive-design.md: Breakpoints, mobile-first, grid config - chart-types.md: Plotly chart types, export formats, resolution - layout-templates.md: Dashboard templates, filter types All commands now reference skills via "Skills to Load" section. Commands reduced from 1396 lines total to 427 lines (69% reduction). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,19 +4,19 @@ description: Export a theme as CSS custom properties
|
||||
|
||||
# Export Theme as CSS
|
||||
|
||||
## Skills to Load
|
||||
- skills/mcp-tools-reference.md
|
||||
- skills/theming-system.md
|
||||
|
||||
## Visual Output
|
||||
|
||||
When executing this command, display the plugin header:
|
||||
|
||||
```
|
||||
┌──────────────────────────────────────────────────────────────────┐
|
||||
│ 🎨 VIZ-PLATFORM · Theme CSS Export │
|
||||
└──────────────────────────────────────────────────────────────────┘
|
||||
+------------------------------------------------------------------+
|
||||
| VIZ-PLATFORM - Theme CSS Export |
|
||||
+------------------------------------------------------------------+
|
||||
```
|
||||
|
||||
Then proceed with the export.
|
||||
|
||||
Export a theme's design tokens as CSS custom properties for use outside Dash.
|
||||
Export a theme's design tokens as CSS custom properties.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -28,94 +28,13 @@ Export a theme's design tokens as CSS custom properties for use outside Dash.
|
||||
|
||||
- `name` (required): Theme name to export
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
/theme-css dark
|
||||
/theme-css corporate
|
||||
/theme-css my-brand
|
||||
```
|
||||
|
||||
## Tool Mapping
|
||||
|
||||
This command uses the `theme_export_css` MCP tool:
|
||||
|
||||
```python
|
||||
theme_export_css(theme_name="corporate")
|
||||
```
|
||||
|
||||
## Output Example
|
||||
|
||||
```css
|
||||
:root {
|
||||
/* Colors */
|
||||
--mantine-color-scheme: light;
|
||||
--mantine-primary-color: indigo;
|
||||
--mantine-color-primary-0: #edf2ff;
|
||||
--mantine-color-primary-1: #dbe4ff;
|
||||
--mantine-color-primary-2: #bac8ff;
|
||||
--mantine-color-primary-3: #91a7ff;
|
||||
--mantine-color-primary-4: #748ffc;
|
||||
--mantine-color-primary-5: #5c7cfa;
|
||||
--mantine-color-primary-6: #4c6ef5;
|
||||
--mantine-color-primary-7: #4263eb;
|
||||
--mantine-color-primary-8: #3b5bdb;
|
||||
--mantine-color-primary-9: #364fc7;
|
||||
|
||||
/* Typography */
|
||||
--mantine-font-family: Inter, sans-serif;
|
||||
--mantine-heading-font-family: Inter, sans-serif;
|
||||
--mantine-font-size-xs: 0.75rem;
|
||||
--mantine-font-size-sm: 0.875rem;
|
||||
--mantine-font-size-md: 1rem;
|
||||
--mantine-font-size-lg: 1.125rem;
|
||||
--mantine-font-size-xl: 1.25rem;
|
||||
|
||||
/* Spacing */
|
||||
--mantine-spacing-xs: 0.625rem;
|
||||
--mantine-spacing-sm: 0.75rem;
|
||||
--mantine-spacing-md: 1rem;
|
||||
--mantine-spacing-lg: 1.25rem;
|
||||
--mantine-spacing-xl: 2rem;
|
||||
|
||||
/* Border Radius */
|
||||
--mantine-radius-xs: 0.125rem;
|
||||
--mantine-radius-sm: 0.25rem;
|
||||
--mantine-radius-md: 0.5rem;
|
||||
--mantine-radius-lg: 1rem;
|
||||
--mantine-radius-xl: 2rem;
|
||||
|
||||
/* Shadows */
|
||||
--mantine-shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||
--mantine-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
--mantine-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
--mantine-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
|
||||
--mantine-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
```
|
||||
|
||||
## Use Cases
|
||||
|
||||
### External CSS Files
|
||||
Include the exported CSS in non-Dash projects:
|
||||
```html
|
||||
<link rel="stylesheet" href="theme-tokens.css">
|
||||
```
|
||||
|
||||
### Design Handoff
|
||||
Share design tokens with designers or other teams.
|
||||
|
||||
### Documentation
|
||||
Generate theme documentation for style guides.
|
||||
|
||||
### Other Frameworks
|
||||
Use Mantine-compatible tokens in React, Vue, or other projects.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. **User invokes**: `/theme-css corporate`
|
||||
2. **Tool exports**: Theme tokens as CSS
|
||||
3. **User can**: Save to file or copy to clipboard
|
||||
Use cases: external CSS, design handoff, documentation, other frameworks.
|
||||
|
||||
## Related Commands
|
||||
|
||||
|
||||
Reference in New Issue
Block a user