Token导航 LogoToken导航

Agent Skill · 前端设计

mantine-react-component-dev(mantine React component DEV 前端)

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

mantine-react-component-dev 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 3,729。

总安装 1,151周安装 47GitHub Stars 3下载 368核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:mantine-react-component-dev(mantine React component DEV 前端)
来源仓库:https://github.com/gfazioli/mantine-select-stepper
仓库路径:skills/mantine-react-component-dev
安装命令:
npx skills add https://github.com/gfazioli/mantine-select-stepper --skill mantine-react-component-dev
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/gfazioli/mantine-select-stepper --skill mantine-react-component-dev

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于辅助前端页面、组件、样式和交互逻辑的开发与维护,适合生成或审查 React 相关代码。适用于 Mantine 组件开发、Next.js 集成或 UI 结构优化场景。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。使用时需结合项目现有设计系统和构建方式,避免生成孤立片段。

涉及页面改动时应配合本地预览确认视觉效果。

来源仓库内路径:skills/mantine-react-component-dev

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/gfazioli/mantine-select-stepper --skill mantin…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

mantine-react-component-dev 怎么安装?

在终端执行 npx skills add https://github.com/gfazioli/mantine-select-stepper --skill mantine-react-co…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

mantine-react-component-dev 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

mantine-react-component-dev 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

mantine-react-component-dev 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

mantine-react-component-dev 用的人多吗?

公开数据是累计安装 1,151 次,近一周安装 47 次,下载 368 次,GitHub 3 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

mantine-react-component-dev 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
mantine-react-component-dev

mantine React component DEV 前端 · 本页

1,1513需要联网MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Mantine React Component Development Skill

When to Use This Skill

Apply this skill when working on:

  • Component Development: Creating or editing React components built on Mantine's factory pattern
  • TypeScript Patterns: Implementing polymorphic components, type-safe props, and CSS variables
  • Styles API: Configuring component styling through Mantine's Styles API system (selectors, vars, modifiers)
  • Component Composition: Building compound components with static sub-components (e.g., Component.Target)
  • Context Management: Implementing safe context patterns for component state sharing
  • Accessibility: Ensuring ARIA compliance, keyboard navigation, and focus management
  • Code Review: Maintaining consistency with established patterns and conventions
  • Documentation: Writing component demos, MDX docs, and API references

Project Structure

Components are organized in a monorepo workspace structure:

  • /package/src/: Main component source code

- ComponentName.tsx: Main component implementation - ComponentName.module.css: Component-scoped styles - ComponentName.context.ts: Context providers (if needed) - ComponentName.errors.ts: Error messages - ComponentName.test.tsx: Jest + Testing Library tests - ComponentName.story.tsx: Storybook stories - SubComponent/SubComponent.tsx: Sub-components in their own folders - index.ts: Public exports

  • /docs/: Next.js documentation site

- demos/ComponentName.demo.*.tsx: Interactive demos - styles-api/ComponentName.styles-api.ts: Styles API metadata - docs.mdx: Main documentation page

Refer to existing components in ./package/src/ for implementation examples.

TypeScript Patterns

Component Factory Pattern

All components use Mantine's polymorphic factory pattern.

import { polymorphicFactory, PolymorphicFactory, useProps, useStyles, createVarsResolver } from '@mantine/core';

export type ComponentStylesNames = 'root' | 'element';
export type ComponentCssVariables = {
  root: '--custom-var' | '--another-var';
};

export interface ComponentProps extends BoxProps, StylesApiProps<ComponentFactory> {
  /** Prop description */
  customProp?: string;
}

export type ComponentFactory = PolymorphicFactory<{
  props: ComponentProps;
  defaultComponent: 'div';
  defaultRef: HTMLDivElement;
  stylesNames: ComponentStylesNames;
  vars: ComponentCssVariables;
  staticComponents: {
    SubComponent: typeof SubComponent;
  };
}>;

const defaultProps: Partial<ComponentProps> = {
  customProp: 'default',
};

const varsResolver = createVarsResolver<ComponentFactory>((_, { customProp }) => ({
  root: {
    '--custom-var': customProp,
  },
}));

export const Component = polymorphicFactory<ComponentFactory>((_props, ref) => {
  const props = useProps('Component', defaultProps, _props);
  const { classNames, className, style, styles, unstyled, vars, customProp, ...others } = props;

  const getStyles = useStyles<ComponentFactory>({
    name: 'Component',
    classes,
    props,
    className,
    style,
    classNames,
    styles,
    unstyled,
    vars,
    varsResolver,
  });

  return (
    <Box ref={ref} {...getStyles('root')} {...others}>
      {/* component content */}
    </Box>
  );
});

