kiranism-shadcn-dashboard
Skill này làm gì
Skill này là hướng dẫn xây dựng tính năng trong template bảng điều khiển admin Next.js và shadcn. Dành cho lập trình viên dùng starter này và muốn các trang mới khớp với cấu trúc của nó.
Khi nào nên dùng
- ✓Khi bạn muốn thêm một trang hoặc mô-đun tính năng mới vào bảng điều khiển.
- ✓Khi bạn cần thêm bảng dữ liệu, biểu mẫu hoặc mục điều hướng theo phong cách của template.
- ✓Khi bạn muốn thêm giao diện hoặc thiết lập truy cập theo vai trò trong bảng điều khiển.
Liên kết skill
https://github.com/Kiranism/next-shadcn-dashboard-starter/blob/main/.agents/skills/kiranism-shadcn-dashboard/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Thêm một trang Khách hàng mới vào bảng điều khiển của tôi, có bảng tìm kiếm được, theo đúng mẫu của template.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent tra cứu nơi mỗi loại file thuộc về trong template và làm theo quy ước của nó. Sau đó nó xây dựng trang, bảng hoặc biểu mẫu trong các thư mục tương ứng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Dashboard Development Guide
This skill encodes the exact patterns and conventions used in this Next.js 16 + shadcn/ui admin dashboard template.
Quick Reference: What Goes Where
| Task | Location |
|---|---|
| New page | src/app/dashboard/<name>/page.tsx |
| New feature module | src/features/<name>/ |
| Feature components | src/features/<name>/components/ |
| API types | src/features/<name>/api/types.ts |
| Service layer | src/features/<name>/api/service.ts |
| Query + mutation opts | src/features/<name>/api/queries.ts |
| Zod schemas | src/features/<name>/schemas/<name>.ts |
| Filter/select options | src/features/<name>/constants/ |
| Nav config | src/config/nav-config.ts |
| Types | src/types/index.ts |
| Mock data | src/constants/mock-api-<name>.ts |
| Search params | src/lib/searchparams.ts |
| Query client | src/lib/query-client.ts |
| Theme CSS | src/styles/themes/<name>.css |
| Theme registry | src/components/themes/theme.config.ts |
| Custom hook | src/hooks/ |
| Icons registry | src/components/icons.tsx |
Adding a New Feature (End-to-End)
When a user asks to add a feature (e.g., "add an orders page"), follow these steps in order. Each step below shows the minimal pattern — see reference files for full templates.
Step 1: Mock API (src/constants/mock-api-<name>.ts)
See references/mock-api-guide.md for the complete template. Key structure:
import { faker } from '@faker-js/faker';
import { matchSorter } from 'match-sorter';
import { delay } from './mock-api';
export type Order = {
id: number;
customer: string;
status: string;
total: number;
created_at: string;
updated_at: string;
};
export const fakeOrders = {
records: [] as Order[],
initialize() {
/* generate with faker */
},
async getOrders({ page, limit, search, sort }) {
/* filter, sort, paginate, return { items, total_items } */
},
async getOrderById(id: number) {
/* find by id */
},
async createOrder(data) {
/* push to records */
},
async updateOrder(id, data) {
/* merge into record */
},
async deleteOrder(id) {
/* filter out */
}
};
fakeOrders.initialize();
Every method should call await delay(800) to simulate network latency. Use matchSorter for search. Return { items, total_items } from list methods.
Step 2: API Layer (src/features/<name>/api/)
Each feature has 4 API files: types → service → queries → mutations.
Types (api/types.ts) — re-export the entity type from mock API, plus filter/response/payload types:
export type { Order } from '@/constants/mock-api-orders';
export type OrderFilters = { page?: number; limit?: number; search?: string; sort?: string };
export type OrdersResponse = { items: Order[]; total_items: number };
export type OrderMutationPayload = { customer: string; status: string; total: number };
Service (api/service.ts) — data access layer. One exported function per operation:
import { fakeOrders } from '@/constants/mock-api-orders';
import type { OrderFilters, OrdersResponse, OrderMutationPayload } from './types';
export async function getOrders(filters: OrderFilters): Promise<OrdersResponse> {
return fakeOrders.getOrders(filters);
}
export async function getOrderById(id: number) {
return fakeOrders.getOrderById(id);
}
export async function createOrder(data: OrderMutationPayload) {
return fakeOrders.createOrder(data);
}
export async function updateOrder(id: number, data: OrderMutationPayload) {
return fakeOrders.updateOrder(id, data);
}
export async function deleteOrder(id: number) {
return fakeOrders.deleteOrder(id);
}
Queries (api/queries.ts) — one object for reads (keys + queryOptions) and one for writes (mutationOptions with only mutationFn). Same shape as todosQueries / todosMutations in TanStack's official Next.js optimistic updates example:
i
Câu hỏi thường gặp
Template này dùng framework nào?
Skill mô tả một dự án Next.js 16 với các thành phần shadcn được xây trên React.
Nó có giúp kiểm soát truy cập không?
Có. Skill bao gồm thiết lập kiểm soát truy cập theo vai trò cho các trang.
Trang mới đặt ở đâu?
Trang đặt trong thư mục ứng dụng dashboard, còn mã tính năng đặt trong thư mục features riêng.
Chi tiết
Mô tả gốc của tác giả
Guide for building features, pages, tables, forms, themes, and navigation in this Next.js 16 shadcn dashboard template. Use this skill whenever the user wants to add a new page, create a feature module, build a data table, add a form, configure navigation items, add a theme, set up RBAC access control, or work with the dashboard's patterns and conventions. Also triggers when adding routes under /dashboard, working with Clerk auth/orgs/billing, creating mock APIs, or modifying the sidebar. Even if the user doesn't mention "dashboard" explicitly — if they're adding UI, pages, or features to this
Độ phổ biến
- Sao GitHub
- 7.2k
- Vị trí xếp hạng
- #13309
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
next-best-practices
7.2kGiúp agent của bạn viết và kiểm tra code Next.js theo các cách làm tốt hiện nay về route, server component, tải dữ liệu và trang lỗi.
tanstack-form
7.2kGiúp agent của bạn xây dựng form an toàn kiểu dữ liệu trong React và framework khác, có kiểm tra từng trường, trường lặp lại và xác thực schema.
tanstack-query
7.2kGiúp agent của bạn tải và cập nhật dữ liệu trong ứng dụng React bằng TanStack Query, gồm tải theo suspense, lưu cache và thay đổi dữ liệu.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.