drupal-canvas
GitHubDrupal Canvas 组件开发入口技能,指引使用上游官方 React/JSX 技能套件,并补充本地 Twig SDC 注册及贡献指南。用于创建、修改或推送 Canvas 组件时的决策与操作。
Trigger Scenarios
Install
npx skills add grasmash/drupal-claude-skills --skill drupal-canvas -g -y
SKILL.md
Frontmatter
{
"name": "drupal-canvas",
"description": "Entry point for Drupal Canvas Code Components (React\/JSX). Points to the officially maintained drupal-canvas\/skills suite (component definition, metadata, push, styling, data fetching, regions, page definition, content templates) and to this repo's complements for Twig SDCs and upstream contribution. Use when creating, modifying, or pushing Canvas Code Components, or when deciding which Canvas skill applies."
}
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-composabilitycanvas-component-definitioncanvas-component-metadatacanvas-component-pushcanvas-component-utilscanvas-content-templatescanvas-data-fetchingcanvas-design-decompositioncanvas-headlesscanvas-navigation-componentscanvas-page-definitioncanvas-regionscanvas-styling-conventionscanvas-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.ymlschemas, 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).
Version History
-
19514f4
Current 2026-10-19 07:28
重构为上游技能指向,修正 SDC 注册规则与开发模式说明,分离验证行为与未解释观察。
- eb9b3d3 2026-07-25 05:35
Dependencies
-
suggested
drupal-canvas/skills


