.agent/skills/build-crud-admin-page/SKILL.md
Skill xay dung trang quan ly CRUD cho PayloadCMS collection. Su dung khi can tao admin screen moi theo pattern BouquetScreen. List view voi filter, pagination. Form view voi create, view, edit modes. Triggers: tao trang admin, build CRUD page, tao man hinh quan ly, new admin screen.
npx skillsauth add vuthuonghai-steve/KLTN-By_Thuong_Hai-Steve build-crud-admin-pageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Skill giup AI Agent xay dung trang quan ly CRUD cho bat ky PayloadCMS collection nao, theo dung pattern cua BouquetScreen.
Skill nay cung cap workflow va references de tao:
Khi skill duoc goi, thu thap cac thong tin sau:
| Parameter | Required | Description |
|-----------|----------|-------------|
| collection | Yes | Ten collection (vd: "reviews", "vouchers") |
| fields | No | Danh sach fields can hien thi (neu khong co se doc tu schema) |
| docsPath | No | Duong dan docs hien co (neu da co docs) |
Muc tieu: Hieu ro requirements va existing patterns
Xac nhan input:
Neu thieu fields:
Doc references:
./references/architecture.md # Folder structure, data flow
./references/template-guide.md # Step-by-step guide
Doi chieu voi code hien co:
Output cho user:
Muc tieu: Implement day du theo checklist
Tao folder structure:
src/screens/Admin/{Collection}Screen/
├── index.tsx
├── types/index.ts
├── constants/index.ts
├── views/
│ ├── index.ts
│ ├── ProductListView.tsx
│ └── ProductFormView.tsx
├── components/ProductForm/
│ ├── index.ts
│ ├── ProductFormHeader.tsx
│ ├── ProductFormActions.tsx
│ ├── hooks/
│ │ ├── index.ts
│ │ └── useProductForm.ts
│ └── sections/
│ ├── index.ts
│ └── ...Section.tsx
└── hooks/
├── index.ts
├── useProductMetadata.ts
└── useProductData.ts
Implement theo checklist:
./references/checklist.mdAp dung UI/UX skills theo thu tu:
./references/ui-skills-summary.mdTao route files:
src/app/(frontend)/manager/products-{collection}/
├── page.tsx # List view
├── new/
│ └── page.tsx # Create mode
└── [id]/
└── page.tsx # View/Edit mode
Xu ly errors:
./references/errors.md neu gap loitype FormMode = 'create' | 'view' | 'edit'
// Mode determination tu URL
const currentMode = productId
? (urlMode === 'edit' ? 'edit' : 'view')
: 'create'
// Mode-based behavior
const isReadOnly = mode === 'view'
const isEditing = mode === 'edit'
const isCreating = mode === 'create'
| Route | Component | Mode |
|-------|-----------|------|
| /manager/products-{collection} | ProductListView | List |
| /manager/products-{collection}/new | ProductFormView | Create |
| /manager/products-{collection}/[id] | ProductFormView | View |
| /manager/products-{collection}/[id]?mode=edit | ProductFormView | Edit |
| Component | Responsibility | |-----------|---------------| | ProductListView | Fetch, display, filter, paginate, navigate | | ProductFormView | Orchestrate form state, mode switching, submission | | Form Sections | Handle specific field groups | | Hooks | Data fetching, form state, metadata |
| File | Description |
|------|-------------|
| ./references/README.md | Overview cua tat ca references |
| ./references/architecture.md | Folder structure, data flow, component responsibilities |
| ./references/template-guide.md | Step-by-step guide ap dung cho collection moi |
| ./references/implementation-logic.md | Chi tiet logic (form mode, metadata, categories) |
| ./references/checklist.md | Checklist trien khai tung buoc |
| ./references/errors.md | Loi thuong gap va cach xu ly |
| ./references/ui-skills-summary.md | Tom tat 4 UI/UX skills can tham khao |
User request: "Tao trang admin quan ly reviews"
Agent response:
Thu thap thong tin:
reviewsDoc references va code hien co
De xuat plan:
src/screens/Admin/ReviewScreen//manager/reviews, /manager/reviews/[id]Implement theo checklist
Apply UI/UX skills
Test va review
tools
Automates end-to-end drawing of UI screens in Pencil canvas from module spec files. Reads spec file → generates wireframe blueprint → draws each screen using Pencil MCP tools. Triggers when user provides a UI spec path and asks to draw, generate, or auto-build screens for Steve Void modules M1–M6 in STi.pen.
testing
Extracts UI Screen Specs by analyzing Schema and Diagrams. Use when you need to bridge database logic and flow diagrams into intermediate UI component specifications for a given module. Trigger when user says "analyze UI for module X", "generate ui spec", "phân tích UI module", or invokes "ui-architecture-analyst --module M[X]".
development
Giải thích lỗi TypeScript một cách dễ hiểu bằng tiếng Việt. Sử dụng khi gặp lỗi type, generic, inference, hoặc bất kỳ lỗi TS nào cần được giải thích rõ ràng.
development
Skill phan tach yeu cau/tinh nang thanh cac phase, task va subtask cu the. Tao bo tai lieu planning clean, khong chua code mau, tap trung mo ta logic va nghiep vu. Su dung khi: (1) nhan yeu cau tinh nang moi can lap ke hoach, (2) co tai lieu nghien cuu can chuyen thanh task plan, (3) nguoi dung yeu cau phan tach cong viec, (4) can tao roadmap trien khai cho du an/tinh nang. Trigger: /task-planner, /plan-tasks, "phan tach task", "lap ke hoach", "tao plan", "chia phase".