rest-endpoint-conventions
作者:AgentsRoomAgentsRoom 已驗證尚無安裝尚無按讚更新於 2026年5月7日分類: 工程
它能做什麼
Use when adding or modifying a REST endpoint. Enforces the project's auth check, validation, error shape and pagination conventions.
安裝會在你的 AgentsRoom 桌面版開啟這個條目。如果還沒有安裝應用,你會被帶到下載頁面。
SKILL.md
---
name: rest-endpoint-conventions
description: Use when adding or modifying a REST endpoint. Enforces the project's auth check, validation, error shape and pagination conventions.
---
# REST endpoint conventions
When adding or modifying a REST endpoint:
1. Auth check FIRST: 401 if unauthenticated, 403 if forbidden — never silently empty.
2. Validate the input with the project's existing validation lib (zod, joi, ...) — do not introduce a new one.
3. Errors return `{ error: "CODE", message: "<human-readable>" }`. Status codes follow REST semantics (400 / 404 / 409 / 422 / 500).
4. List endpoints paginate by default (cursor or offset, match what the project already does).
5. Side effects (emails, webhooks) fire AFTER the DB commit, never inside the transaction.
標籤
backendapirest
延伸閱讀
Claude Ads:幫你審計廣告帳戶的 Claude Code 技能
Claude Ads 是一款面向 Claude Code 的開源技能:對 Google、Meta、LinkedIn、TikTok、Amazon 廣告等做 250 多項檢查,給出百分制評分和按優先順序排序的行動方案,全程只需十來分鐘。本文講解安裝、命令、侷限,以及如何在 AgentsRoom 中把它編排起來。
AGENTS.md:一個上下文檔案餵飽所有編碼 Agent(Codex、Antigravity、Claude)
AGENTS.md 是 AI 編碼 Agent 在動你程式碼之前先讀的那份可移植指令檔案。該往裡寫什麼、它和 CLAUDE.md 有何區別,以及如何在 Codex、Antigravity 和 Claude 之間保持同一份上下文。
下載 AgentsRoom
在一個視窗中執行你所有專案的所有 AI 代理。
免費下載 AgentsRoom
配套應用:隨時隨地監控你的 Agent
使用 Claude、Codex、Antigravity CLI 或其他 AI 提供商。
獲取擴充功能
Chrome Web Store
把 Bug 和需求直接傳送到您的公開待辦清單。