Token导航 LogoToken导航TokenDH.com
前端设计权限需确认github未标认证来源可访问clear审计通过

shopify-polaris-designShopify polaris 设计

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,151

周安装

47

GitHub Stars

公开资料未说明

下载量

368
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:shopify-polaris-design(Shopify polaris 设计)
来源仓库:https://github.com/toilahuongg/google-antigravity-kit
仓库路径:skills/shopify-polaris-design
安装命令:
npx skills add https://github.com/toilahuongg/google-antigravity-kit --skill shopify-polaris-design
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/toilahuongg/google-antigravity-kit --skill shopify-polaris-design

简介

用于辅助基于 Shopify Polaris 设计系统的前端页面与组件开发。

  • 适合生成 React、Vue 等框架下的 UI 代码,并审查样式与布局问题。
  • 需结合项目现有路由、构建工具和 Tailwind CSS 配置进行集成使用。
  • 涉及页面改动时应配合本地预览确保视觉表现符合预期效果。
  • shopify-polaris-design 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

This skill ensures that interfaces are built using Shopify's Polaris Design System, guaranteeing a native, accessible, and professional look and feel for Shopify Merchants.

Core Principles

  1. Merchant-Focused: Design for efficiency and clarity. Merchants use these tools to run their business.
  2. Native Feel: The app should feel like a natural extension of the Shopify Admin. Do not introduce foreign design patterns (e.g. Material Design shadows, distinct bootstappy buttons) unless absolutely necessary.
  3. Accessibility: Polaris is built with accessibility in mind. Maintain this by using semantic components (e.g., Button, Link, TextField) rather than custom div implementations.
  4. Predictability: Follow standard Shopify patterns. Save buttons go in the Contextual Save Bar. Page actions go in the top right. Primary content is centered.

Technical Implementation

Dependencies

  • @shopify/polaris
  • @shopify/polaris-icons
  • @shopify/app-bridge-react (for navigation, title bar, toasts, save bar)

Fundamental Components

  • AppProvider: All Polaris apps must be wrapped in <AppProvider i18n={enTranslations}>.
  • Page: The top-level container for a route. Always set title and primaryAction (if applicable). <Page title="Products" primaryAction={{content: 'Add product', onAction: handleAdd}}>
  • Layout: Use Layout and Layout.Section to structure content.

- Layout.AnnotatedSection: For settings pages (Title/Description on left, Card on right). - Layout.Section: Standard Full (default), 1/2 (variant="oneHalf"), or 1/3 (variant="oneThird") width columns.

  • Card: The primary container for content pieces. Group related information in a Card.

- Use BlockStack (vertical) or InlineStack (horizontal) for internal layout within a Card. - Do not use Card.Section as it is deprecated in newer versions; use BlockStack with gap.

Data Display

  • IndexTable: For lists of objects (Products, Orders) with bulk actions and filtering. It replaces the older ResourceList for complex table cases.
  • LegacyCard + ResourceList: Still valid for simple lists where table headers aren't needed.
  • DataTable: For simple, non-interactive data grids (e.g., analytics data).
  • Text: Use <Text as="h2" variant="headingMd"> instead of <h2>. Strict typography control is key.

Form Design

  • Use FormLayout to automatically handle spacing and alignment of form fields.
  • Use TextField, Select, Checkbox, RadioButton.
  • Validation: Pass error prop (string or boolean) to form fields to show validation messages inline.
  • ContextualSaveBar: For forms that edit existing data, use the App Bridge useSaveBar or <ContextualSaveBar> component to show the specialized top bar for saving/discarding changes.

Design Tokens & CSS

  • Avoid Custom CSS: 95% of styling should be handled by Polaris props (gap, padding, align, justify).
  • Design Tokens: If you MUST use custom CSS, use Polaris CSS Custom Properties (Tokens).

- Backgrounds: var(--p-color-bg-surface) - Text: var(--p-color-text-default) - Spacing: var(--p-space-400) (16px) - Borders: var(--p-border-radius-200)

Code Style Example

import { Page, Layout, Card, BlockStack, Text, Button, InlineStack, Badge } from '@shopify/polaris';

export default function Dashboard() {
  return (
    <Page
        title="Dashboard"
        primaryAction={{content: 'Create Campaign', onAction: () => {}}}
        secondaryActions={[{content: 'View Logs', onAction: () => {}}]}
    >
      <Layout>
        <Layout.Section>
          <Card>
            <BlockStack gap="400">
              <InlineStack align="space-between">
                <Text as="h2" variant="headingMd">Recent Activity</Text>
                <Badge tone="success">Active</Badge>
              </InlineStack>
              <Text as="p" tone="subdued">Everything is running smoothly.</Text>
            </BlockStack>
          </Card>
        </Layout.Section>

        <Layout.Section variant="oneThird">
            <Card>
                <BlockStack gap="200">
                    <Text as="h3" variant="headingSm">Quick Helper</Text>
                    <Button variant="plain">Read Documentation</Button>
                </BlockStack>
            </Card>
        </Layout.Section>
      </Layout>
    </Page>
  );
}

Anti-Patterns to AVOID

  • DO NOT use Shadows or Borders manually. Cards handle this.
  • DO NOT use style={{margin: 10}}. Use <Box padding="400"> or <BlockStack gap="400">.
  • DO NOT create a "Save" button at the bottom of a form. Use the ContextualSaveBar at the top of the viewport.
  • DO NOT use generic loading spinners. Use <SkeletonPage> or <SkeletonBodyText> for loading states.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.72%
按下载量换算98

Cursor

24.83%
按下载量换算91

Antigravity

18.24%
按下载量换算67

windsurf

11.06%
按下载量换算41

Gemini CLI

8.33%
按下载量换算31

OpenCode

3.14%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills