Agent skill

Shift UI Components

by shift-editor in shift-editor/shift

Guides design, implementation and review of Shift interface work: shared Base UI wrappers, Tailwind v4 theme tokens, Figma matching and accessible interaction states.

Apache-2.0Auto-check passedFrontend & Design

Install Shift UI Components

skills CLI
$ npx skills add shift-editor/shift --skill ui -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install shift-editor/shift ui --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/shift-editor/shift.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/ui .claude/skills/ui && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ui
GitHub stars
343
Token cost
~2.5k tokens
SKILL.md length
1,301 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guides design, implementation and review of Shift interface work: shared Base UI wrappers, Tailwind v4 theme tokens, Figma matching and accessible interaction states.

  • Works in 5 steps: docs/architecture/index.md for… → packages/ui/docs/DOCS.md for the shared… → apps/desktop/src/renderer/index.css for… → …
  • Building a new dialog, menu or popover in the Shift desktop app
  • SKILL.md covers Sources of truth, Architecture boundary, Tailwind and theme tokens and Matching a visual reference, plus 6 more sections
  • Calls pnpm

What it does

This skill is the working guide for user interface changes in the Shift font editor. Before editing an unfamiliar surface the agent reads the architecture index, the shared UI package docs, the renderer stylesheet that holds the Tailwind v4 theme, the neighboring components, and any supplied Figma frame or screenshot, which is treated as the visual target. When library behavior is unclear it checks the installed Base UI types rather than guessing from Radix, shadcn or older APIs.

The architecture rules are specific: look for a matching Base UI primitive before building a control, put shared wrappers in the UI package under the primitive's name, import them from the shared package and never import Base UI directly in the desktop app, and keep application state in the app. Wrappers use forwardRef and the primitive's prop types, triggers compose through the render prop to produce exactly one interactive element, and Base UI data attributes drive state styling. The excerpt is cut off in the Tailwind and theme token rules.

When your agent uses it

  • Building a new dialog, menu or popover in the Shift desktop app
  • Matching a component to a supplied Figma frame or screenshot
  • Reviewing a UI change for accessibility, token use and visible regressions

Example prompts

  • “Add a tooltip to the icon-only toolbar buttons using the shared UI package.”
  • “Implement this Figma frame for the glyph properties panel with the existing theme tokens.”
  • “Audit the new export dialog for keyboard access and focus states.”

Requirements

  • The Shift repository with its shared UI package and Tailwind v4 theme

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. docs/architecture/index.md for documentation routing.
  2. packages/ui/docs/DOCS.md for the shared component boundary.
  3. apps/desktop/src/renderer/index.css for Tailwind v4 theme tokens, fonts, and custom utilities.
  4. The relevant existing component and its neighboring components for local composition and density.
  5. Any supplied Figma frame, screenshot, or product reference. Treat it as the visual target, not merely inspiration.

What it can do on your machine

Read from SKILL.md and the folder at commit e7dacfa. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Shift UI Components loads about 2.5k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 1,301 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from shift-editor/shift at commit e7dacfa, republished under its Apache-2.0 licence (© shift-editor). 1,301 words, ~2,505 tokens.

