workday/canvas-kit/sana-canvas-kit-migration
Claude Code and agent skill by workday/canvas-kit
- community
Checking that the SKILL.md file is still in the repository.
Upgrade Canvas Kit across major versions. Always run codemods before manual edits. Use when migrating v9+, running @workday/canvas-kit-codemod, following upgrade guides, or bumping canvas-tokens-web / canvas-system-icons-web. Hands off leftover deprecations to /sana-canvas-kit-component-selection and leftover tokens to /sana-canvas-kit-tokens.
Install
npx vskill@latest install workday/canvas-kit/sana-canvas-kit-migrationSKILL.md
Canvas Kit Migration
Always run the codemod(s) before touching code by hand. Codemods traverse the AST and apply prescribed transforms — manual edits first waste time and miss patterns.
REQUIRED SUB-SKILL: /sana-canvas-kit-version. Run it first to confirm the installed version and which upgrade guide(s) apply — don't re-derive version detection or upgrade-guide lookup here.
How to apply styles after migration → /sana-canvas-kit-styling. Leftover deprecated exports/props → /sana-canvas-kit-component-selection. Leftover token paths → /sana-canvas-kit-tokens.
When to apply
- Upgrading
@workday/canvas-kit-react(or preview/labs packages) across major versions - Migrating
@workday/canvas-tokens-webor@workday/canvas-system-icons-web - Following a version upgrade guide (v9 through v16)
- User asks "how do I migrate to Canvas Kit vN"
For the full codemod command list, see references.md. For upgrade-guide prose, call MCP get-canvas-kit-upgrade-guides or read modules/docs/mdx/<version>-UPGRADE-GUIDE.mdx.
Hard rules
- Codemods run sequentially — if you're on v14, run v15 before v16. Never skip a major.
- One version per isolated commit — easier to review, revert, and bisect.
- Upgrade dependencies before running the codemod — the codemod updates source, not
package.json.
- Codemods only touch `.js`, `.jsx`, `.ts`, `.tsx` — edit
.json,.mdx,.md, and config
manually.
- Codemods are not bulletproof — always review the diff and run tests.
Workflow
Check installed versions
See /sana-canvas-kit-version for the full detection workflow and version matrix. Quick check:
Run a version codemod
Scope [path] to directories that need updating (src/, specific monorepo packages). Smaller scope = faster runs and smaller diffs.
Alternative (temporary install):
Version chain
Run each transform in order from your installed major to target major. The v11 codemod expects v10 source input, but there is no v10 transform — the sequence jumps v9 → v11.
v5 → v6 → v7 → v8 → v9 → v11 → v12 → v13 → v13.2 → v14 → v14.1 → v15 → v16
Also available mid-chain: v13.2 (React tokens → canvas-tokens-web v2).
Sub-codemods (run outside the main chain)
Run these when crossing the boundary they cover, after upgrading the dependency they expect:
| Transform | When | Prerequisite | |
|---|---|---|---|
v14-tokens | Migrating @workday/canvas-kit-react/tokens or tokens v2→v3 | @workday/canvas-tokens-web v3+ installed | |
v14.1 | Migrating deprecated style props (padding="s", etc.) | Part of v14.1+ upgrade | |
v15-icons | Accent, applet, expressive icon APIs | v15 icon package changes | |
icon-migration | Deprecated @workday/canvas-system-icons-web exports | Bump icons to v5 before running |
For v16 specifically, the v16 codemod handles hyperlink props, card variant, and side panel variant. Run icon-migration separately after upgrading system icons to v5.
After each codemod
- Review the full diff — codemods can miss dynamic patterns, string templates, and non-code files.
- Open the matching upgrade guide. Items marked 🤖 were automated; everything else is your checklist.
- Run leftover deprecation cleanup →
/sana-canvas-kit-component-selection. - Run leftover token cleanup →
/sana-canvas-kit-tokens. yarn lint(formatting from codemods may not match project style).yarn typecheckandyarn test.
What codemods never do
- Upgrade or remove
package.jsondependencies - Transform non-
.js/.jsx/.ts/.tsxfiles - Handle dynamic icon selection (variables built from strings, config without static imports)
- Migrate icons from packages other than
@workday/canvas-system-icons-web(icon-migration) - Cover every breaking change — upgrade guides list manual steps
- Guarantee zero regressions — QA review is required
v16 quick reference
Canvas Kit v16 also requires separate packages:
For Sana theme setup, fonts, and component visual changes, see the v16 upgrade guide. MCP: get-canvas-kit-upgrade-guides, get-canvas-kit-icon-migration.
Anti-patterns
- ❌ Manual search-and-replace before running the codemod
- ❌ Skipping intermediate majors (v14 → v16 without v15)
- ❌ Mixing codemod output with unrelated feature work in one commit
- ❌ Running
icon-migrationbefore upgrading@workday/canvas-system-icons-web - ❌ Assuming the codemod updated
package.json - ❌ Ignoring non-🤖 items in the upgrade guide
Decision guide
Additional resources
- Full codemod command table: references.md
- General codemod guidance:
modules/docs/mdx/CODEMODS.mdx - Icon migration:
modules/docs/mdx/icon-migration-codemod.mdx - Token migration codemod:
modules/docs/mdx/tokens/TokenMigrationCodemod.mdx - MCP upgrade guides:
get-canvas-kit-upgrade-guides
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/sana-canvas-kit-migration/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/workday/canvas-kit/sana-canvas-kit-migration)