kiranism-shadcn-dashboard
できること
このスキルは、Next.js と shadcn の管理用ダッシュボードのテンプレートで、機能を作るためのガイドです。このスターターを使い、新しいページをその構造に合わせたい開発者向けです。
使う場面
- ✓ダッシュボードに、新しいページや機能のモジュールを追加したいとき。
- ✓テンプレートのスタイルで、データの表、フォーム、ナビゲーションの項目を追加したいとき。
- ✓ダッシュボードにテーマを追加したり、役割に基づくアクセスを設定したりしたいとき。
スキルのリンク
https://github.com/Kiranism/next-shadcn-dashboard-starter/blob/main/.agents/skills/kiranism-shadcn-dashboard/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ダッシュボードに、検索できる表つきの新しい顧客ページを追加してください。テンプレートのパターンに従ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、テンプレートの中で、それぞれの種類のファイルがどこに置かれるかを調べ、その規則に従います。そのうえで、対応するフォルダーにページ、表、フォームを作ります。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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
よくある質問
このテンプレートはどのフレームワークを使いますか?
スキルは、React の上に作られた shadcn のコンポーネントを使う Next.js 16 のプロジェクトだと説明しています。
アクセス制御にも役立ちますか?
はい。スキルは、ページの役割に基づくアクセス制御の設定も扱います。
新しいページはどこに置きますか?
ページはダッシュボードのアプリのフォルダーに、機能のコードはその専用の機能フォルダーに置きます。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 7.2k
- ランキング
- #13309
- ライセンス
- MIT
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
next-best-practices
7.2kNext.js のコードを、ルート、サーバーコンポーネント、データの読み込み、エラーページについての現在のベストプラクティスに沿って書き、レビューするようエージェントを支援します。
tanstack-form
7.2kReact などのフレームワークで、フィールドの検査、繰り返しのフィールド、スキーマによる検証を含む、型安全なフォームを作るようエージェントを支援します。
tanstack-query
7.2kTanStack Query で、React アプリのデータの読み込み、更新、キャッシュ、データの変更を扱うようエージェントを支援します。サスペンスによる読み込みも含みます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。