skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
datocms/agent-skills94 installs

datocms-plugin

Build, scaffold, maintain, or restyle DatoCMS plugins built with datocms-plugin-sdk and datocms-react-ui. Use when users ask to create a new DatoCMS plugin project, patch an existing plugin, add or adjust plugin hooks, field extensions, config screens, sidebars, pages, modals, asset sources, dropdown actions, lifecycle hooks, browser CMA flows, plugin permissions, package metadata, dark mode upgrades, testing local plugin changes without affecting the live installation, or UI changes that should match the DatoCMS dashboard. Route standalone CMA scripts to datocms-cma and frontend website integrations to datocms-frontend-integrations.

How do I install this agent skill?

npx skills add https://github.com/datocms/agent-skills --skill datocms-plugin
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill is a comprehensive toolkit for building and maintaining DatoCMS plugins. It provides detailed documentation, templates, and best practices for using the official DatoCMS SDK and React UI components. It emphasizes security best practices, such as least privilege for API tokens and safe handling of external data, and contains no malicious code or patterns.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

DatoCMS Plugin

Plugin code: patch in place; scaffold only when requested or absent. A project's plugin installation is CMA data, not plugin code — install, enable/disable, switch marketplace package ↔ private URL or version, edit global parameters → datocms-cma plugin operations. Local testing without touching the working installation: development copy.

Workflow

  1. Inspect silently:
    • package.json, package manager, scripts, plugin metadata, and installed SDK/UI versions
    • top-level connect() call, usually src/main.tsx or src/index.tsx
    • touched hook pair, render component, helper, CSS file, and current UI pattern
    • plugin-local AGENTS.md if present
  2. Classify the request:
    • Existing plugin: package already exists and user asks to patch, add, maintain, fix, release-prep, or restyle. Default here.
    • New plugin: user asks to create/scaffold/bootstrap a plugin folder, or no plugin project exists.
    • Design pass: request mentions styling, layout, density, spacing, theme, dark mode, Canvas tokens, legacy CSS variables, hardcoded colors, forms, tables, panels, controls, or matching DatoCMS UI patterns.
    • Mixed: combine hook/scaffold work with design changes in one pass.
  3. Ask only when inspection cannot resolve a behavior-changing choice:
    • plugin/folder name for a new scaffold
    • private vs marketplace plugin when package metadata changes
    • target model/field/surface when several are plausible
    • whether a new permission or dependency is allowed
    • whether direct browser CMA calls are required instead of SDK helpers
  4. Load references after file inspection. Use the reference for the touched surface; do not load the full bundle.
  5. Patch in place:
    • keep the existing file layout, package manager, scripts, naming, and UI structure
    • update paired hooks together: declaration + render, trigger + modal, dropdown declaration + execute handler
    • update permissions and package metadata in the same patch when the code path needs them
    • add dependencies only when the implementation imports them
  6. Verify with the plugin's existing command. Prefer the build script; add typecheck, lint, or tests only when the project already defines them and they cover the change.
  7. Report the patch, command result, and remaining DatoCMS check: config save, field render, modal resolve, asset select, permission branch, page navigation, or resize behavior.

Reference map

Common

NeedLoad
Follow-up maintenance shortcutsreferences/rapid-patterns.md
Exact connect(), hook pairs, render helper, Canvas, frame sizingreferences/sdk-connect-and-frames.md
Base ctx, entity repos, form values, browser CMA, endpoints, async errorsreferences/sdk-context-and-cma.md
Target code has no clear precedentreferences/current-plugin-patterns.md
Plugin permission changesreferences/permissions.md
Localized values, field paths, Structured Text Slate form valuesreferences/form-values.md

New plugin

NeedLoad
Project files and package baselinereferences/project-scaffold.md
First hook pair selectionreferences/surface-starters.md

Surfaces

SurfaceLoad
Config screenreferences/config-screen.md
Field extensionreferences/field-extensions.md
Sidebar panel or full record sidebarreferences/sidebar-panels.md
Custom pagereferences/custom-pages.md
Dropdown actionreferences/dropdown-actions.md
Lifecycle hookreferences/lifecycle-hooks.md
Modalreferences/modals.md
Outletreferences/outlets.md
Inspectorreferences/inspectors.md
Asset sourcereferences/asset-sources.md
Upload sidebar or upload panelreferences/upload-sidebars.md
Structured Text customizationreferences/structured-text.md
Record presentation or picker queryreferences/record-presentation.md

Design

NeedLoad
Dark-mode-only migrationreferences/dark-mode-upgrade.md
First design passreferences/design-foundations.md + references/design-datocms-react-ui-bridge.md
Token/variable lookupreferences/design-tokens.md
Layouts, pages, split views, toolbarsreferences/design-layouts.md
Forms, controls, settingsreferences/design-forms-and-controls.md
Dropdowns, tabs, tables, lists, noticesreferences/design-navigation-feedback-and-data-display.md
Surface shell rulesreferences/design-plugin-surfaces.md
Raw CSS fallback snippetsreferences/design-raw-css-fallbacks.md

For design work, prefer public datocms-react-ui components when they match the required shape. Fall back to local React/CSS only when public components do not express the layout cleanly. Use Canvas tokens and variables directly; customize beyond them only for explicit product styling, vendor widgets, media treatments, data visualization, or effects they cannot express.

Guardrails

  • Keep exactly one top-level connect() call.
  • Inspect existing connect() before adding hooks.
  • Import datocms-react-ui/styles.css once in the plugin entry file; keep src/vite-env.d.ts (/// <reference types="vite/client" />) or TS rejects it.
  • Wrap every rendered surface in <Canvas ctx={ctx}>.
  • Use <Canvas ctx={ctx} noAutoResizer> for pages, inspectors, and full-width sidebars.
  • Use switch for ID-dispatched render hooks.
  • Use import type { ... } for SDK types.
  • Guard ctx.item before reading saved-record data.
  • Use get(ctx.formValues, ctx.fieldPath) in field extensions; use localized-value helpers elsewhere.
  • Use deep-compare effects when depending on ctx object properties.
  • Keep ctx.openModal() parameters and ctx.resolve() values JSON-serializable.
  • Normalize stored plugin parameters at read/save boundaries.
  • Use ctx.setParameters() directly in renderManualFieldExtensionConfigScreen.
  • Modular Content is rich_text in FieldType and API field_type. Do not create editor field extensions for Modular Content, single block, or Structured Text fields; use addons (Modular Content: fieldTypes: ['rich_text']; single block has no FieldType: overrideFieldExtensions, or fieldTypes: 'all' if every field type may offer it).
  • Prefer SDK helpers before browser CMA calls. If browser CMA is required, use @datocms/cma-client-browser, add only required permissions, and guard missing ctx.currentUserAccessToken.
  • Keep modals, sidebars, and config screens compact.

Routing

  • DAST analysis, validation, or transforms → datocms-structured-text: document model, editing, or conversion. Keep Slate form values and editor hooks here; never pass DAST to ctx.setFieldValue. Load the specialist only for DAST work. Missing sibling reference → install that skill from datocms/agent-skills or update the full bundle.

  • Website preview, Content Link, draft mode, cache tags, frontend rendering, or framework wiring -> datocms-frontend-integrations; guided multi-part website setup -> datocms-setup.

  • Content modeling decisions -> datocms-content-modeling.

  • Content delivery GraphQL query work -> datocms-cda.

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/datocms/agent-skills/datocms-plugin">View datocms-plugin on skillZs</a>