Download SKILL.mdSave it as .claude/skills/ui/SKILL.md (or your agent's skills folder).
name
ui
description
Design, implement, audit, or review Shift user interfaces and shared UI components. Use for React components, Base UI primitives, Tailwind styling or theme tokens, Figma/reference matching, accessibility, icon-only actions, tooltips, menus, popovers, dialogs, forms, layout, and visible UI regressions.

/ui — Shift Interface Work

Build interfaces that match the supplied design, use Shift's shared primitives and semantic theme, and remain accessible in every interaction state.

Sources of truth

Read these before editing an unfamiliar UI surface:

  1. docs/architecture/index.md for documentation routing.
  2. packages/ui/docs/DOCS.md for the shared component boundary.
  3. apps/desktop/src/renderer/index.css for Tailwind v4 theme tokens, fonts, and custom utilities.
  4. The relevant existing component and its neighboring components for local composition and density.
  5. Any supplied Figma frame, screenshot, or product reference. Treat it as the visual target, not merely inspiration.

When library behavior or composition is unclear, inspect the installed Base UI types and current Base UI documentation. Do not guess from Radix, shadcn, or an older Base UI API.

Architecture boundary

  • Check whether Base UI has a matching primitive before implementing an interactive control.
  • Shared primitives live in packages/ui/src/components/{component}/ and wrap @base-ui-components/react/{component}.
  • Application code imports shared controls from @shift/ui; never import Base UI directly in the desktop app.
  • Keep application state and domain behavior in the consuming app. Shared wrappers own primitive composition, reusable visual defaults, and widget-local behavior only.
  • Use the Base UI component name for its Shift wrapper: Button, Menu, Popover, Tooltip, and so on.
  • Re-export every shared component and public prop type through its component barrel and packages/ui/src/index.ts.
  • Prefer React.ComponentPropsWithoutRef, React.ElementRef, and React.forwardRef so wrappers preserve the primitive contract. Set displayName on forwarded components.
  • Compose Base UI triggers with its render prop. Produce exactly one interactive DOM element: no nested buttons, no trigger-only wrapper spans, and no duplicated event targets.
  • Use Base UI state attributes such as data-[disabled], data-[highlighted], data-[active], and data-[starting-style] instead of duplicating primitive state in React.

Tailwind and theme tokens

Shift uses Tailwind CSS v4. The renderer theme is declared in the @theme block in apps/desktop/src/renderer/index.css, and that stylesheet scans shared UI source with:

css
@source "../../../../packages/ui/src/**/*.tsx";

Follow these rules:

  • Use semantic theme utilities before raw Tailwind palette colors or literals: bg-surface, bg-panel, bg-input, bg-hover, text-primary, text-secondary, text-muted, border-line-subtle, ring-accent, and related tokens.
  • Remember that Shift overrides Tailwind's typography scale: text-sm is 12px, text-ui is 11px, and text-xs is 10px. Check the theme instead of assuming Tailwind defaults.
  • Use opacity modifiers on semantic tokens when appropriate, such as bg-hover/50.
  • Do not copy legacy hard-coded hex values or generic palette classes when an existing semantic token expresses the role.
  • Add a new theme token only for a stable semantic role that will be reused or themed. Name the role, not the component or current color.
  • Reserve literal colors and inline styles for genuinely data-driven graphics, canvas/SVG rendering, or platform-defined colors such as native window controls.
  • Use cn from @shift/ui or the package-local utility for conditional classes and consumer overrides. Shared wrappers must merge className through cn so tailwind-merge resolves conflicts.
  • Keep reusable visual defaults in the shared wrapper. Do not restyle the same primitive independently at many call sites.

Matching a visual reference

Before changing styles, identify the reference's:

  • typography and density;
  • foreground, background, border, and shadow roles;
  • spacing, dimensions, radius, and alignment;
  • hover, focus, pressed, selected, disabled, read-only, open, error, and empty states;
  • popup side, offset, collision behavior, layering, and arrow treatment.

Map those roles to existing theme tokens first. Compare the finished implementation with the reference at the app's actual scale. Do not declare a match from class names alone.

If the reference is ambiguous or conflicts with an established interaction pattern, ask which behavior wins before inventing a new one.

Large lists and trees

  • Before rendering a collection that can grow with glyph points, catalog entries, or document content, estimate the mounted DOM count at realistic scale. Window or paginate unbounded rows; do not map the entire logical collection into React elements merely because scrolling hides most of it.
  • Keep the complete logical order for selection and keyboard navigation, but mount only the viewport and a small overscan. Focus, selection, and mounted rows are distinct; an aria-activedescendant must always identify a mounted row. Scroll a keyboard target into the rendered window before publishing it as active.
  • Trees are composite widgets: Tab enters/leaves; arrow keys navigate the visible expanded order. Preserve focus and selection through collapse, edits, and manual scrolling. Check the WAI-ARIA tree pattern before inventing per-row keyboard behavior.
  • Test both bounded mounted rows and reaching/selecting an offscreen item. Extract a shared virtualizer only when multiple surfaces actually need the same layout and focus contract.
Show full SKILL.md (579 more words)Show less

Accessibility and interaction

  • Every icon-only action needs an accessible name and a concise visible tooltip.
  • Tooltip text always names the action. Keep it concise and do not repeat the target's name when the surrounding row or control already identifies it (Hide outline, not Hide Regular outline). Keep the same tooltip and accessible name when the action is unavailable; disabled styling and behavior communicate availability without replacing the action name with an explanation.
  • If an unavailable control must retain its tooltip, use aria-disabled, guard its action, and style that state. Do not use native disabled, which removes focus and pointer interaction.
  • Preserve keyboard navigation supplied by Base UI. Verify focus-visible, not only pointer hover.
  • Use semantic roles and labels for toolbars, navigation, dialogs, groups, sliders, and form controls.
  • Keep focus indicators visible. Do not remove outlines without an equivalent token-based focus treatment.
  • Portal popups above application content and give their positioner the shared layering class.
  • Close, menu, popover, and dialog triggers are actions too; icon-only compound triggers follow the same label and tooltip rules.

Coverage audits

For broad UI work such as "add all missing tooltips," do not patch only the first reported control.

  1. Define the invariant being audited, such as “every icon-only user action has an accessible name and tooltip.”
  2. Trace the actual component tree for every requested surface.
  3. Search by primitive (Button, MenuTrigger, PopoverTrigger, DialogClose, toolbar controls), icon names, and accessible labels. A single grep pattern is not a complete audit.
  4. Include persistent and hover-revealed controls, compound triggers, read-only or disabled states, dialogs, and both home and editor views.
  5. Record a temporary coverage ledger while working: surface, control, shared owner, enabled state, unavailable state, accessible label, and tooltip copy.
  6. Centralize repeated behavior in the narrowest existing shared component when that removes omissions without hiding domain-specific copy.
  7. Recheck the complete inventory after edits. Do not equate “wrapper exists in source” with “tooltip works in the rendered app”; verify compound trigger composition and the active build.

Testing and review evidence

Test observable behavior, not styling implementation:

  • Do not add unit or E2E tests that assert Tailwind classes, static tooltip wiring, component nesting, or Base UI behavior.
  • Add tests when Shift adds meaningful behavior: unavailable controls remain tooltip-accessible, keyboard interaction changes state, focus is restored, a form validates, or a menu action changes application state.
  • For thin wrappers, typechecking plus focused visual/manual verification is usually the right evidence.
  • For materially visible work, capture the actual implementation in each affected state for review. Use the remote E2E workflow when automated Electron verification is warranted; do not open Electron on the user's current Mac.
  • Never update a visual baseline without inspecting the diff and confirming it matches the intended design.

Validation

Run the smallest relevant checks, then the shared checks for cross-cutting UI changes:

bash
pnpm format:files <changed files...>
pnpm lint:check
pnpm typecheck

Run repository commands inside the Nix dev shell as required by AGENTS.md. If behavior changed, run the focused owning test. If only visual defaults or declarative wiring changed, report the focused manual verification instead of inventing a low-value test.

Completion checklist

  • Supplied reference matched at actual application scale.
  • Existing Base UI primitive and @shift/ui wrapper used.
  • Exactly one interactive element per composed trigger.
  • Semantic theme tokens used; no avoidable raw colors.
  • Pointer, keyboard, disabled/read-only, and open states considered.
  • Icon-only actions have accessible names and tooltips.
  • Requested surfaces were audited completely, not sampled.
  • Shared styling lives in the shared wrapper.
  • Formatting, lint, and typecheck pass.
  • Visible changes have appropriate manual or screenshot evidence.

© shift-editor, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .codex/skills/ui of shift-editor/shift.

Open the folder on GitHubat commit e7dacfa

Compare with similar skills

Shift UI Components next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Shift UI Components compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Shift UI Components this skillshift-editor/shift343—~2.5kAutomated safety check: PassApache-2.0
Extract DesignManavarya09/design-extract4.2k—~786Automated safety check: NotesMIT
Shadcn Tailwind UILiarMTTT/TavernWeave148—~1.7kAutomated safety check: PassCustom licence
Light Frontend DesignLight0305/Light-skills640—~3.1kAutomated safety check: PassMIT
Tailwind V4 Shadcnsecondsky/claude-skills227—~4kAutomated safety check: PassMIT
Connect Component To Figmadequelabs/cauldron129—~2kAutomated safety check: PassMPL-2.0

Similar skills

  • Extract Design

    Manavarya09/design-extract

    Extract the full design language from any website URL. An agent skill from Manavarya09/design-extract.

    4.2k GitHub stars~786 tokensUpdated 8 days ago
    Frontend & DesignAuto-check: notes
  • Shadcn Tailwind UI

    LiarMTTT/TavernWeave

    Build, restyle, or review accessible React interfaces that use shadcn/ui, Radix UI primitives, and Tailwind CSS.

    148 GitHub stars~1.7k tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed
  • Light Frontend Design

    Light0305/Light-skills

    Light 按需工程技能·前端设计:把模糊的「做个好看的界面」落成能跑的 React/Tailwind/shadcn 代码 + 设计决策说明—— 有视觉记忆点(signature element)、风格自洽(design tokens 一致)、适配场景(学术海报/数据大屏/管理后台/移动端/营销 landing 信息密度各不同)、反「一眼 AI」(紫蓝渐变/Inter/16px 圆角/巨型…

    640 GitHub stars~3.1k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Tailwind V4 Shadcn

    secondsky/claude-skills

    | Production-tested setup for Tailwind CSS v4 with shadcn/ui, Vite, and React.

    227 GitHub stars~4k tokensUpdated 9 days ago
    Frontend & DesignAuto-check passed
  • Connect Component To Figma

    dequelabs/cauldron

    Add a Figma Code Connect (.figma.tsx) file for a Cauldron React component.

    129 GitHub stars~2k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Frontend UI Functional

    victorGPT/vibeusage

    A skill your agent uses when building or refactoring functional React/Vite/Tailwind UI pages, templates, or component libraries that need consistent structure, tokenized styling, accessibility…

    131 GitHub stars~939 tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed

More from shift-editor/shift

All 14 skills in this repo
  • Shift Commit Rules

    shift-editor/shift

    Rules for writing git commits in the Shift font editor repo: Conventional Commits subjects, user-facing changelog wording, concise subjects and logical commit boundaries.

    343 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check: notes
  • Dead Code Removal with Knip

    shift-editor/shift

    Finds unused files, exports and class members with Knip, then verifies each candidate through reference tracing before removing anything, never using knip --fix.

    343 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Shift Subsystem Docs

    shift-editor/shift

    Updates or creates DOCS.md files for Shift subsystems, recording the architecture invariants and constraints that cannot be learned from reading the source.

    343 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Adversarial Docs Audit

    shift-editor/shift

    Fact-checks DOCS.md files against the source code, testing each concrete claim and sorting it as true, false, stale or unverifiable.

    343 GitHub stars~818 tokensUpdated yesterday
    Auto-check passed
  • Shift Issue Writer

    shift-editor/shift

    Sets the rules for finding, writing and updating Shift GitHub issues: search for duplicates first, use outcome-focused titles and testable acceptance criteria.

    343 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Shift JSDoc Contracts

    shift-editor/shift

    Guides writing JSDoc for Shift exported APIs as a stable caller contract, covering ownership, lifetime, side effects and nullability that TypeScript types cannot express.

    343 GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed

Questions about Shift UI Components

What does Shift UI Components do?

Guides design, implementation and review of Shift interface work: shared Base UI wrappers, Tailwind v4 theme tokens, Figma matching and accessible interaction states. This skill is the working guide for user interface changes in the Shift font editor. Before editing an unfamiliar surface the agent reads the architecture index, the shared UI package docs, the renderer stylesheet that holds the Tailwind v4 theme, the neighboring components, and any supplied Figma frame or screenshot, which is treated as the visual target.

When should I use Shift UI Components?

Shift UI Components fits situations like: building a new dialog, menu or popover in the Shift desktop app; matching a component to a supplied Figma frame or screenshot; reviewing a UI change for accessibility, token use and visible regressions.

How do I install Shift UI Components in Claude Code?

Run `npx skills add shift-editor/shift --skill ui -a claude-code`. Or copy the skill folder (.codex/skills/ui in shift-editor/shift) into .claude/skills/ui in your project. Claude Code loads it when a task matches its description.

How do I install Shift UI Components in Codex?

Run `npx skills add shift-editor/shift --skill ui -a codex`. Or copy the skill folder (.codex/skills/ui in shift-editor/shift) into .agents/skills/ui in your project. Codex loads it when a task matches its description.

Can I use Shift UI Components in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add shift-editor/shift --skill ui -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ui, .gemini/skills/ui, .github/skills/ui and .opencode/skills/ui in your project.

What does Shift UI Components need to run?

Going by SKILL.md and its folder, Shift UI Components needs the command-line tools its instructions call (pnpm). Our summary lists: The Shift repository with its shared UI package and Tailwind v4 theme.

Does Shift UI Components access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Shift UI Components safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Shift UI Components use?

Shift UI Components is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Shift UI Components use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Shift UI Components?

Skills that share tags, products or a category with Shift UI Components: Extract Design (Manavarya09/design-extract, 4.2k stars), Shadcn Tailwind UI (LiarMTTT/TavernWeave, 148 stars), Light Frontend Design (Light0305/Light-skills, 640 stars) and Tailwind V4 Shadcn (secondsky/claude-skills, 227 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Shift UI Components?

shift-editor (a GitHub organization) maintains it in shift-editor/shift, which has 343 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 6, 2026.

Source: shift-editor/shift on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.