Skip to content

[codex] Add shadcn theme variables skill - #14

Merged
Zochory merged 3 commits into
mainfrom
codex/add-shadcn-theme-variables
Jul 19, 2026
Merged

[codex] Add shadcn theme variables skill#14
Zochory merged 3 commits into
mainfrom
codex/add-shadcn-theme-variables

Conversation

@Zochory

@Zochory Zochory commented Jul 19, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds skills/figma-agent/shadcn-theme-variables/SKILL.md for semantic-only shadcn theme variable creation and repair in Figma.
  • Registers the skill in the Figma skill router.
  • Adds the skill to the README catalogue and updates the visible skill count.

Notes

The skill intentionally stays semantic-only and does not create a primitive token layer unless the user explicitly asks for one. It treats project CSS as the source of truth when available.

I did not update skills-lock.json; the visible repository validation checks canonical SKILL.md layout and frontmatter, but not the lockfile. If the lockfile is generated by release tooling, it should be regenerated by that workflow.

Validation

  • Checked the repository validation script expectations from scripts/validate_skills.py.
  • Checked the router index test expectations from tests/figma_skill_router.test.ts.
  • Could not run local repo tests because the container cannot clone GitHub directly and gh is not installed.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new skill, shadcn-theme-variables, which assists in creating, repairing, or normalizing Figma Variables to align with the shadcn/ui semantic theming model. The changes include adding the skill definition file, updating the main README catalog, and integrating the skill into the Figma skill router with specific tie-breaker rules. The review feedback correctly points out that the border-radius scale calculation in the skill definition should be updated to use shadcn's standard subtraction-based formula (e.g., radius - 2px and radius - 4px) instead of a multiplication-based scale.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +139 to +155
- `radius-sm`
- `radius-md`
- `radius-lg`
- `radius-xl`
- `radius-2xl`
- `radius-3xl`
- `radius-4xl`

Use the user's CSS values when available. If only the base radius is available, use shadcn's scale relationship as the naming guide and compute practical Figma values from the base radius:

- `radius-sm`: `radius * 0.6`
- `radius-md`: `radius * 0.8`
- `radius-lg`: `radius`
- `radius-xl`: `radius * 1.4`
- `radius-2xl`: `radius * 1.8`
- `radius-3xl`: `radius * 2.2`
- `radius-4xl`: `radius * 2.6`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Shadcn/ui uses a subtraction-based formula for its border-radius scale rather than a multiplication-based scale. Specifically, it defines radius-lg as the base --radius, radius-md as calc(var(--radius) - 2px), and radius-sm as calc(var(--radius) - 4px). It also does not include larger sizes like radius-xl through radius-4xl by default.

Consider updating this section to align with the standard shadcn/ui radius scale:

- `radius-sm`
- `radius-md`
- `radius-lg`

Use the user's CSS values when available. If only the base radius is available, use shadcn's scale relationship as the naming guide and compute practical Figma values from the base radius:

- `radius-sm`: `radius - 4px`
- `radius-md`: `radius - 2px`
- `radius-lg`: `radius`

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new installable Figma skill that guides agents through creating/repairing semantic-only shadcn/ui theme variables (light/dark modes, semantic token set, bindings), and wires it into the catalogue and router documentation so it is discoverable and correctly routed.

Changes:

  • Added shadcn-theme-variables skill document with semantic token architecture, mode/value rules, binding guidance, and cleanup/conflict handling.
  • Registered the new skill in the figma-skill-router catalogue index and tie-breaker guidance.
  • Updated the README catalogue entry and incremented the displayed skill count to 57 (matches current skills/figma-agent/*/SKILL.md count).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
skills/figma-agent/shadcn-theme-variables/SKILL.md New skill definition and workflow for semantic shadcn theme variable creation/repair in Figma.
skills/figma-agent/figma-skill-router/SKILL.md Adds the new skill to routing index + clarifies when to use it vs token-tailwind-theme-sync.
README.md Adds the skill to the public catalogue and updates the visible skill count.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Zochory
Zochory marked this pull request as ready for review July 19, 2026 02:34
@Zochory
Zochory merged commit fbe8b16 into main Jul 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants