بنقرة واحدة
react-component-generator
生成符合项目规范的 React 组件。当用户要求创建组件、新建 React 组件或生成组件文件时使用
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
生成符合项目规范的 React 组件。当用户要求创建组件、新建 React 组件或生成组件文件时使用
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
进行系统化的代码审查,检查代码质量、安全性和性能。当用户要求审查代码、review 或检查代码时使用
将当前分支部署到测试环境。当用户要求部署、发布到测试或在 staging 环境测试时使用
生成符合 Conventional Commits 规范的 Git 提交信息。当用户要求生成提交、创建 commit 或写提交信息时使用
Guide for implementing Better Auth - a framework-agnostic authentication and authorization framework for TypeScript. Use when adding authentication features like email/password, OAuth, 2FA, passkeys, or advanced auth functionality to applications.
Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.
Guide for implementing Cloudflare Browser Rendering - a headless browser automation API for screenshots, PDFs, web scraping, and testing. Use when automating browsers, taking screenshots, generating PDFs, scraping dynamic content, extracting structured data, or testing web applications. Supports REST API, Workers Bindings (Puppeteer/Playwright), MCP servers, and AI-powered automation. (project)
| name | react-component-generator |
| description | 生成符合项目规范的 React 组件。当用户要求创建组件、新建 React 组件或生成组件文件时使用 |
项目使用以下约定:
确认组件信息
创建文件结构
src/components/{ComponentName}/
├── index.tsx
├── {ComponentName}.module.css
└── {ComponentName}.test.tsx
生成组件文件
index.tsx 模板:
import React from 'react';
import styles from './{ComponentName}.module.css';
interface {ComponentName}Props {
// 定义 props 类型
}
/**
* {组件描述}
* @param props - 组件属性
*/
export const {ComponentName}: React.FC<{ComponentName}Props> = (props) => {
return (
<div className={styles.container}>
{/* 组件内容 */}
</div>
);
};
{ComponentName}.module.css 模板:
.container {
/* 组件样式 */
}
{ComponentName}.test.tsx 模板:
import { render, screen } from '@testing-library/react';
import { {ComponentName} } from './index';
describe('{ComponentName}', () => {
it('renders correctly', () => {
render(<{ComponentName} />);
// 添加断言
});
});
生成后自动运行:
npm run type-checknpm run lintnpm test -- {ComponentName}如有错误,显示错误信息并提供修复建议。