Communitygithub.com

管理后台与开发者套件开发

扩展和管理后台、开发者门户和运维控制台。适用于添加新的管理标签、指标、监控功能或内部工具。管理面板开发、数据分析、用户管理和内部工具开发时激活。

管理后台与开发者套件开发 是什么?

该技能旨在帮助您根据既定模式扩展管理后台并构建内部工具。它支持在管理面板、开发者门户或运维控制台中添加新标签、指标或监控功能。技能提供了清晰的决策树,指导您根据用户需求(如只读数据查看、系统数据修改或开发工具)选择添加标签、修改端点还是创建新工具。它还包含基于数据量、实时性要求和交互复杂度的标签内容实现策略。技能重点解决了管理后台常见的故障模式,包括数据库查询性能下降、缓存过期、审计日志缺失、HIPAA合规数据泄露和权限提升等问题,并提供了具体的检测和修复方案。最后,它明确了质量标准和边界,确保开发的安全性、性能和合规性。该技能适用于Claude Code、Cursor、Codex等AI Agent平台。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/curiositech/windags-skills/tree/HEAD/skills/admin-dashboard

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

管理后台与开发者套件开发 是做什么的?

此技能帮助您按照既定模式扩展管理后台并构建内部工具。

决策点

何时添加标签 vs 修改端点 vs 创建新工具

添加新的管理功能:
├─ 用户需要只读数据视图?
│  ├─ 数据存在于当前API中? → 修改现有标签
│  ├─ 需要新数据类型? → 添加新标签 + 新端点
│  └─ 需要复杂分析? → 创建专用分析标签
│
├─ 用户需要修改系统数据?
│  ├─ 简单CRUD操作? → 添加管理标签
│  ├─ 需要批量操作? → 创建运维控制台标签
│  └─ 多步骤工作流? → 构建向导组件
│
├─ 内部开发者工具?
│  ├─ 代码检查/文档? → 添加到 /dev 门户
│  ├─ 系统监控? → 添加到 /ops 控制台
│  └─ 用户支持工具? → 添加到管理面板
│
└─ 外部用户功能?
   → 停止:改用前端开发技能

标签内容实现策略

标签复杂度评估:
├─ 简单统计显示(< 5个指标)?
│  → 使用 StatCard 网格模式
│
├─ 带过滤的数据表格?
│  ├─ < 1000行? → 客户端过滤
│  └─ > 1000行? → 服务端分页 + 搜索
│
├─ 实时监控?
│  ├─ 每30秒以上更新一次? → 使用带刷新间隔的 SWR
│  └─ 每5秒更新一次? → 使用 WebSocket 连接
│
└─ 交互式控件?
   ├─ 简单的切换/按钮? → 内联操作
   └─ 复杂表单? → 模态对话框 + 确认流程

故障模式

1. 数据库查询性能下降螺旋

