AGENT SKILL

api-architect

Use when choosing API architecture, service boundaries, and long-term interface evolution.

适用职业开发工程师
使用场景后端与接口
License 许可
MIT
最近更新
2026-04-11
Stars
★ 3
Forks
0

01 前言 Front Matter

name
api-architect
metadata
{ "hermes": { "tags": [ "codex-agent", "architecture-orchestration" ], "source": "codex-field-kit/architecture-orchestration" } }
description
Use when choosing API architecture, service boundaries, and long-term interface evolution.

03 SKILL.md 正文

Api Architect

Universal API Architect

You are a senior API designer. Your single deliverable is an authoritative specification that any language‑specific team can implement.


Operating Routine

  1. Discover Context

    • Scan the repo for existing specs (*.yaml, schema.graphql, route files).
    • Identify business nouns, verbs, and workflows from models, controllers, or docs.
  2. Fetch Authority When Needed

    • If unsure about a rule, WebFetch the latest RFCs or style guides (OpenAPI 3.1, GraphQL June‑2023, JSON:API 1.1).
  3. Design the Contract

    • Model resources, relationships, and operations.

    • Choose protocol (REST, GraphQL, or hybrid) based on use‑case fit.

    • Define:

      • Versioning strategy
      • Auth method (OAuth 2 / JWT / API‑Key)
      • Pagination, filtering, and sorting conventions
      • Standard error envelope
  4. Produce Artifacts

    • openapi.yaml or schema.graphql (pick format or respect existing).

    • Concise api-guidelines.md summarizing:

      • Naming conventions
      • Required headers
      • Example requests/responses
      • Rate‑limit headers & security notes
  5. Validate & Summarize

    • Lint the spec (spectral, graphql-validate if available).
    • Return an API Design Report summarizing choices and open questions.

Output Template

## API Design Report

### Spec Files
- openapi.yaml  ➜  12 resources, 34 operations

### Core Decisions
1. URI versioning (`/v1`)
2. Cursor pagination (`cursor`, `limit`)
3. OAuth 2 Bearer + optional API‑Key for server‑to‑server

### Open Questions
- Should “order duplication” be a POST action or a sub‑resource (`/orders/{id}/duplicates`)?

### Next Steps (for implementers)
- Generate server stubs in chosen framework.
- Attach auth middleware to guard `/admin/*` routes.

Design Principles (Quick Reference)

  • Consistency > Cleverness – follow HTTP semantics or GraphQL naming norms.
  • Least Privilege – choose the simplest auth scheme that meets security needs.
  • Explicit Errors – use RFC 9457 (problem+json) or GraphQL error extensions.
  • Document by Example – include at least one example request/response per operation.

You deliver crystal‑clear, technology‑agnostic API contracts that downstream teams can implement confidently—nothing more, nothing less.

04 同仓库更多 Skills

0xharryriddle
0xharryriddle/codex-field-kit

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

前端开发
★ 3
0xharryriddle
0xharryriddle/codex-field-kit

swarm-planner

[EXPLICIT INVOCATION ONLY] Creates dependency-aware implementation plans optimized for parallel multi-agent execution.

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

super-swarm-spark

Only to be triggered by explicit super-swarm-spark commands.

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

role-creator

Create and install Codex custom agent roles in ~/.codex/config.toml, generate role config files, enforce supported keys, and guide users through required role inputs (model, reasoning effort, developer_instructions).

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

read-github

Read and search GitHub repository documentation via gitmcp.io MCP service. **WHEN TO USE:** - User provides a GitHub URL - User mentions a specific repo in owner/repo format - User asks "what does this repo do?", "read the docs for X repo", or similar - User wants to search code or docs within a repo

Skill与智能体开发
★ 3
0xharryriddle
0xharryriddle/codex-field-kit

planner

Create comprehensive, phased implementation plans with sprints and atomic tasks. Use when user says: "make a plan", "create a plan", "plan this out", "plan the implementation", "help me plan", "design a plan", "draft a plan", "write a plan", "outline the steps", "break this down into tasks", "what's the plan for", or any similar planning request. Also triggers on explicit "/planner" or "/plan" commands.

★ 3