ux-polaris-antipatterns

ux-polaris-antipatterns is a skill for Claude Code from khadinakbarlabs/shopify-app-builder. It costs 137 tokens per session (8,431 once invoked), scanned A, original, MIT.

A review guide for avoiding common mistakes when building Shopify admin interfaces with Polaris, Shopify's component library.

In plain words
What is it for?
Use it when reviewing pull requests, creating screens, migrating Polaris versions, preparing App Store submissions, or choosing between banners, toasts, modals, and inline errors.
Why use it?
It helps developers catch outdated components, incorrect messages, accessibility problems, and styling choices that do not match Shopify admin.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the shopify-app-builder plugin — 32 skills, 9 commands, 5 agents shipped together

Good fit Use it when reviewing pull requests, creating screens, migrating Polaris versions, preparing App Store submissions, or choosing between banners, toasts, modals, and inline errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khadinakbarlabs/shopify-app-builder/ux-polaris-antipatterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add khadinakbarlabs/shopify-app-builder --skill ux-polaris-antipatterns
Clone the repo
git clone --depth 1 https://github.com/khadinakbarlabs/shopify-app-builder

Made for: Claude Code.

Or install shopify-app-builder, the plugin that ships this one along with the rest of its 32 skills, 9 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ux-polaris-antipatterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/khadinakbarlabs/shopify-app-builder/ux-polaris-antipatterns/github.svg)](https://agentmods.dev/skills/khadinakbarlabs/shopify-app-builder/ux-polaris-antipatterns)
Your own site
<a href="https://agentmods.dev/skills/khadinakbarlabs/shopify-app-builder/ux-polaris-antipatterns"><img src="https://agentmods.dev/badge/skills/khadinakbarlabs/shopify-app-builder/ux-polaris-antipatterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ux-polaris-antipatterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/khadinakbarlabs/shopify-app-builder/ux-polaris-antipatterns"><img src="https://agentmods.dev/badge/skills/khadinakbarlabs/shopify-app-builder/ux-polaris-antipatterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,431 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00137 $0.08431
Opus 5 $0.00068 $0.04215
Sonnet 5 $0.00027 $0.01686
Haiku 4.5 $0.00014 $0.00843

Measured 12d ago against content hash 4d393ae3e2d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

ux-polaris-antipatterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ux-polaris-antipatterns/SKILL.md · 835 lines

How it starts

The opening of the file, as written. The whole thing — 835 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Polaris UI Anti-Patterns (v12+)

A field guide to the 20 most common ways Shopify app teams break the Polaris contract — and the exact fix for each. Use this when reviewing a PR, writing a new screen, or auditing an app pre-submission for Built for Shopify.

The principle behind every rule: Shopify admin is a shared design surface. Merchants have already learned its patterns. The closer your app feels to the rest of admin, the higher your install-to-activation rate. The further you drift, the more your app feels like a third-party graft — and the more support tickets you get from confused merchants.


1. When to use

Pull this skill in when you are:

  • Reviewing a pull request that touches @shopify/polaris components
  • Writing a new screen and unsure whether a custom component is warranted
  • Migrating from Polaris 10 or 11 to 12+
  • Preparing an app for App Store submission or Built for Shopify certification
  • Debugging "why does our app look off-brand?" complaints
  • Diagnosing accessibility audit failures
  • Deciding between <Modal>, <Banner>, <Toast>, or inline error
  • Choosing between custom CSS and design tokens

If the user mentions Polaris, Stack, BlockStack, design tokens, --p-color-*, className on Polaris components, Modal overuse, or "this feels off-brand" — trigger this skill.


2. The 20 anti-patterns, ranked by severity

Ranked by how badly each one degrades the merchant experience (1 = catastrophic, 20 = nit). Fixes are in the "do this instead" column.

# Anti-pattern Severity Do this instead
1 Using <Stack> / <LegacyStack> / <VerticalStack> / <HorizontalStack> Build-breaking on v12+ <BlockStack> (vertical) or <InlineStack> (horizontal). Run npx @shopify/polaris-migrator
2 Wrapping Polaris components in custom className for styling High — most Polaris components do not accept className Use the component's built-in props (tone, variant, padding, gap). For exceptions, use <Box> with token props
3 Hex codes (color: #008060) instead of design tokens High — instantly off-brand on theme changes var(--p-color-bg-fill-success) or a tone prop
4 Modal for non-blocking errors or confirmations High — blocks the merchant; high abandonment <Banner> for in-context info, <Toast> for transient confirmations, inline error for forms
5 Toast for errors that need explanation High — disappears in 3s, easily missed <Banner tone="critical"> with title + body + recovery action
6 Using tone="success" for neutral or informational Medium — semantic noise tone="info" for info, no tone for neutral
7 Using tone="critical" for warnings Medium — desensitizes the merchant to real errors tone="warning" for cautionary, tone="critical" only for destructive/error
8 Missing <FormLayout> around form fields Medium — inconsistent spacing Always wrap related fields in <FormLayout> inside <Form>
9 Blocking validation on every keystroke Medium — feels hostile, breaks flow Validate on blur or on submit; clear errors on next change
10 Missing helpText on non-obvious fields Medium — drives support tickets helpText describing format, examples, or constraints
11 Forgetting to import @shopify/polaris/build/esm/styles.css High — entire app looks unstyled Import once in the app root, before <AppProvider>
12 More than 2 filled/shaped buttons in one Card Medium — destroys hierarchy One primary, one secondary, rest as plain or inside <ActionList>
13 <IndexTable> on mobile without responsive plan Medium — horizontal scroll hell on phones Hide columns or switch to <ResourceList> below the mobile breakpoint
14 Modal sized larger than the mobile viewport Medium — content clipped on phones size="small" for mobile flows; never assume desktop
15 Icon-only buttons missing accessibilityLabel Medium — screen readers see nothing Always pass accessibilityLabel to icon-only <Button>
16 Error states relying on color alone Medium — fails WCAG, fails colorblind users Pair red border with text error message and icon
17 Importing old icon names (DeleteMinor, EditMajor) Medium — works on v10–11, gone in v12+ Use new icon names (DeleteIcon, EditIcon)
18 Custom focus styles that override Polaris focus rings Medium — keyboard users get lost Leave focus rings alone, or use --p-focused tokens
19 Card with no padding wrapper Low — content touches Card edge <Box padding="400"> inside, or use <Card padding="400"> (v12+)
20 Mixing tone="subdued" with low-contrast text on top Low — fails AA contrast Don't stack subdued tones; use one level of de-emphasis

Read the full file on GitHub · 835 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 835 lines · 137 tokens per session scan A 4d393ae3e2d5

Subscribe to this mod's changes

ux-polaris-antipatterns is a skill published in the GitHub repository khadinakbarlabs/shopify-app-builder (1 stars, last pushed 1mo ago), licensed MIT. It adds 137 tokens to every session and 8,431 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

visual-qa

Runs rigorous visual QA across web, terminal, and paginated surfaces with screenshot evidence and a verdict. Use for any UI build or change, or when asked whether a page, component, or TUI looks right.

code-yeongyu/oh-my-openagent · 47 tokens

frontend

Builds, styles, and polishes web UI and UX. Use for any frontend, page, component, styling, layout, animation, or visual-quality task, or when asked to make an interface look or feel a certain way.

code-yeongyu/oh-my-openagent · 49 tokens

ambience-skill

Layer A ambience-and-typographic-motion reference anchored to the react-bits catalog (reactbits.dev). Stacks on any style skill whenever work adds a hero atmosphere, an animated or shader background, a typographic reveal (split, blur, shimmer, typewriter, count-up, marquee), scroll storytelling, or card surface…

code-yeongyu/oh-my-openagent · 132 tokens

interaction-skill

Layer A interaction-mechanics reference anchored to the beui.dev catalog. Stacks on any style skill whenever work adds or changes motion or interaction — micro-interactions, animated components, transitions, gestures, hover/press/state feedback, loading/success/error morphs, 'make it feel alive'. Mandates reading the…

code-yeongyu/oh-my-openagent · 104 tokens

layout-skill

Layer A layout-mechanics reference. Stacks on any style skill when the screen is an app shell, dashboard, settings, list-detail, mail/inbox, or any layout with fixed regions plus a scrolling body — or when a layout breaks under long, empty, or unbroken content. Owns spatial structure and scroll ownership; owns zero…

code-yeongyu/oh-my-openagent · 88 tokens

ui-designer

Elite UI/UX Design Lead & Frontend Architect. Generates distinctive, non-templated interfaces with opinionated aesthetics, deliberate typography, and exact UX copy. Triggers on UI design, frontend styling, or layout creation.

GulajavaMinistudio/awesome-copilot-id · 49 tokens