mcpField
D
datocms-plugin-design-system

datocms-plugin-design-system

github.com/datocmsDesign & UI3111 installsUpdated 5d ago
Repository

About datocms-plugin-design-system

A skill for shaping DatoCMS plugin interfaces to fit the CMS’s visual conventions. It helps plugin developers choose between `datocms-react-ui` components and local React/CSS, with guidance for common plugin surfaces and focused verification.

Key features

  1. 01Guidance for config screens, pages, sidebars, and modals
  2. 02Prefer `datocms-react-ui` public components where suitable
  3. 03Use local React and CSS when components are insufficient
  4. 04Apply CMS spacing, density, typography, and theme variables
  5. 05Select relevant references and run focused UI checks

Use cases

  1. 01Restyle a plugin configuration screen to match DatoCMS
  2. 02Adjust sidebar panel or modal layout and density
  3. 03Build a plugin page using available UI components

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/datocms/agent-skills --skill datocms-plugin-design-system

After installing, type/datocms-plugin-design-systemin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

agents/
openai.yaml
references/
datocms-react-ui-bridge.md
forms-and-controls.md
foundations.md
layouts.md
navigation-feedback-and-data-display.md
plugin-surfaces.md
raw-css-fallbacks.md
source-map.md

Details

From the project README

DatoCMS Plugin Design System

Make plugin UI native. Use for visual fit, structure, density, styling. Not for wiring hooks or scaffolding.

Owns:

  • Make config screen native
  • Restyle sidebar panel to match dashboard
  • Use raw CSS for native page look
  • Tighten modal spacing/hierarchy
  • Pick datocms-react-ui components matching CMS UI

Step 1: Detect context silently

  1. Identify target: existing plugin, greenfield scaffold, single surface.
  2. Identify surface: config screen, page, sidebar panel, full sidebar, modal, outlet, inspector, asset source.
  3. Check if project uses datocms-react-ui.
  4. Identify change type: visual, layout, control selection, theme, density.
  5. Read smallest slice: surface entrypoint, component being restyled, local CSS, package.json if needed.

Ask only if repo unclear.

Step 2: Choose implementation path

Use narrowest path keeping result native.

A. Public component path first

Use when datocms-react-ui exposes needed control.

Prefer for:

  • Canvas
  • form wrappers, grouped settings
  • standard fields, buttons, button groups
  • sections, toolbar, header structure
  • sidebar panels, dropdowns, spinners
  • VerticalSplit if available
B. Raw React + CSS fallback

Use when public package lacks needed layout or exact CMS composition matters.

Use for:

  • page shells needing CMS spacing
  • list/table wrappers, summary rows
  • empty states, info blocks
  • split layouts when UI package lacks primitive
  • surface-specific wrappers needing theme vars

Do not import private CMS styles or class names. Recreate with plugin-local CSS using Canvas variables.

Step 3: Load minimum references

Always start with:

  • references/foundations.md
  • references/datocms-react-ui-bridge.md

Load references/source-map.md only if public docs + plugin code insufficient.

Then load touched reference:

  • layout/page → references/layouts.md
  • forms/settings/controls → references/forms-and-controls.md
  • tabs/dropdowns/tables/notices → references/navigation-feedback-and-data-display.md
  • hook-specific screen shape → references/plugin-surfaces.md
  • raw CSS → references/raw-css-fallbacks.md

Do not load whole bundle for small restyle.

Step 4: Build native-looking UI

Guardrails:

  • Match DatoCMS density before inventing layout.
  • Use <Canvas> theme vars, not hardcoded brand colors.
  • Prefer 1px borders, 3-5px radii, subtle shadow where CMS uses it.
  • Keep page widths, toolbar heights, section spacing, form rhythm close to CMS.
  • One primary action per section/screen.
  • Isolate destructive actions.
  • Labels above controls, hints below, concise errors.
  • Favor sections/toolbars/sidebars/tables over decorative cards.
  • Avoid hero blocks, KPI grids, ornamental copy, oversized rounded corners, heavy gradients, dashboard filler.
  • Keep custom CSS local and variable-driven.
  • If public component close but incomplete, compose around it.

For "native" UI, optimize in order:

  1. structure
  2. spacing
  3. typography
  4. color/theming
  5. control choice
  6. micro-interactions

Step 5: Verify

Run smallest useful verification:

  • existing build script (npm run build, pnpm build)

Name one manual UI check:

  • config → spacing, section grouping, primary action placement
  • page → toolbar/header rhythm, scroll behavior
  • sidebar panel → density, collapsed/open behavior
  • modal → focus, width, action hierarchy
  • outlet → inline fit with surrounding CMS UI
  • asset source → search/result rhythm, sizing
  • inspector/full sidebar → noAutoResizer, two-pane behavior

Cross-skill routing

  • New plugin/project/folder → datocms-plugin-scaffold
  • Existing plugin feature/hooks/parameters/surface behavior → datocms-plugin-builder
  • Mixed tasks normal:
    • this skill for native DatoCMS UI
    • scaffold/builder for hooks/setup
  • Standalone CMA outside plugin UI → datocms-cma
  • Frontend site integration → datocms-frontend-integrations

Comments

Markdown supported