ワンクリックで
api-patterns
API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Route prediction and forecasting problems to the right method. Covers 7 families: Monte Carlo simulation, statistical forecasting (ARIMA/exponential smoothing), machine learning, Bayesian inference, crowd aggregation, causal inference, and first-principles modeling. Use when you need to predict a future outcome, quantify uncertainty, forecast time-series, update a belief with evidence, infer a cause, or synthesize expert opinions. Combines Monte Carlo Predictor, bootstrap, Bayesian update, and exponential smoothing as callable tools; routes to external methods (ML, markets, causal, physics) when those are the right fit.
Monte Carlo prediction framework for evaluating any project, with a real simulation engine. Use when the user wants to validate decisions, predict outcomes, find optimal paths, detect design divergences, or stress-test a project's direction. Activates on: 'predict', 'Monte Carlo', 'scenario analysis', 'what could go wrong', 'best path', 'validate direction', 'risk analysis', 'forecast', 'project trajectory', 'stress test', 'decision matrix', 'should I migrate', 'compare options'.
Your personal AI operating system — a digital twin that advocates for your interests 24/7. Orchestrates sub-agents, maintains persistent memory, forecasts opportunities, guards against threats, and never gives up on finding answers. Built on OpenClaw. Activates on: 'orchestrator', 'my AI', 'digital twin', 'second brain', 'spin up agent', 'find me', 'watch for', 'optimize my', 'what should I do'.
Universal AI Harness — a meta-framework that wraps any AI model to reduce token waste, ensure spec-driven thinking, maintain persistent memory, and produce calibrated, high-accuracy outputs. Combines BMAD spec-driven methodology, Deep Confidence reasoning, Monte Carlo validation, ReAct execution, and continuous learning. Use for any complex task, decision, or build. Activates on: 'think first', 'harness mode', 'spec-driven', 'BMAD', 'deep reasoning', 'plan before acting', 'structured thinking', 'truth-seeking'.
Deep Confidence Harness — a thinking, planning, and execution framework that forces structured reasoning before acting. Combines Monte Carlo scenario analysis, calibrated confidence, multi-perspective debate, and optimal path planning. Use before any complex decision, build, or task. Activates on: 'deep confidence', 'think before you act', 'plan first', 'Atlas mode', 'reason through this', 'what should I do', 'think this through', 'best approach', 'reason carefully', 'plan and execute'.
OpenClaw personal AI assistant configuration for life organization and income generation. Use when setting up, configuring, or instructing an OpenClaw agent named Henry to manage daily life, finances, tasks, calendar, and money-making activities. Activates on: 'Henry', 'OpenClaw Henry', 'my AI assistant', 'organize my life', 'make money with AI', 'set up Henry', 'Henry config'.
| name | api-patterns |
| description | API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination. |
| allowed-tools | Read, Write, Edit, Glob, Grep |
API design principles and decision-making for 2025. Learn to THINK, not copy fixed patterns.
Read ONLY files relevant to the request! Check the content map, find what you need.
| File | Description | When to Read |
|---|---|---|
api-style.md | REST vs GraphQL vs tRPC decision tree | Choosing API type |
rest.md | Resource naming, HTTP methods, status codes | Designing REST API |
response.md | Envelope pattern, error format, pagination | Response structure |
graphql.md | Schema design, when to use, security | Considering GraphQL |
trpc.md | TypeScript monorepo, type safety | TS fullstack projects |
versioning.md | URI/Header/Query versioning | API evolution planning |
auth.md | JWT, OAuth, Passkey, API Keys | Auth pattern selection |
rate-limiting.md | Token bucket, sliding window | API protection |
documentation.md | OpenAPI/Swagger best practices | Documentation |
security-testing.md | OWASP API Top 10, auth/authz testing | Security audits |
| Style | Best For | Pros | Cons |
|---|---|---|---|
| REST | Public APIs, Simple CRUD | Caching, Universal support | Over-fetching, multiple round-trips |
| GraphQL | Complex Frontends, Mobile Apps | Single request, Flexible data | Complexity, N+1 queries, Harder caching |
| tRPC | TypeScript Monorepos (Next.js) | End-to-end type safety, Speed | Tight coupling (Frontend+Backend) |
| gRPC | Microservices (Internal) | High performance (Protobuf), Streaming | Browser support is weak (requires proxy) |
Problem: User clicks "Pay" twice. You charge them twice.
Solution: Client sends Idempotency-Key: <uuid>.
GET idempotency:<uuid>.| Algorithm | How it works | Pros | Cons |
|---|---|---|---|
| Fixed Window | "100 reqs per hour" (resets at :00) | Simple | Stampede at window reset |
| Sliding Window | Smoothed over time | Fairer | More Redis memory needed |
| Token Bucket | "Bucket of coins", refill at rate X | Allows bursts (good for users) | Complex implementation |
| Need | Skill |
|---|---|
| API implementation | @[skills/backend-development] |
| Data structure | @[skills/database-design] |
| Security details | @[skills/security-hardening] |
Before designing an API:
DON'T:
DO:
| Script | Purpose | Command |
|---|---|---|
scripts/api_validator.py | API endpoint validation | python scripts/api_validator.py <project_path> |