mcpField
D
drupal-canvas

drupal-canvas

github.com/grasmashDevelopment82148 installsUpdated 4w ago
Repository

About drupal-canvas

An entry point to the upstream skill suite for Drupal Canvas React/JSX code components. It directs users to install the maintained drupal-canvas/skills package instead of relying on a potentially stale copy.

Key features

  1. 01Points to the maintained upstream skill suite
  2. 02Explains when the skills apply
  3. 03Lists upstream skills
  4. 04Separates Twig SDC guidance from code component guidance

Use cases

  1. 01Start building or editing a Canvas code component
  2. 02Choose between a code component and Twig SDC
  3. 03Find guidance on Canvas content templates or data fetching

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/grasmash/drupal-claude-skills --skill drupal-canvas

After installing, type/drupal-canvasin Claude Code to confirm it loaded.

Details

From the project README

Drupal Canvas Code Components — use the upstream suite

Canvas Code Components (React/JSX) are covered by the officially maintained drupal-canvas/skills suite (MIT licensed). This repo does not mirror it: a local copy goes stale as upstream evolves, and stale component rules are worse than none. Install the real thing:

npx skills add drupal-canvas/skills

To scaffold a codebase for Code Components, upstream publishes a CLI: npx @drupal-canvas/create <project>.

When This Skill Activates

  • Building, editing, or pushing a Canvas Code Component
  • Choosing between a Code Component and a Twig SDC
  • Looking for Canvas guidance and unsure which skill holds it

Upstream skills

The suite ships these skills (check the repo for the current list):

  • canvas-component-composability
  • canvas-component-definition
  • canvas-component-metadata
  • canvas-component-push
  • canvas-component-utils
  • canvas-content-templates
  • canvas-data-fetching
  • canvas-design-decomposition
  • canvas-headless
  • canvas-navigation-components
  • canvas-page-definition
  • canvas-regions
  • canvas-styling-conventions
  • canvas-workbench

Complements in this repo

The upstream suite is React/JSX only. For everything else:

  • drupal-canvas-sdc — Twig Single Directory Components in themes and modules: component.yml schemas, Canvas registration rules, component config entities, versioning, and deploy pitfalls.
  • canvas-contribution — contributing Canvas features and fixes back to drupal.org (issue forks, merge requests, composer patches).

Comments

Markdown supported