Dmc best practices
AgentSkills library: reusable skills for AI coding agents (AI SDK, Codex, LangGraph, Supabase, Docker, Vitest, pytest, Streamlit, Zod).
npx -y skills add BjornMelin/dev-skills --skill dmc-best-practicesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Dash Mantine Components (DMC) best practices and performance optimization guidelines. Use this skill when writing, reviewing, or refactoring Dash apps with DMC to ensure optimal patterns. Triggers on: DMC components, Mantine styling, Dash callbacks, dcc.Store, theming, or performance optimization in Plotly Dash applications.
SKILL.md
5.8 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it
DMC Best Practices
Definitive best practices for building Dash applications with Dash Mantine Components. Rules are organized by impact level and category.
Priority Categories
| Priority | Category | Impact | Prefix | Rules |
|---|---|---|---|---|
| 1 | Architecture | CRITICAL | arch- | 4 |
| 2 | Callbacks | CRITICAL/HIGH | callback- | 6 |
| 3 | Styling | HIGH/MEDIUM | style- | 5 |
| 4 | Data Management | HIGH | data- | 4 |
| 5 | Performance | MEDIUM-HIGH | perf- | 3 |
| 6 | Forms & Validation | MEDIUM | form- | 2 |
| 7 | Theming | MEDIUM | theme- | 3 |
| 8 | DMC v2.x Migrations | MEDIUM | v2- | 2 |
| 9 | Accessibility | MEDIUM | a11y- | 1 |
Top 10 Critical Rules
- Wrap layout in MantineProvider - All DMC components require it
- Never modify global variables in callbacks - Breaks multi-worker deployments
- Use State not Input for values that shouldn't trigger callbacks
- Define callbacks before app.run() - Registration must happen first
- Prevent circular callbacks - Outputs feeding inputs cause infinite loops
- Return JSON-serializable values - Only dict, list, str, number, bool, None
- Use static CSS selectors - Never target
.m_*dynamic classes - Custom colors need 10 shades - Exactly 10 (0=lightest, 9=darkest)
- Use dcc.Store for client data - Not global variables
- Debounce text inputs - Limit callback firing on rapid changes
Rules Index
Architecture (CRITICAL)
- arch-mantine-provider - Wrap Layout in MantineProvider
- arch-callback-order - Define Callbacks Before app.run()
- arch-circular-callbacks - Prevent Circular Callbacks
- arch-global-variables - Never Modify Global Variables
Callbacks (CRITICAL/HIGH)
- callback-input-vs-state - Use State for Non-Triggering Values
- callback-json-serializable - Return JSON-Serializable Values
- callback-prevent-update - PreventUpdate vs no_update
- callback-debounce - Debounce Text Inputs
- callback-context - Use ctx.triggered_id Correctly
- callback-prevent-initial - Use prevent_initial_call Appropriately
Styling (HIGH/MEDIUM)
- style-static-selectors - Use Static Selectors Only
- style-props-limit - Limit Style Props to 3-4 Per Component
- style-responsive-css - Use CSS Media Queries for Responsive
- style-css-variables - Prefer CSS Variables Over Hardcoded
- style-classnames-over-styles - Use classNames Over styles Prop
Data Management (HIGH)
- data-dcc-store - Use dcc.Store for Client-Side Data
- data-server-caching - Use Server-Side Caching for Large Data
- data-session-isolation - Isolate Cache by Session ID
- data-signaling-pattern - Use Signaling Pattern for Expensive Ops
Performance (MEDIUM-HIGH)
- perf-clientside-callbacks - Use Clientside Callbacks for Frequent Updates
- perf-memoization - Memoize Expensive Functions
- perf-webgl-charts - Use WebGL for Large Scatter Plots
Forms & Validation (MEDIUM)
- form-validation-pattern - Validate Early, Fail Fast
- form-error-handling - Return User-Friendly Error Messages
Theming (MEDIUM)
- theme-custom-colors - Custom Colors Need 10 Shades
- theme-light-dark-mode - Test Both Light and Dark Modes
- theme-component-defaults - Set Component Defaults in Theme
DMC v2.x Migrations (MEDIUM)
- v2-breaking-changes - DMC v2.x Breaking Changes
- v2-notification-container - Use NotificationContainer Not Provider
Accessibility (MEDIUM)
- a11y-labels-required - Always Provide Labels for Inputs
Full Reference
See AGENTS.md for the complete compiled reference with all rules expanded.
UI Audit Contract
When DMC review output needs machine-readable evidence, shape findings as
ui_audit.v1:
target.framework:dmcid:dmc.<rule-id>such asdmc.arch-mantine-providercategory: map DMC rule families deterministically:architecture->layout,callbacks->state,styling->layout,data->state,performance->performance,forms->interaction,theming->visual,migration->migration, andaccessibility->accessibilityseverity:CRITICALandHIGHrules becomeerror;MEDIUM-HIGHandMEDIUMrules becomewarning; lower-risk notes becomeinfolocations: repo-relative files or components when knowndocs: the relevant rule markdown path plus external component docs when the rule cites them
Use observations for inventory facts such as detected DMC version, theme
configuration, or callback counts that do not by themselves require a fix.
What ships with it: 32 files
100.5 KB alongside SKILL.md
agents/
- openai.yaml298 B
rules/
- a11y-labels-required.md2.9 KB
- arch-callback-order.md1.7 KB
- arch-circular-callbacks.md2.2 KB
- arch-global-variables.md2.6 KB
- arch-mantine-provider.md1.3 KB
- callback-context.md3.1 KB
- callback-debounce.md2.1 KB
- callback-input-vs-state.md2.6 KB
- callback-json-serializable.md2.5 KB
- callback-prevent-initial.md2.6 KB
- callback-prevent-update.md2.4 KB
- data-dcc-store.md2.7 KB
- data-server-caching.md2.9 KB
- data-session-isolation.md3.0 KB
- data-signaling-pattern.md3.4 KB
- form-error-handling.md3.6 KB
- form-validation-pattern.md3.9 KB
- perf-clientside-callbacks.md2.9 KB
- perf-memoization.md3.1 KB
- perf-webgl-charts.md2.4 KB
- style-classnames-over-styles.md2.9 KB
- style-css-variables.md2.8 KB
- style-props-limit.md2.3 KB
- style-responsive-css.md2.4 KB
- style-static-selectors.md2.3 KB
- theme-component-defaults.md3.6 KB
- theme-custom-colors.md2.7 KB
- theme-light-dark-mode.md3.1 KB
- v2-breaking-changes.md2.7 KB
- v2-notification-container.md3.0 KB
- AGENTS.md18.8 KB