canvas-component-metadata

Validate Canvas component.yml metadata against structural and type requirements.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/AJV009/drupal-devkit --skill canvas-component-metadata
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: canvas-component-metadata
Source: https://github.com/AJV009/drupal-devkit/tree/main/plugins/migrate-drupal-canvas/reference/canvas-starter/canvas-component-metadata
Command: npx skills add https://github.com/AJV009/drupal-devkit --skill canvas-component-metadata

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Canvas component metadata validation is tedious and error-prone; this guide standardizes the process to ensure consistent, correct definitions across projects.

Core Features & Use Cases

  • Validate and document component.yml structures (name, machineName, status, required, props, slots).
  • Provide a canonical schema to avoid common mistakes when creating or updating Canvas components.
  • Use cases include defining new components, updating props/slots, and troubleshooting prop validation errors in the Canvas UI.

Quick Start

Create a valid component.yml by following this schema and then validate it against the guidelines.

Frequently Asked Questions about canvas-component-metadata

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Canvas component metadata in component.yml for Drupal?

To validate Canvas component metadata, define your component.yml with the correct name, machineName, status, props, slots, and enums, then check it against the canonical schema guidelines to ensure safe rendering and consistent discovery in editors.

What is the required structure for a Drupal Canvas component.yml file?

The required structure for a Canvas component.yml includes valid YAML frontmatter defining name, machineName, status, required props, slots, and enums to satisfy the structural and type requirements of the component schema.

Why does my Canvas component fail prop validation in the editor UI?

Canvas component prop validation fails when your component.yml definitions do not match the required schema structure, missing required props, slots, or enums, which prevents safe rendering and consistent discovery in the editor.

Can I use this metadata schema to update existing Canvas components?

Yes, you can use this metadata schema to update existing Canvas components by applying the structural and type requirements to your current component.yml definitions, modifying props and slots while maintaining valid YAML frontmatter.

What's the best way to avoid common mistakes when defining Canvas component props and slots?

The best way to avoid common mistakes defining Canvas component props and slots is to follow a canonical schema that standardizes component.yml creation, ensuring correct type requirements and structural validation across projects.