admin-crud-style
Enforce consistent CRUD admin page style using React + shadcn/ui + Tailwind + lucide-react. Covers layout, filters, tables, pagination, forms, and interaction patterns for management systems.
适合你,如果正在用React开发后台管理系统,需要一致的UI风格。
/ 通过 npx 安装 校验哈希
npx oh-my-skill add quanxiaoxiao/quan-skills/admin-crud-style/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- quanxiaoxiao/quan-skills/admin-crud-style/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify quanxiaoxiao/quan-skills/admin-crud-style安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
0GitHub stars
~836最小装载
~836含声明引用
~902文本包总量
索引托管
怎么用
技能原文 SKILL.md
Admin CRUD Style
Generate and review CRUD admin pages with a unified layout, interaction, and component standard.
Use This Skill
Use this skill when the task involves:
- creating a new admin CRUD page (list + create + edit + delete)
- reviewing an existing admin page for layout or interaction consistency
- scaffolding filters, tables, form dialogs, or pagination for a management UI
- ensuring shadcn/ui component usage follows the project baseline
When NOT to use
Do not use this skill when:
- the task is a public-facing marketing or content page
- the task is a dashboard with charts or analytics (no CRUD table)
- the UI framework is not React + shadcn/ui + Tailwind
Pre-Read Order
Read the target repository first:
README.mdpackage.json- existing admin pages for current patterns
src/components/ui/to check installed shadcn components
Then load bundled guidance from this skill pack:
../../checklists/admin-crud-style.checklist.md../../prompts/admin-crud-scaffold.md
Workflow
- Identify the entity and its CRUD operations. Determine which fields are filterable, which are table columns, and which belong in the form.
- Ensure required shadcn/ui components are installed. Check for Card, Button, Input, Select, Table, Badge, Dialog, Drawer, AlertDialog, DropdownMenu, Skeleton, Label, Pagination, Tooltip.
- Apply the standard page structure. Every CRUD list page follows: PageHeader → FilterCard → TableCard (with Pagination) → FormDialog/Drawer.
- Implement interaction patterns consistently. Enter triggers search, reset clears filters and resets pagination, edit opens pre-populated dialog, delete requires AlertDialog confirmation.
- Split code into logical files. Page component, filter component, table component, form dialog component, and custom hooks for data fetching and mutations.
Implementation Rules
Technology Stack
- React + Tailwind CSS + shadcn/ui + lucide-react
- @tanstack/react-query for data fetching
- Zod for form validation
- sonner for toast notifications
Page Layout
PageContainer (p-6 space-y-6 bg-muted/30) ├─ PageHeader (title + primary action button) ├─ FilterCard (Card p-4, max 4 fields per row, gap-4) ├─ TableCard (Card p-4, Table + Pagination) └─ FormDialog or FormDrawer
Component Rules
- Filters and table in separate Cards
- Dialog for simple forms, Drawer for complex multi-section forms
- Delete via AlertDialog with destructive style
- Badge for status columns
- Icons from lucide-react only
- Loading state: skeleton rows or overlay, never empty table
- Empty state: clean message, no large illustrations
Styling
- Spacing:
gap-4,gap-6,p-4,p-6 - Borders:
border-muted - Corners:
rounded-xl - Avoid excessive shadows or animations
File Structure
pages/<entity>/
├── index.tsx
├── components/
│ ├── <entity>-filters.tsx
│ ├── <entity>-table.tsx
│ └── <entity>-form-dialog.tsx
└── hooks/
├── use-<entity>-list.ts
└── use-<entity>-form.ts
Hook Naming
use<Entity>List use<Entity>Form use<Entity>Filters
Verification
Before completing, verify:
- Page follows the standard layout structure
- All required shadcn components are installed
- Filters, table, form, and delete confirmation all present
- Interaction patterns match the spec (Enter search, reset, pre-populated edit, delete confirmation)
- Code is split into logical files, not monolithic
- Keyboard navigation and basic accessibility work
Output Contract
Return results in this order:
Entity— what CRUD entity is being builtComponents— list of files created or modifiedshadcn Components— any newly installed componentsVerification— interaction and layout checks passed
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →
评论
登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。
…