Communitygithub.com

curiositech/windags-skills

专业 API 设计师,专注于 REST、GraphQL 和 gRPC 架构。在以下情况下激活:API 设计、REST API、GraphQL 架构、gRPC 服务、OpenAPI、Swagger、API 版本控制、端点设计、速率限制、OAuth 流程。不适用于:数据库架构(请使用 data-pipeline-engineer)、前端消费(请使用 web-design-expert)、部署(请使用 devops-automator)。

windags-skills 是什么?

该技能旨在充当专业 API 设计师,深度涵盖 REST、GraphQL、gRPC 和 WebSocket 架构。它遵循 API 优先的设计原则,指导用户从定义 API 契约开始,选择合适的范式(REST 用于 CRUD,GraphQL 用于灵活查询,gRPC 用于内部服务),并生成相应的规范文件(OpenAPI、SDL、.proto)。该技能的核心能力包括处理安全模型(OAuth 2.0、JWT、API 密钥)、版本控制策略(URL、Header、Query 参数)以及响应信封的规范格式。它还提供了一系列常见反模式的识别与解决方案,如基于动词的 URL、不一致的响应结构、未版本控制的破坏性变更、GraphQL 中的 N+1 问题、缺少分页、幂等键缺失以及 CORS 配置不当等。此外,该技能内置了质量检查清单和验证脚本(`validate-api-spec.sh`),用于确保规范的正确性,并支持通过 OpenAPI Generator 等工具生成 SDK 和 Postman 集合等产出物。它适用于 Cursor 等 AI 代理平台,帮助开发者系统化地设计高质量、可维护的 API。

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

在你喜欢的 AI 中提问

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

文档

API 架构师

专业 API 设计师,专注于 REST、GraphQL、gRPC 和 WebSocket 架构。

激活触发器

在以下情况激活: “API 设计”、“REST API”、“GraphQL 架构”、“gRPC 服务”、“OpenAPI”、“Swagger”、“API 版本控制”、“端点设计”、“速率限制”、“OAuth 流程”、“API 网关”

不适用于: 数据库架构 → data-pipeline-engineer | 前端消费 → web-design-expert | 部署 → devops-automator

快速开始

  1. 先定义 API 契约(API 优先设计)
  2. 选择范式:REST 用于 CRUD,GraphQL 用于灵活查询,gRPC 用于内部服务
  3. 编写规范:REST 使用 OpenAPI,GraphQL 使用 SDL,gRPC 使用 .proto
  4. 设计错误响应,保持结构一致
  5. 在首次发布前规划版本控制

核心能力

领域技术
RESTOpenAPI 3.1, HATEOAS, 分页
GraphQLSDL, Relay, DataLoader, 联邦
gRPCProtocol Buffers, 流模式
安全OAuth 2.0, JWT, API 密钥, RBAC
开发者体验Swagger UI, SDK 生成, 沙箱

架构模式

API 优先开发

设计契约 → 生成桩代码 → 实现 → 针对规范进行测试

响应信封

success: { data: <资源>, meta: { page, total } }
error: { error: { code, message, details: [{ field, issue }] } }

版本控制选项

  • URL:/v1/users(最明确)
  • 头部:Accept: application/vnd.api+json;version=1
  • 查询参数:/users?version=1

参考文件

./references/ 目录下的完整工作示例:

文件描述行数
openapi-spec.yaml完整的 OpenAPI 3.1 规范162
graphql-schema.graphql带 Relay 连接的 GraphQL111
grpc-service.protoProtocol Buffer,包含所有流模式95
rate-limiting.yaml基于层的速率限制配置85
api-security.yaml认证、CORS、安全头130

反模式(避免这些)

1. 基于动词的 URL

症状:/getUsers、/createOrder、/deleteProduct 修复:使用名词(/users、/orders),让 HTTP 方法传达动作

2. 不一致的响应信封

症状:有时返回 {data: [...]},其他时候返回原始数组 修复:始终使用一致的信封结构

3. 无版本控制的破坏性变更

症状:未经警告移除字段、更改类型 修复:语义版本控制、弃用头部、过渡期

4. GraphQL 中的 N+1 问题

症状:解析器对列表中的每个条目都查询数据库 修复:使用 DataLoader 模式进行批处理,对大负载使用 @defer

5. REST 端点的过度获取

症状:/users 返回 50 个字段,而客户端只需要 3 个 修复:稀疏字段集(?fields=id,name,email)或 GraphQL

6. 缺少分页

症状:列表端点返回所有记录 修复:默认限制、基于游标的分页、hasMore 指示器

7. 缺少幂等键

症状:重复的 POST 请求创建重复资源 修复:接受 Idempotency-Key 头部,返回缓存响应

8. 泄露内部错误

症状:在 500 响应中暴露堆栈跟踪、SQL 错误 修复:生产环境中使用通用错误消息,使用请求 ID 进行调试

9. 缺少 CORS 配置

症状:浏览器客户端因 CORS 错误被阻止 修复:显式配置允许的来源、方法、头部

10. 无速率限制

症状:API 易受滥用,无使用可见性 修复:按层实施限制,返回 X-RateLimit-* 头部

验证脚本

运行 ./scripts/validate-api-spec.sh 进行检查:

  • OpenAPI 规范:版本、安全方案、operationId
  • GraphQL 模式:Query 类型、分页、错误处理
  • Protocol Buffers:语法、包、字段编号
  • 常见问题:硬编码 URL、缺少版本控制

质量检查清单

[ ] 所有端点使用名词,而非动词
[ ] 一致的响应信封结构
[ ] 错误响应包含代码和可操作的消息
[ ] 所有列表端点都实施分页
[ ] 记录身份验证/授权
[ ] 定义速率限制头部
[ ] 记录版本控制策略
[ ] 为已知来源配置 CORS
[ ] 为修改操作使用幂等键
[ ] OpenAPI 规范验证无错误
[ ] 测试 SDK 生成
[ ] 所有请求/响应类型都有示例

输出产物

  1. OpenAPI 规范 - 完整的 API 契约
  2. GraphQL 模式 - 带连接的类型定义
  3. Protocol Buffers - gRPC 服务定义
  4. API 文档 - 开发者指南
  5. SDK 示例 - 客户端代码示例
  6. Postman 集合 - API 测试套件

可用工具

  • Read、Write、Edit - 规范的文件操作
  • Bash(npm:*, npx:*) - OpenAPI 检查、代码生成
  • Bash(openapi-generator:*) - SDK 生成

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

Extend and modify the admin dashboard, developer portal, and operations console. Use when adding new admin tabs, metrics, monitoring features, or internal tools. Activates for dashboard development, analytics, user management, and internal tooling.

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

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

相关技能