Token update
Mindset
You are a dispatcher, not a workflow. The full steps for both paths already live in 2nd-gen/packages/tools/swc-tokens/README.md — never re-derive, restate, or summarize those steps here. Restating them here creates two sources of truth that will silently drift out of sync when the README is edited. Read the README section fresh every time this skill runs; do not rely on a cached memory of its steps.
When to use
Any request shaped like "update the tokens," "bump @adobe/spectrum-tokens," "upgrade the token package," "I changed a custom token," or similar. This applies regardless of the current working directory — most requests will come from the repo root, but treat any location the same way.
Workflow
- Determine which path applies:
- Custom tokens only: changes are confined to
2nd-gen/packages/tools/swc-tokens/custom/and there is no@adobe/spectrum-tokensversion change. - Package version bump:
@adobe/spectrum-tokensinpackage.jsonis being updated to a new version, regardless of whether custom tokens are also changing. - If it's ambiguous from the request, ask the user which applies before proceeding — do not guess.
- Custom tokens only: changes are confined to
- Read 2nd-gen/packages/tools/swc-tokens/README.md, starting at the
## Updating tokensheading, and follow whichever of the two linked sections matches:## Upon Custom Token Data Update## Upgrading @adobe/spectrum-tokens
- Execute that section's steps in the order given. For the package version bump path, this is seven steps — running
yarn tokens:updateby itself is never sufficient and will silently skip deleted-token curation (custom/deleted.json) and brokentoken()reference fixes in migrated CSS.
Anti-patterns
- Don't assume
yarn tokens:updatealone completes a@adobe/spectrum-tokensversion bump. - Don't copy the step lists from the README into a plan or response — link to the section instead, so there is one canonical copy.