Part of #266 — Leonardo AI tooling initiative.
Summary
Create an Agent Skill so that AI coding assistants (Cursor, Claude Code, Codex, etc.) can activate targeted, structured guidance when helping developers use @adobe/leonardo-contrast-colors.
Agent Skills follow the agentskills.io specification.
Directory structure
skills/
└── leonardo-colors/
├── SKILL.md # Required — frontmatter + step-by-step instructions
└── references/
└── api.md # Detailed API reference (loaded on demand)
The directory name leonardo-colors must match the name field in SKILL.md frontmatter.
SKILL.md frontmatter
---
name: leonardo-colors
description: Generate accessible color themes using @adobe/leonardo-contrast-colors. Use when the user needs help building contrast-based color palettes, checking WCAG accessibility, creating adaptive themes, or using the Leonardo API.
---
SKILL.md body content
Step-by-step instructions covering:
- Installing the package
- Creating
Color and BackgroundColor instances (colorKeys, ratios, colorspace)
- Creating a
Theme (lightness, contrast multiplier, saturation, output format)
- Reading
theme.contrastColors, theme.contrastColorPairs, theme.contrastColorValues
- Using
Theme.addColor, Theme.removeColor, Theme.updateColor
- Adapting a theme at runtime (setting
theme.lightness, theme.contrast)
- Utility functions:
contrast(), convertColorValue(), luminance(), createScale()
- Common accessibility recipes: AA (4.5:1), AAA (7:1), large text (3:1), APCA
- Available colorspaces and output formats
references/api.md
Full API reference for all exported classes and functions. Loaded on demand to keep the main SKILL.md under the recommended 500-line limit.
Distribution
Point users to install via:
npx skills add https://github.com/adobe/leonardo
(once agentskills.io discovery is supported, or manually by copying the directory)
Acceptance criteria
Part of #266 — Leonardo AI tooling initiative.
Summary
Create an Agent Skill so that AI coding assistants (Cursor, Claude Code, Codex, etc.) can activate targeted, structured guidance when helping developers use
@adobe/leonardo-contrast-colors.Agent Skills follow the agentskills.io specification.
Directory structure
The directory name
leonardo-colorsmust match thenamefield inSKILL.mdfrontmatter.SKILL.mdfrontmatterSKILL.mdbody contentStep-by-step instructions covering:
ColorandBackgroundColorinstances (colorKeys, ratios, colorspace)Theme(lightness, contrast multiplier, saturation, output format)theme.contrastColors,theme.contrastColorPairs,theme.contrastColorValuesTheme.addColor,Theme.removeColor,Theme.updateColortheme.lightness,theme.contrast)contrast(),convertColorValue(),luminance(),createScale()references/api.mdFull API reference for all exported classes and functions. Loaded on demand to keep the main
SKILL.mdunder the recommended 500-line limit.Distribution
Point users to install via:
(once agentskills.io discovery is supported, or manually by copying the directory)
Acceptance criteria
skills/leonardo-colors/SKILL.mdexists with valid frontmatter (name,description)SKILL.mdbody covers the core usage patterns listed abovereferences/api.mdcontains the full API referenceSKILL.mdis under 500 lines; detailed content deferred to references