skills/polaris-app-home-page-patterns/SKILL.md
Polaris App Home page templates (Homepage, Index, Details, Settings) and compositions (Empty state, Setup guide, Callout card, etc.) — index of named patterns to look up via shopify-dev-mcp. TRIGGER when: scaffolding an App Home page or using a named composition (Empty state, Setup guide, Callout card, etc.).
npx skillsauth add preetamnath/agent-skills polaris-app-home-page-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Index of Shopify-documented templates (full-page layouts) and compositions (multi-component recipes built from <s-*> web components) on the Polaris App Home surface. Each entry below carries the structural skeleton, intent, and anti-patterns so the agent can scaffold without a fetch round-trip; consult shopify-dev-mcp only for full canonical examples or details beyond the skeleton.
YES: Scaffolding a new full page in an Admin App Home app (Homepage, Index, Details, Settings).
YES: A task names or implies a known composition pattern (Empty state, Setup guide, Callout card, Metrics card, Resource list, etc.).
NO: Component-level work — use polaris-app-home-web-components.
NO: API-level work (toast, modal, save bar) — use polaris-app-home-app-bridge.
shopify-dev-mcp → search_docs_chunks with api_name: "polaris-app-home" and the pattern name as the prompt (e.g., "Settings template", "Setup guide composition").polaris-app-home-web-components and APIs from polaris-app-home-app-bridge. Combine with the Common Composition Idioms for cross-pattern building blocks.shopify-dev-mcp → validate_component_codeblocks with api: "polaris-app-home". If validation fails twice on the same artifact, stop and surface the error via the AskUserQuestion tool with options: "Retry with hints", "Skip validation", "Abort". Recommended: "Retry with hints".<s-*> components from polaris-app-home-web-components. For canonical implementation detail, retrieve via search_docs_chunks rather than inventing from memory.app._index.jsx. Index → app.[resources].jsx (plural noun). Details → app.[resource].$id.jsx (singular noun + id segment). Settings → app.settings.jsx.Avoid: line reflects an explicit warning in Shopify's docs. Treat these as constraints, not suggestions.Full-page layouts. One template per page route.
Composes: single optional <s-banner>, Setup guide, Metrics card grid, Callout card, Media card or featured-app grid, Footer help.
Route: app._index.jsx.
Doc: https://shopify.dev/docs/api/app-home/patterns/templates/homepage
Composes: Index table (primary content), Empty state (when no resources), optional filter chips above the table, Footer help.
Route: app.[resources].jsx (plural noun).
Doc: no standalone template page in Shopify's docs — derive structure from the Index table composition skeleton wrapped in <s-page>.
Skeleton: <form><s-page><s-section>* (main fields) + <s-box slot="aside">…</s-box></s-page></form>.
Composes: editable field stack, optional inline <s-table> (paginated if >10 rows), sidebar (status/metadata/summary), App Bridge Save Bar, confirmation <s-modal> for destructive actions.
Route: app.[resource].$id.jsx (singular noun + id).
Doc: https://shopify.dev/docs/api/app-home/patterns/templates/details
Skeleton: <form data-save-bar><s-page><s-section>* (logical groups of form controls)</s-page></form>.
Composes: grouped form <s-section>s (Store info, Notifications, Preferences), Connected accounts (Account connection grid), Interstitial nav rows linking to sub-pages, destructive Tools section, Footer help.
Route: app.settings.jsx.
Doc: https://shopify.dev/docs/api/app-home/patterns/templates/settings
Reusable blocks. Combine inside templates or other pages.
Skeleton: <s-section><s-stack><s-grid> with <s-grid-item> per service (each holding <s-stack> + <s-button>); status <s-text>; disconnect <s-modal>; outcome <s-banner> or toast.
Doc: https://shopify.dev/docs/api/app-home/patterns/compositions/account-connection
Skeleton: <s-clickable><s-grid><s-thumbnail/> + <s-box> (name + description) + <s-stack><s-button/></s-stack></s-grid></s-clickable>.
Doc: https://shopify.dev/docs/api/app-home/patterns/compositions/app-card
Skeleton: <s-section><s-grid><s-grid> (heading + paragraph + <s-stack> of buttons) + tertiary <s-button icon="x"> (dismiss)</s-grid></s-section>.
Avoid: routine updates or non-critical info; use sparingly and remove once the merchant engages.
Doc: https://shopify.dev/docs/api/app-home/patterns/compositions/callout-card
Skeleton: <s-section><s-grid><s-box><s-image/></s-box> + <s-grid><s-stack><s-heading/><s-paragraph/></s-stack> + <s-button-group><s-button/></s-button-group></s-grid></s-grid></s-section>.
Doc: https://shopify.dev/docs/api/app-home/patterns/compositions/empty-state
Skeleton: <s-stack><s-text><s-link/></s-text></s-stack>.
Doc: https://shopify.dev/docs/api/app-home/patterns/compositions/footer-help
Skeleton: <s-section><s-table><s-grid slot="filters"> (search + sort) + <s-table-header-row/> + <s-table-body><s-table-row><s-table-cell/>×N></s-table-body></s-table></s-section>.
Avoid: small datasets that don't benefit from search/filter (drop to Resource list); permanently visible row actions (reveal on hover); skipping pagination on large datasets.
Doc: https://shopify.dev/docs/api/app-home/patterns/compositions/index-table
Skeleton: <s-section><s-box> repeating <s-clickable><s-grid> (label <s-box> + trailing <s-icon/>)</s-grid></s-clickable> + <s-divider/>.
Doc: https://shopify.dev/docs/api/app-home/patterns/compositions/interstitial-nav
Skeleton: <s-box><s-clickable><s-image/></s-clickable> + <s-divider/> + <s-grid> (<s-heading/> + <s-button/>)</s-grid></s-box>.
Avoid: omitting accessibilityLabel on the interactive image/clickable.
Doc: https://shopify.dev/docs/api/app-home/patterns/compositions/media-card
Skeleton: <s-section><s-grid> repeating <s-clickable><s-grid> + <s-stack> + <s-badge/> (trend)</s-clickable> + <s-divider/></s-grid></s-section>.
Doc: https://shopify.dev/docs/api/app-home/patterns/compositions/metrics-card
Skeleton: <s-section><s-stack><s-grid> (controls/filters) + <s-stack> (items each wrapped in <s-clickable>)</s-stack></s-section>.
Avoid: very large or paginated datasets — escalate to Index table.
Doc: https://shopify.dev/docs/api/app-home/patterns/compositions/resource-list
Skeleton: <s-section><s-grid> (header + progress) + <s-box> repeating <s-box><s-grid> (checkbox + toggle)</s-grid> + <s-box> (collapsible details)</s-box></s-section>.
Avoid: not persisting dismissal across sessions — back it with localStorage or a DB row so the guide doesn't reappear.
Doc: https://shopify.dev/docs/api/app-home/patterns/compositions/setup-guide
Cross-pattern building blocks that recur across the catalog above. Reach for these when assembling or adapting a pattern.
<s-grid gridTemplateColumns="1fr auto auto" alignItems="center"> containing <s-heading> + tertiary <s-button icon="x"> + tertiary <s-button icon="chevron-up">. Used by Setup guide, Callout card.<s-box border="base" background="base" borderRadius="base" overflow="hidden">. Wraps Media card, App card, Metrics card cells.<s-grid gridTemplateColumns="1fr auto" gap="base" alignItems="center"> with text grid on left, <s-image> constrained to ~80px on right. Used by App card, Setup guide step rows.<s-stack direction="inline" gap="small-200"> with primary <s-button> + tertiary-neutral <s-button>. Used in Empty state, Callout card, Details template footer.<s-grid justifyItems="center" maxInlineSize="450px" gap="base"> wrapping image + heading + paragraph + button-group. Empty state's anchor layout.<form data-save-bar> around <s-page> for any page with editable fields — Settings and Details rely on this for App Bridge unsaved-change protection.slot="filters" on a <s-grid> inside <s-table> (search/sort), slot="aside" on <s-box> inside <s-page> (Details sidebar). Use named slots instead of inventing layout containers.documentation
Collapse a multi-clause instruction into one positive line of trigger + action. TRIGGER when: user says 'tighten this rule', 'make this leaner', 'make this simpler' in a skill, CLAUDE.md, agent prompt, or style guide.
documentation
File-level tightening pass on an instruction file (CLAUDE.md, skill, agent prompt, style guide) using `tighten-instruction` as the lens. TRIGGER when: user says 'tighten/simplify this file/skill/CLAUDE.md', 'cut this down'; user points at a verbose instruction file and wants it leaner.
testing
Anchored second-opinion on one concrete proposal: dispatch a subagent to rate the fix, generate ranked alternatives, and flag blind spots, then synthesize back. TRIGGER when: user says 'second opinion', 'rate my fix', 'weigh in on my approach', 'what alternatives am I missing', or wants their candidate edit/decision evaluated against alternatives. SKIP when: multiple decisions on a larger artifact — use `panel-review`.
development
Multi-reviewer panel on N focused questions about a near-final artifact (plan, design, code, prose). R0 (you) plus two parallel reviewer subagents, per-question table with disagreement preserved, walk decisions one at a time. TRIGGER when: user says 'panel review', 'multi-agent review'; user has a mostly-done artifact and focused micro-decisions to validate. SKIP when: only one proposal under review — use `second-opinion`.