用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/diegosouzapw/awesome-omni-skill --skill add-feature命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | add-feature |
| description | Scaffold a new frontend feature module with page, components, API service, and hooks |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash |
| user-invocable | true |
Scaffold a new feature module following the project's React + TypeScript conventions.
{feature} — Feature name in kebab-case (e.g., alerts, rollouts)Creates the following structure under web/src/features/{feature}/:
{feature}/
├── pages/
│ └── {feature}-page.tsx
└── components/
└── {feature}-overview.tsx
And adds an API service at web/src/api/services/{feature}.api.ts.
web/src/api/services/{feature}.api.ts)/**
* {Feature} API client
*/
import { apiRequest } from '../client'
import { appendTenantId } from './tenant'
import type { PaginatedResponse } from '../types'
// Define types inline or in ../types/index.ts
export interface {Entity} {
id: string
// fields
}
const BASE_PATH = '/api/{feature}'
export const {feature}Api = {
/**
* Get paginated list
*/
async getAll(page = 1, pageSize = 20): Promise<PaginatedResponse<{Entity}>> {
const params = new URLSearchParams()
appendTenantId(params)
params.set('pageNumber', page.toString())
params.set('pageSize', pageSize.toString())
return apiRequest({ url: BASE_PATH, params })
},
/**
* Get by ID
*/
async getById(id: string): Promise<{Entity}> {
const params = new URLSearchParams()
appendTenantId(params)
return apiRequest({ url: `${BASE_PATH}/${id}`, params })
},
}
web/src/features/{feature}/pages/{feature}-page.tsx)import { {Feature}Overview } from '../components/{feature}-overview'
export function {Feature}Page() {
return (
<div className="container mx-auto py-6">
<{Feature}Overview />
</div>
)
}
web/src/features/{feature}/components/{feature}-overview.tsx)import { useQuery } from '@tanstack/react-query'
import { {feature}Api } from '@/api/services/{feature}.api'
export function {Feature}Overview() {
const { data, isLoading, error } = useQuery({
queryKey: ['{feature}'],
queryFn: () => {feature}Api.getAll(),
staleTime: 30_000,
})
if (isLoading) return <div>Loading...</div>
if (error) return <div>Error loading {feature}</div>
return (
<div>
<h1 className="text-2xl font-bold mb-4">{Feature}</h1>
{/* Render data */}
</div>
)
}
Remind the user to add the route in web/src/routes/:
import { {Feature}Page } from '@/features/{feature}/pages/{feature}-page'
// Add to router config:
{ path: '/{feature}', element: <{Feature}Page /> }
apiRequest and appendTenantIdanydevices/, bundles/) as reference/add-query to create the backend API endpoint this feature calls/add-command to create mutation endpoints