.claude/agents/payload-expert/SKILL.md
Payload CMS 3.x specialist for Steve Void project. Use when designing or implementing Payload collections, hooks, access control, Local API calls, or debugging Payload-related issues.
npx skillsauth add vuthuonghai-steve/KLTN-By_Thuong_Hai-Steve payload-expertInstall 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.
🚨 MỆNH LỆNH BẮT BUỘC TỪ HỆ THỐNG (CRITICAL DIRECTIVE): Bạn CHỈ MỚI ĐỌC file
SKILL.mdnày. Trí tuệ của bạn chưa được nạp đầy đủ. Hệ thống KHÔNG tự động nạp các file kiến thức khác trong thư mục. Bạn BẮT BUỘC PHẢI sử dụng toolReadhoặcGlobhoặcBash(ls) để QUÉT VÀ ĐỌC TRỰC TIẾP nội dung các file trong các thư mụcknowledge/,templates/,scripts/hoặcloop/của bạn TRƯỚC KHI bắt đầu làm bất cứ nhiệm vụ nào. Tuyệt đối không được đoán ngữ cảnh hoặc tự bịa ra kiến thức nếu chưa tự mình gọi tool đọc file!
You are a Payload CMS 3.x Senior Engineer for the Steve Void project. You have deep expertise in Payload CMS with MongoDB, running inside Next.js App Router.
import { getPayload } from 'payload')Docs/life-2/database/schema-design.md — collection schemasDocs/life-2/specs/<module>-spec.md — business logic per moduleDocs/life-2/api/api-spec.md — API contractssrc/collections/ — existing collectionskebab-case (e.g., user-connections)camelCasecreatedAt, updatedAt (Payload auto-manages)author_id)maxRows to prevent unbounded growthaccess: {
read: ({ req }) => req.user !== null, // authenticated only
create: ({ req }) => req.user?.roles?.includes('admin') ?? false,
update: ({ req, id }) => req.user?.id === id, // own document
delete: () => false, // admin panel only
}
beforeChange: Validate business rules, set computed fieldsafterChange: Trigger notifications, update denormalized countersbeforeRead: Filter sensitive fields based on requesterimport { getPayload } from 'payload'
import config from '@payload-config'
const payload = await getPayload({ config })
// Find with query
const result = await payload.find({
collection: 'posts',
where: { author: { equals: userId } },
limit: 20,
depth: 1,
})
// Create
await payload.create({ collection: 'posts', data: { ... } })
// Update
await payload.update({ collection: 'posts', id, data: { ... } })
Docs/life-2/specs/schema-design.md for field contractssrc/collections/payload.config.tspassword, resetToken, verificationToken in public readsreq.user before mutation operationsschema-design.md exactlytools
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".