moai-ref-api-patterns

moai-ref-api-patterns is a skill for Claude Code from modu-ai/moai-adk. It costs 85 tokens per session (1,778 once invoked), scanned A, original, Apache-2.0.

A reference for designing backend REST and GraphQL APIs, which let software exchange data over the web. It covers URL naming, create and update operations, filtering, sorting, versioning, HTTP status codes, error handling, and input validation.

In plain words
What is it for?
Use it when designing or reviewing API endpoints, implementing resource operations, adding pagination or filters, choosing status codes, and validating incoming data.
Why use it?
It gives backend work a shared set of decisions for how APIs name resources, report results, and handle invalid requests.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it when designing or reviewing API endpoints, implementing resource operations, adding pagination or filters, choosing status codes, and validating incoming data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/modu-ai/moai-adk/moai-ref-api-patterns
About the project

MoAI-ADK is a Go-based harness that organizes and verifies Claude Code work across planning, implementation, synchronization, and review stages. Developers use it to structure agentic coding tasks, apply quality gates, and route work across language models, while the catalogue entries extend its workflow with skills, hooks, commands, MCP servers, instructions, and settings.

modu-ai/moai-adk · 1,236 stars · on GitHub · adk.mo.ai.kr

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add modu-ai/moai-adk --skill moai-ref-api-patterns
Clone the repo
git clone --depth 1 https://github.com/modu-ai/moai-adk

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for moai-ref-api-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-ref-api-patterns/github.svg)](https://agentmods.dev/skills/modu-ai/moai-adk/moai-ref-api-patterns)
Your own site
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/moai-ref-api-patterns"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-ref-api-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for moai-ref-api-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/moai-ref-api-patterns"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-ref-api-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,778 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 47
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Prompt Injection · line 162
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.01778
Opus 5.5 $0.00034 $0.00711
Sonnet 5.5 $0.00017 $0.00356
Haiku 4.5 $0.00009 $0.00178

Measured 1mo ago against content hash 35a794194558, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

moai-ref-api-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/moai-ref-api-patterns/SKILL.md · 199 lines

How it starts

The opening of the file, as written. The whole thing — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Patterns Reference

Target Spawn

Backend domain work spawned via Agent(general-purpose) with backend instructions - Applies these patterns directly to API implementation and review.

RESTful API Design Conventions

Principle Convention Example
Resource Naming Plural nouns, lowercase, kebab-case /api/v1/user-profiles
Collection GET returns array with pagination GET /users?page=1&limit=20
Single Resource GET returns object GET /users/{id}
Create POST to collection POST /users
Update (full) PUT to resource PUT /users/{id}
Update (partial) PATCH to resource PATCH /users/{id}
Delete DELETE to resource DELETE /users/{id}
Nested Resources Max 2 levels deep /users/{id}/posts
Filtering Query params ?status=active&role=admin
Sorting Sort param ?sort=-created_at,name
Versioning URL prefix /api/v1/, /api/v2/

HTTP Status Code Guide

Category Code When to Use
Success 200 OK Successful GET, PUT, PATCH, DELETE
Success 201 Created Successful POST (resource created)
Success 204 No Content Successful DELETE (no body)
Client Error 400 Bad Request Malformed request, validation failure
Client Error 401 Unauthorized Missing or invalid authentication
Client Error 403 Forbidden Authenticated but not authorized
Client Error 404 Not Found Resource does not exist
Client Error 409 Conflict Resource state conflict (duplicate)
Client Error 422 Unprocessable Valid syntax but semantic error
Client Error 429 Too Many Rate limit exceeded
Server Error 500 Internal Unexpected server error
Server Error 503 Service Unavailable Maintenance or overload

Error Response Format

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Input validation failed",
    "details": [
      {"field": "email", "message": "Must be a valid email address"},
      {"field": "age", "message": "Must be between 0 and 150"}
    ],
    "request_id": "req_abc123"
  }
}

Read the full file on GitHub · 199 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 199 lines · 85 tokens per session scan A 35a794194558

Subscribe to this mod's changes

moai-ref-api-patterns is a skill published in the GitHub repository modu-ai/moai-adk (1,236 stars, last pushed today), licensed Apache-2.0. It adds 85 tokens to every session and 1,778 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.