clerk-custom-ui — Claude Code skill: what it does, how to install
A Clerk skill that has the agent build custom sign-in and sign-up forms with hooks, or restyle the pre-built components to fit your brand.
npx skills add clerk/skills --skill clerk-custom-ui -a claude-codeWhat clerk-custom-ui does
The skill splits Clerk work into two jobs: build your own sign-in and sign-up screens with the useSignIn and useSignUp hooks, or restyle the ready-made components. SKILL.md holds a task table pointing at core-2/ and core-3/ references, so the agent checks the SDK version in package.json before it opens anything. Docs get pulled on demand through WebFetch.
Themes ship in @clerk/ui: dark, neobrutalism, shadcn, simple. Pass an array and the last theme wins. Colors, fonts and radii go into appearance.variables; the logo and social button style belong in appearance.options. A pitfalls table covers the usual slips, like colorPrimary typed as primaryColor or logoImageUrl dropped at the top level instead of inside options.
Your app must already sit inside ClerkProvider; the skill hands that step to clerk-setup. If components.json is in the project root, it tells the agent to apply the shadcn theme as the opening move and import @clerk/ui/themes/shadcn.css in the global styles, because otherwise the forms drift away from your design system. On Core 2 the same settings live under layout rather than options and themes come from @clerk/themes, so check the version before editing.
What it helps with
- build a sign-in form on top of
useSignIn - repaint Clerk components to match brand colors
- apply the
shadcntheme so auth screens match the design system - move the logo and social buttons where the layout needs them
- trace why
useSignUpreturns a different shape after an SDK upgrade
Example prompts for the agent
- Build a custom sign-up screen with
useSignUpinstead of the pre-built component. - Apply the
shadcntheme to Clerk components, the project already hascomponents.json. - Restyle
<SignIn />: setcolorPrimary, bumpborderRadius, use/logo.pngas the logo.
How to install clerk-custom-ui
1Skills CLI (Vercel)
npx skills add clerk/skills --skill clerk-custom-ui -a claude-code2Manually: put the files in place
~/.claude/skills/clerk-custom-ui/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/clerk-custom-ui/
1Skills CLI (Vercel)
npx skills add clerk/skills --skill clerk-custom-ui -a codex2Manually: put the files in place
.agents/skills/clerk-custom-ui/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add clerk/skills --skill clerk-custom-ui -a cursor2Manually: put the files in place
.cursor/skills/clerk-custom-ui/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install clerk/skills clerk-custom-ui2Manually: put the files in place
.github/skills/clerk-custom-ui/SKILL.md1Skills CLI (Vercel)
npx skills add clerk/skills --skill clerk-custom-ui -a gemini-cli2Platform CLI
gemini skills install https://github.com/clerk/skills --path skills/clerk-custom-uiManually: put the files in place
.devin/skills/clerk-custom-ui/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add clerk/skills --skill clerk-custom-ui -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about clerk-custom-ui
How do I install clerk-custom-ui in Claude Code?
Run npx skills add clerk/skills --skill clerk-custom-ui -a claude-code. The skill file lands at ~/.claude/skills/clerk-custom-ui/SKILL.md.
What does clerk-custom-ui do?
It guides the agent through building custom sign-in and sign-up flows on Clerk hooks, and through theming, colors, fonts and logo settings for the pre-built components.
Does it work with both Core 2 and the current SDK?
Yes, but the details differ. Core 2 puts structure settings under layout, pulls themes from @clerk/themes and returns a different shape from the hooks, so the skill reads the version in package.json and opens the matching core-2/ or core-3/ reference.
Source text
SKILL.md · MIT
---
name: clerk-custom-ui
description: Custom authentication flows and component appearance - hooks (useSignIn,
useSignUp), themes, colors, fonts, CSS. Use for custom sign-in/sign-up flows, appearance
styling, visual customization, branding.
allowed-tools: WebFetch
license: MIT
metadata:
author: clerk
version: 2.3.0
---
# Custom UI
> **Prerequisite**: Ensure `ClerkProvider` wraps your app. See `clerk-setup` skill.
>
> **Version**: Check `package.json` for the SDK version — see `clerk` skill for the version table. This determines which custom flow references to use below.
This skill covers two areas:
1. **Custom authentication flows** — build your own sign-in/sign-up UI with hooks
2. **Appearance customization** — theme, style, and brand Clerk's pre-built components
## What Do You Need?
| Task | Reference |
|------|-----------|
| Custom sign-in (Core 2 / LTS) | core-2/custom-sign-in.md |
| Custom sign-up (Core 2 / LTS) | core-2/custom-sign-up.md |
| Custom sign-in (Current SDK v7+) | core-3/custom-sign-in.md |
| Custom sign-up (Current SDK v7+) | core-3/custom-sign-up.md |
| Show component pattern (Current SDK) | core-3/show-component.md |
## Custom Flow References
| Task | Core 2 | Current |
|------|--------|---------|
| Custom sign-in (useSignIn) | `core-2/custom-sign-in.md` | `core-3/custom-sign-in.md` |
| Custom sign-up (useSignUp) | `core-2/custom-sign-up.md` | `core-3/custom-sign-up.md` |
| `<Show>` component | *(use `<SignedIn>`, `<SignedOut>`, `<Protect>`)* | `core-3/show-component.md` |
---
## Appearance Customization
Appearance customization applies to both Core 2 and the current SDK.
### Component Customization Options
| Task | Documentation |
|------|---------------|
| Appearance prop overview | https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/overview |
| Options (structure, logo, buttons) | https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/options |
| Themes (pre-built dark/light) | https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/themes |
| Variables (colors, fonts, spacing) | https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/variables |
| CAPTCHA configuration | https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/captcha |
| Bring your own CSS | https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/bring-your-own-css |
### Appearance Pattern
```typescript
<SignIn
appearance={{
variables: {
colorPrimary: '#0000ff',
borderRadius: '0.5rem',
},
options: {
logoImageUrl: '/logo.png',
socialButtonsVariant: 'iconButton',
},
}}
/>
```
> **Core 2 ONLY (skip if current SDK):** The `options` property was named `layout`. Use `layout: { logoImageUrl: '...', socialButtonsVariant: '...' }` instead of `options`.
### variables (colors, typography, borders)
| Property | Description |
|----------|-------------|
| `colorPrimary` | Primary color throughout |
| `colorBackground` | Background color |
| `borderRadius` | Border radius (default: `0.375rem`) |
**Opacity change:** `colorRing` and `colorModalBackdrop` now render at full opacity. Use explicit `rgba()` values if you need transparency.
> **Core 2 ONLY (skip if current SDK):** `colorRing` and `colorModalBackdrop` rendered at 15% opacity by default.
### options (structure, logo, social buttons)
| Property | Description |
|----------|-------------|
| `logoImageUrl` | URL to custom logo |
| `socialButtonsVariant` | `'blockButton'` \| `'iconButton'` \| `'auto'` |
| `socialButtonsPlacement` | `'top'` \| `'bottom'` |
| `showOptionalFields` | Show optional fields (default: `false`) |
> **Core 2 ONLY (skip if current SDK):** This property is called `layout`, not `options`. Also, `showOptionalFields` defaulted to `true`.
### Themes
Install themes from `@clerk/ui`:
```bash
npm install @clerk/ui
```
```typescript
import { dark } from '@clerk/ui/themes'
<ClerkProvider appearance={{ theme: dark }} />
```
> **Core 2 ONLY (skip if current SDK):** Themes are imported from `@clerk/themes` (install `@clerk/themes` instead of `@clerk/ui`). Example: `import { dark } from '@clerk/themes'`.
**Theme stacking** — pass an array where the last theme takes precedence:
```typescript
import { dark, neobrutalism } from '@clerk/ui/themes'
<ClerkProvider appearance={{ theme: [dark, neobrutalism] }} />
```
**CSS `color-scheme` support** — the default theme respects the CSS `color-scheme` property for automatic light/dark mode toggling.
**Available themes:** `dark`, `neobrutalism`, `shadcn`, `simple`
#### shadcn Theme
> **IMPORTANT:** If the project has `components.json` (shadcn/ui installed), ALWAYS apply the shadcn theme as the FIRST customization step. This ensures Clerk components visually match the existing shadcn design system. Skip this only if the user explicitly requests a different theme.
**If the project uses shadcn/ui** (check for `components.json` in the project root), **always use the shadcn theme**:
```typescript
import { shadcn } from '@clerk/ui/themes'
<ClerkProvider appearance={{ theme: shadcn }} />
```
Also import shadcn CSS in your global styles:
```css
@import 'tailwindcss';
@import '@clerk/ui/themes/shadcn.css';
```
> **Core 2 ONLY (skip if current SDK):** Import from `@clerk/themes` and `@clerk/themes/shadcn.css`:
> ```typescript
> import { shadcn } from '@clerk/themes'
> ```
> ```css
> @import '@clerk/themes/shadcn.css';
> ```
## Workflow
1. Identify customization needs (custom flow or appearance)
2. For custom flows: check SDK version → read appropriate `core-2/` or `core-3/` reference
3. For appearance: WebFetch the appropriate documentation from table above
4. Apply appearance prop to your Clerk components or build custom flow with hooks
## Common Pitfalls
| Issue | Solution |
|-------|----------|
| Colors not applying | Use `colorPrimary` not `primaryColor` |
| Logo not showing | Put `logoImageUrl` inside `options: {}` (or `layout: {}` in Core 2) |
| Social buttons wrong | Add `socialButtonsVariant: 'iconButton'` in `options` (or `layout` in Core 2) |
| Styling not working | Use appearance prop, not direct CSS (unless with bring-your-own-css) |
| Hook returns different shape | Check SDK version — Core 2 and current have completely different `useSignIn`/`useSignUp` APIs |
## See Also
- `clerk-setup` - Initial Clerk install
- `clerk-nextjs-patterns` - Next.js patterns
- `clerk-orgs` - B2B organizations
© clerk · MIT · clerk/skills