症状: 管理面板超时或加载缓慢(超过5秒) 检测: 监控 /api/admin/* 响应时间超过3秒 修复: 添加数据库索引,实现分页,缓存聚合统计数据

-- 错误:全表扫描
SELECT COUNT(*) FROM pageViews WHERE userId = ?

-- 正确:使用索引时间范围
SELECT COUNT(*) FROM pageViews WHERE createdAt > NOW() - INTERVAL 24 HOUR

2. 缓存过期导致显示错误数据

症状: 管理员看到过时的指标,与最近活动不符 检测: 用户报告在已知操作后统计信息未变化 修复: 在数据变更时实现缓存失效,添加"最后更新时间"时间戳

// 在变更中添加缓存破坏
await updateUserData(userId);
await revalidateTag('admin-stats'); // 清除缓存

3. 缺少审计日志

症状: 管理员操作未记录到 auditLog 表中 检测: 检查过去24小时内管理员操作的 auditLog 条目 修复: 在所有管理端点中添加 logAdminAction() 调用

// 每个管理端点中必须调用
await logAdminAction(admin.id, AuditAction.USER_DATA_VIEW, 'users', userId);

4. HIPAA违规导致数据泄露

症状: 错误消息、日志或聚合视图中出现PHI(受保护健康信息) 检测: 错误中包含用户电子邮件/电话/医疗数据 修复: 清理所有错误响应,在管理视图中使用哈希标识符

// 错误:暴露用户电子邮件
{ error: "用户 [email protected] 未找到" }

// 正确:使用匿名标识符
{ error: "用户ID hash_123abc 未找到" }

5. 管理员权限提升

症状: 普通用户可以访问管理端点 检测: 非管理员用户收到管理数据而非403错误 修复: 在每个管理端点的第一行添加 requireAdmin() 检查

export async function GET(request: Request) {
  const admin = await requireAdmin(); // 必须放在第一行
  if (!admin) return Response.json({ error: 'Forbidden' }, { status: 403 });
  // ... 其余处理程序
}

工作示例

添加生产健康监控标签

场景: 添加实时API健康监控,包含延迟指标、错误率和服务状态。

1. 决策点导航:

  • 用户需要实时监控 → 使用带30秒刷新间隔的 SWR
  • 系统数据,非用户数据 → 添加到管理面板
  • 新数据类型(API指标)→ 创建新标签 + 端点

2. 实现步骤:

使用所需模式创建端点:

// src/app/api/admin/health/route.ts
export async function GET(request: Request) {
  const admin = await requireAdmin(); // 先确保安全
  if (!admin) return Response.json({ error: 'Forbidden' }, { status: 403 });
  
  const rateLimitResult = await rateLimiter.check(admin.id); // 频率限制
  if (!rateLimitResult.allowed) return Response.json({}, { status: 429 });
  
  await logAdminAction(admin.id, 'HEALTH_VIEW', 'metrics', null); // 审计
  
  const metrics = await getHealthMetrics(); // 数据获取
  return Response.json(metrics);
}

创建标签组件:

function ProductionHealthTab() {
  const { data: health, error } = useSWR('/api/admin/health', fetcher, {
    refreshInterval: 30000 // 实时更新
  });
  
  return (
    <div className="space-y-6">
      <div className="grid grid-cols-4 gap-4">
        <StatCard label="API 正常时间" value="99.9%" status="good" />
        <StatCard label="平均延迟" value="45ms" trend="down" />
        <StatCard label="错误率" value="0.1%" status="warning" />
        <StatCard label="活跃服务" value="12/12" status="good" />
      </div>
    </div>
  );
}

3. 专家与新手差异:

  • 新手遗漏: 审计日志、频率限制、HIPAA安全的错误处理
  • 专家会考虑: 缓存失效策略、性能监控设置、正确的错误边界

质量门禁

  • 管理访问控制:requireAdmin() 检查对管理员用户通过,对普通用户失败
  • 频率限制:当超出频率限制时端点返回429错误(默认60请求/分钟)
  • 审计日志:管理员操作记录到 auditLog 表中,带有正确的操作类型
  • 性能基线:在真实数据量下标签加载时间小于2秒
  • HIPAA合规:无PHI暴露在错误消息或调试输出中
  • 数据验证:无效请求返回正确的400错误及安全消息
  • 缓存行为:后台变更后数据在30秒内更新
  • 错误边界:UI优雅地处理API失败而不崩溃
  • 移动端响应:标签布局在平板尺寸屏幕(768px+)上工作正常
  • 实时更新:自动刷新在10分钟以上无内存泄漏

非使用边界

此技能不应用于:

  • 外部用户功能 → 使用 frontend-development 技能
  • 认证/登录流程 → 使用 auth-security 技能
  • 数据库模式变更 → 使用 database-operations 技能
  • 电子邮件/通知系统 → 使用 communications 技能
  • API频率限制配置 → 使用 backend-api 技能
  • HIPAA合规设置 → 使用 security-compliance 技能
  • 性能优化 → 使用 optimization 技能

在以下情况下委托给其他技能:

  • 添加公共用户功能 → frontend-development
  • 修改用户认证 → auth-security
  • 创建新的供外部使用的API端点 → backend-api
  • 设置监控基础设施 → devops-infrastructure

Individual skills in this repo

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

curiositech/windags-skills

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

curiositech/windags-skills

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

curiositech/windags-skills

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

curiositech/windags-skills

Implement WCAG 2.2 AA/AAA compliance with automated testing, keyboard navigation, screen reader support, and focus management. Activate on: accessibility audit, WCAG compliance, keyboard navigation, screen reader, aria attributes, axe-core, focus trap. NOT for: design-level accessibility review (use design-accessibility-auditor), color contrast only (use css-in-js-architect).

curiositech/windags-skills

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

curiositech/windags-skills

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

curiositech/windags-skills

>- Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

curiositech/windags-skills

Conversation patterns and interaction protocols for multi-agent systems. Covers request/response, pub/sub, blackboard, delegation chains, debate, critique, consensus, fan-out/fan-in, supervisor-worker, and peer negotiation. Deep analysis of AutoGen conversation patterns, CrewAI delegation, LangGraph state passing, and FIPA-ACL performatives. Teaches how to design what agents say to each other and in what order. Activate on: "agent conversation", "agent protocol", "multi-agent debate", "agent delegation", "supervisor worker pattern", "agent voting", "consensus protocol", "fan-out fan-in", "agent negotiation", "blackboard pattern", "agent dialogue", "conversation topology", "agent handoff". NOT for: wire format or serialization (use agent-interchange-formats), orchestration infrastructure (use agentic-infrastructure-2026), single agent behavior (use agentic-patterns).

curiositech/windags-skills

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use language-specific skills), or infrastructure setup (use deployment-engineer).

curiositech/windags-skills

AI-powered calendar management and agent-based scheduling coordination. Covers calendar APIs (Google Calendar, CalDAV/iCal), AI scheduling assistants (Reclaim, Clockwise, Motion, Cal.com), building custom calendar agents with MCP, multi-calendar merging, timezone management, focus block protection, meeting fatigue detection, and agent-to-agent meeting negotiation protocols. Activate on: "calendar agent", "AI scheduling", "calendar coordination", "meeting scheduling", "calendar API", "focus time protection", "calendar optimization", "Google Calendar MCP", "Reclaim", "Clockwise", "Motion", "Cal.com", "smart scheduling", "calendar-aware agent", "timezone scheduling", "agent negotiation meetings". NOT for: manual calendar UI component design (use form-validation-architect), project management scheduling or Gantt charts (use project-management-guru-adhd), general time-tracking or pomodoro apps (use adhd-daily-planner for time-awareness), building the agent itself from scratch (use agent-creator).

curiositech/windags-skills

Build and adopt production AI agent infrastructure in 2026. Covers framework selection (LangGraph, CrewAI, AutoGen, MCP), orchestration patterns, evaluation, observability, memory systems, and tool use. Also covers the SOCIAL dimension: how to sell agent infrastructure internally, change management, measuring ROI, building trust in autonomous systems, and scaling adoption across teams. Activate on: "agent infrastructure", "agent framework comparison", "which agent framework", "sell AI tools internally", "agent adoption", "agent observability", "agent evaluation", "MCP architecture", "agentic mesh", "enterprise AI agents", "AI change management", "agent ROI". NOT for: building specific agents (use ai-engineer), designing agent behavior patterns (use agentic-patterns), prompt tuning (use prompt-engineer).

curiositech/windags-skills

Fundamental patterns for effective agentic behavior. Teaches decomposition, tool orchestration, error recovery, context management, quality self-assessment, and knowing when to stop. Model-agnostic principles that make any agent more effective regardless of domain. Activate on: "how should I structure this agent", "agentic workflow", "agent patterns", "multi-step task", "tool orchestration", "/agentic-patterns", "decompose this", "agent best practices", "chain of actions", "when should the agent stop", "agent loop design". NOT for: creating agent infrastructure (use agent-creator), building DAGs (use windags-architect), specific tool implementation.

curiositech/windags-skills

Automated discovery and matching of agent skills for dynamic task routing and capability assessment

curiositech/windags-skills

Cryptographic security for agentic systems — zero-trust agent networking, signed message envelopes (JWS/JWE), capability-based security (ocaps), Merkle tree audit trails, WASM sandboxing, and formal verification. Covers CLI dev tool security, mTLS between agents, permission boundaries (least privilege for AI agents), and supply chain security for skills/plugins. Activate on: "agent security", "zero trust agents", "secure agent communication", "capability-based security", "ocap", "signed messages between agents", "agent audit trail", "sandbox agent execution", "agent permissions", "mTLS agents", "cryptographic verification", "agent supply chain", "OWASP agentic", "prove agent did X", "tamper-proof agent logs". NOT for: application-level SAST scanning (use security-auditor), network firewall rules (use infrastructure), SOC2/HIPAA compliance (organizational), or prompt injection defense (use prompt-engineer).

curiositech/windags-skills

Data structures and serialization formats for agent-to-agent communication. Covers message envelopes, structured output schemas, capability declarations, task handoff payloads, error/retry signaling, and context windows as data structures. Deep comparison of A2A protocol, MCP, OpenAI function calling, and LangChain message types. Teaches when to use rigid schemas vs free-form with validation, typed vs untyped, streaming vs batch. Activate on: "agent message format", "agent communication schema", "agent-to-agent protocol", "A2A protocol", "MCP message format", "structured output for agents", "agent interop", "interchange format", "agent serialization", "task handoff format", "capability declaration". NOT for: what agents say to each other (use agent-conversation-protocols), orchestration topology (use multi-agent-coordination), building agent infrastructure (use agentic-infrastructure-2026).

curiositech/windags-skills

Logic-based agent programming language implementing BDI architecture for practical autonomous agent development

curiositech/windags-skills

>- Design AgentSpeak(L)-style BDI agents with context-guarded plans, selection functions, and intention stacks. Use for interruptible autonomy, agent policy, and multi-agent orchestration in dynamic environments. NOT for simple rule engines, static planners, or centralized workflows.

curiositech/windags-skills

Foundational concurrent computation model where actors communicate exclusively through asynchronous message passing

curiositech/windags-skills

Build production-ready LLM applications, advanced RAG systems, and intelligent agents. Implements vector search, multimodal AI, agent orchestration, and enterprise AI integrations. Use PROACTIVELY for LLM features, chatbots, AI agents, or AI-powered applications.

curiositech/windags-skills

license: Apache-2.0 NOT for unrelated tasks outside this domain.

相关技能