Communitygithub.com

YepAPI/skills

CRUD generators, data tables, user management, role-based access, and bulk operations.

skills 是什麼?

skills is a Claude Code agent skill that cRUD generators, data tables, user management, role-based access, and bulk operations.

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/YepAPI/skills/tree/HEAD/skills/admin-panel

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Admin Panel

Rules

  • Data tables: server-side pagination, sorting, and filtering — never load all rows client-side — use ?page=1&limit=25&sort=createdAt&order=desc
  • CRUD pattern: list (table), create (form/modal), read (detail view), update (edit form), delete (confirm dialog) — consistent layout across all resources
  • Role-based access: define roles (admin, editor, viewer) with permission matrix — check permissions server-side on every API route, not just UI
  • Bulk operations: select multiple rows, batch action (delete, export, status change) — confirm destructive actions, process in background for large batches
  • Search: debounced text search (300ms) across key fields — combine with column filters for precise queries
  • User management: list users, view details, change roles, disable/enable accounts, impersonate (admin only with audit log)
  • Audit log: record who changed what and when — { userId, action, resource, resourceId, changes, timestamp }
  • Layout: sidebar navigation (collapsible), breadcrumbs, page title with action buttons — responsive but desktop-optimized

Permission Check Pattern

const PERMISSIONS = {
  admin: ["users:read", "users:write", "users:delete", "data:read", "data:write", "data:delete"],
  editor: ["data:read", "data:write"],
  viewer: ["data:read"],
} as const;

function can(role: string, permission: string): boolean {
  return PERMISSIONS[role]?.includes(permission) ?? false;
}

// Middleware
if (!can(user.role, "users:write")) return Response.json({ error: "Forbidden" }, { status: 403 });

Data Table API Pattern

GET /api/admin/users?page=1&limit=25&sort=createdAt&order=desc&search=john&role=admin

Return: { data: [...], total: 150, page: 1, limit: 25, totalPages: 6 }

Avoid

  • Client-side-only permission checks — always enforce on the server
  • Loading all data then paginating in the browser — use server-side pagination
  • No confirmation for destructive actions — always confirm deletes and bulk operations
  • Missing audit trail — you need to know who changed what

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

YepAPI/skills

WCAG 2.1 AA — semantic HTML, keyboard navigation, screen readers.

YepAPI/skills

Tool-use patterns, multi-step reasoning, agent orchestration, and structured outputs.

YepAPI/skills

Chat UI components, streaming responses with AI SDK, context window management, and RAG patterns.

YepAPI/skills

Monitor what ChatGPT and Gemini say about your brand using YepAPI.

YepAPI/skills

Web analytics integration — event tracking, custom dashboards, privacy-first.

YepAPI/skills

Framer Motion — transitions, scroll animations, layout animations.

YepAPI/skills

OpenAPI 3.1 from Zod schemas, interactive docs with Swagger/Scalar, versioning, and example requests for every endpoint.

YepAPI/skills

Authentication security — bcrypt/argon2 hashing, brute force protection, secure password resets.

YepAPI/skills

Session auth, social providers, CSRF protection, and secure cookie patterns.

YepAPI/skills

Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

YepAPI/skills

Link building research and backlink audit using YepAPI.

YepAPI/skills

MDX blog setup, RSS feed generation, sitemap.xml, structured data/JSON-LD, and related posts.

YepAPI/skills

Redis caching, CDN cache headers, stale-while-revalidate, cache invalidation, React Query.

YepAPI/skills

Recharts/Chart.js data visualization — bar, line, area, pie charts.

YepAPI/skills

Commander.js, interactive prompts with Clack, spinners, colors, config files, exit codes, and npm publishing.

YepAPI/skills

cmdk integration, Cmd+K trigger, fuzzy search, grouped actions, keyboard navigation, and dynamic action registration.

YepAPI/skills

Threaded comments, @mentions, reactions, moderation queue, optimistic UI, and cursor pagination.

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Blog engine setup, CMS integration, SEO-optimized content workflows, and editorial calendars.

YepAPI/skills

Experiment setup, variant splitting, statistical significance, and feature flag integration.

相關技能