canvas-component-metadata

Define valid component.yml metadata for Canvas components with props, slots, and enums.

14|2|Updated Feb 14, 2025
One-click install
npx skills add https://github.com/balintbrews/canvas-starter --skill canvas-component-metadata-balintbrews
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: canvas-component-metadata
Source: https://github.com/balintbrews/canvas-starter/tree/main/.agents/skills/canvas-component-metadata
Command: npx skills add https://github.com/balintbrews/canvas-starter --skill canvas-component-metadata-balintbrews

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Define valid component.yml metadata for Canvas components, including props, slots, and enums. Use when (1) Creating a new component, (2) Adding or modifying props, (3) Troubleshooting "not a valid choice" or prop type errors, (4) Mapping enums to CVA variants.

Core Features & Use Cases

  • Enforces the required YAML frontmatter and top-level keys for component.yml.
  • Validates user-facing prop definitions (camelCase IDs, required props, and examples) and enforces UI labeling guidelines.
  • Documents slot schemas and enum mappings for CVA, enabling consistent component composition and debugging.

Quick Start

Create or update a component.yml following the guidelines in this Skill to ensure a valid Canvas component metadata file.

Frequently Asked Questions about canvas-component-metadata

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

FAQPage Schema
How do I define valid props and slots in component.yml for Canvas components?

The best way to define component.yml metadata is conforming to the required YAML frontmatter and top-level keys. This enforces camelCase prop IDs, required fields, and UI labeling guidelines, while documenting slot schemas for consistent composition.

Why does my Canvas component prop throw a not a valid choice or type error?

A not a valid choice or type error in Canvas components usually means your prop definitions or enum mappings are invalid. You need to troubleshoot the component.yml metadata by validating prop types and correctly mapping enums to CVA variants.

How do I map enums to CVA variants in component.yml?

You need a Canvas component.yml metadata file containing props, slots, and enums. The metadata must conform to the required YAML frontmatter structure and documentation rules to ensure machine-discoverable metadata and human-readable guidance.

What top-level keys are required in component.yml metadata?

Component.yml metadata validation applies to creating new components, adding or modifying props, and troubleshooting type errors. If your scenario requires defining valid metadata for Canvas components, this approach ensures machine-discoverable metadata and human-readable guidance.