Component.displayName = '@your-scope/Component';
Component.SubComponent = SubComponent;

Key Requirements:

  • Use unknown for unconstrained generics; narrow with type guards
  • Avoid any; use React.ReactNode for children
  • Define explicit type aliases for style names and CSS variables
  • Use useProps hook for default prop merging
  • Implement varsResolver for CSS custom properties

Context Pattern

For components requiring state sharing, use Mantine's safe context pattern.

import { createSafeContext } from '@mantine/core';
import { COMPONENT_ERRORS } from './Component.errors';

interface ComponentContext {
  state: boolean;
  setState: (value: boolean) => void;
}

export const [ComponentContextProvider, useComponentContext] = createSafeContext<ComponentContext>(
  COMPONENT_ERRORS.context
);

Error Definitions in Component.errors.ts:

export const COMPONENT_ERRORS = {
  context: 'Component was not found in the tree',
  validation: 'Specific validation message',
};

Sub-Component Pattern

Sub-components access parent context and enforce constraints.

import { forwardRef, useProps, isElement, createEventHandler } from '@mantine/core';
import { useComponentContext } from '../Component.context';

export interface SubComponentProps {
  children: React.ReactNode;
  refProp?: string;
}

export const SubComponent = forwardRef<HTMLElement, SubComponentProps>((props, ref) => {
  const { children, ...others } = useProps('SubComponent', {}, props);

  if (!isElement(children)) {
    throw new Error(COMPONENT_ERRORS.children);
  }

  const ctx = useComponentContext();
  const onClick = createEventHandler(children.props.onClick, () => ctx.toggle());

  return cloneElement(children, { onClick, ref });
});

Styles API

Every component exposes a Styles API for customization. Define in ./docs/styles-api/Component.styles-api.ts:

import type { ComponentFactory } from '@your-scope/component';
import type { StylesApiData } from '../components/styles-api.types';

export const ComponentStylesApi: StylesApiData<ComponentFactory> = {
  selectors: {
    root: 'Root element',
    element: 'Specific child element',
  },
  vars: {
    root: {
      '--custom-var': 'Controls custom behavior',
      '--another-var': 'Controls another aspect',
    },
  },
  modifiers: [
    { modifier: 'data-active', selector: 'root', condition: '`active` prop is set' }
  ],
};

CSS Module (Component.module.css):

.root {
  /* Use CSS custom properties from varsResolver */
  property: var(--custom-var, fallback);
}

.element {
  /* Scoped class name */
}

/* Data attribute modifiers */
.root[data-active] {
  /* Active state */
}

Component Guidelines

Controlled vs Uncontrolled State

Use @mantine/hooks useUncontrolled for dual-mode state:

import { useUncontrolled } from '@mantine/hooks';

const [value, setValue] = useUncontrolled({
  value: props.value,
  defaultValue: props.defaultValue,
  finalValue: undefined,
  onChange: props.onChange,
});

Lifecycle Hooks

Use useDidUpdate from @mantine/hooks for effect-on-update patterns:

import { useDidUpdate } from '@mantine/hooks';

useDidUpdate(() => {
  props.onStateChange?.(state);
}, [state]);

Props Validation

Validate props at runtime when type system isn't enough:

if (React.Children.count(children) !== 2) {
  throw new Error('Component requires exactly two children');
}

Ref Forwarding

Always support ref forwarding for component composition:

export const Component = polymorphicFactory<ComponentFactory>((_props, ref) => {
  return <Box ref={ref} {...others} />;
});

Coding Standards

Import Order

Prettier auto-sorts imports per ./.prettierrc.mjs:

  1. CSS imports
  2. React
  3. Next.js (if applicable)
  4. Built-in modules
  5. Third-party modules
  6. @mantine/* packages
  7. Local imports (parent then sibling)
  8. CSS modules last

Formatting

  • Print Width: 100 characters
  • Quotes: Single quotes
  • Trailing Commas: ES5-style
  • MDX: 70 character print width

Run npm run prettier:write before committing.

Linting

ESLint config extends eslint-config-mantine:

import mantine from 'eslint-config-mantine';
import tseslint from 'typescript-eslint';

export default tseslint.config(...mantine, {
  ignores: ['**/.next/**', '**/*.{mjs,cjs,js,d.ts,d.mts}']
});

Run npm run lint to check all rules.

TypeScript Configuration

Primary config (./tsconfig.json):

  • Target: ES2015
  • Module: ESNext with Node resolution
  • JSX: React (classic runtime)
  • Strict: Enabled (via mantine config)
  • Skip Lib Check: true (for faster builds)

Build config (tsconfig.build.json) isolates compilation scope.

Testing

Use @mantine-tests/core renderer with Testing Library.

import React from 'react';
import { render } from '@mantine-tests/core';
import { Component } from './Component';

describe('Component', () => {
  it('renders without crashing', () => {
    const { container } = render(<Component>Content</Component>);
    expect(container).toBeTruthy();
  });

  it('applies custom className', () => {
    const { container } = render(<Component className="custom" />);
    expect(container.querySelector('.custom')).toBeTruthy();
  });

  it('forwards ref', () => {
    const ref = React.createRef<HTMLDivElement>();
    render(<Component ref={ref} />);
    expect(ref.current).toBeTruthy();
  });
});

Run tests with npm run jest.

Documentation

Demos

Create interactive demos in ./docs/demos/:

// Component.demo.basic.tsx
import { Component } from '@your-scope/component';
import { MantineDemo } from '@docs/components';

const code = `
import { Component } from '@your-scope/component';

function Demo() {
  return <Component>Content</Component>;
}
`;

export const basic: MantineDemo = {
  type: 'code',
  component: Demo,
  code,
};

Configurator demos use MantineDemo type 'configurator' with controls object.

MDX Pages

Main docs page at ./docs/docs.mdx:

import { InstallScript } from './components/InstallScript/InstallScript';
import * as demos from './demos';

## Installation

<InstallScript packages="@your-scope/component" />

## Usage

<Demo data={demos.basic} />

## Props

<PropsTable component="Component" />

## Styles API

<StylesApiTable component="Component" />

Refer to existing documentation structure in /docs for consistency.

Accessibility

ARIA Patterns

Keyboard Navigation

  • Ensure all interactive elements are keyboard-accessible
  • Use tabIndex={-1} for programmatic focus management
  • Implement arrow-key navigation for composite widgets

Focus Management

import { useFocusTrap } from '@mantine/hooks';

const focusTrapRef = useFocusTrap(active);

Data Attributes for State

Expose component state via data attributes for CSS and screen readers:

<div data-active={isActive} data-disabled={disabled} />

Security and Maintenance

No Hardcoded Secrets

  • Never commit API keys, tokens, or credentials
  • Use environment variables for sensitive configuration
  • Exclude .env files in .gitignore

Dependency Hygiene

  • Keep @mantine/core and @mantine/hooks versions in sync (see ./package/package.json)
  • Use peerDependencies for React and Mantine packages
  • Run npm run syncpack to verify version consistency

Least Privilege

  • Minimize scope of React Context providers
  • Avoid global state; prefer component-level state
  • Use createSafeContext to enforce provider boundaries

Edge Cases and Troubleshooting

Module Resolution

  • Ensure all imports use relative paths for local modules
  • Check package.json exports field for correct entry points
  • Verify tsconfig.json paths if using aliases

CSS Modules

  • Class names are auto-scoped via hash-css-selector (see ./rollup.config.mjs)
  • Import CSS modules as import classes from './Component.module.css'
  • Use getStyles helper for className merging

Polymorphic Components

  • Default component is div; override with component prop
  • Ref type must match defaultRef in factory definition
  • Props are merged: BoxProps & ComponentProps & {component?: any}

Testing Library Queries

  • Prefer getByRole over getByTestId
  • Use screen for global queries or container for scoped
  • Mock window.matchMedia if needed (see ./jsdom.mocks.cjs)

Storybook Integration

  • Stories go in Component.story.tsx alongside component
  • Use CSF3 format with Meta and StoryObj types
  • Stories auto-generate docs from TypeScript types

File Organization

Maintain consistent file structure per component:

package/src/
├── Component.tsx              # Main component
├── Component.module.css       # Scoped styles
├── Component.context.ts       # Context (if needed)
├── Component.errors.ts        # Error constants
├── Component.test.tsx         # Tests
├── Component.story.tsx        # Storybook
├── SubComponent/
│   └── SubComponent.tsx       # Sub-component
└── index.ts                   # Public API

Public API (index.ts):

export { Component } from './Component';
export type { ComponentProps, ComponentFactory } from './Component';

Commit Hygiene

  • Run npm run test before committing (includes prettier, typecheck, lint, jest)
  • Write clear commit messages: fix: resolve prop merging issue or feat: add keyboard navigation
  • Avoid committing generated files (dist/, .next/, out/)
  • Use .gitignore to exclude build artifacts

References

See ./references/ for indexed documentation pointers.

Related Files

平台分布

Claude Code

28.54%
按下载量换算105

OpenCode

23.09%
按下载量换算85

Antigravity

17.09%
按下载量换算63

Cursor

11.67%
按下载量换算43

github-copilot

6.85%
按下载量换算25

Gemini CLI

3.51%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

继续浏览同类 Skills