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

延伸阅读

DevOps 工程师撰稿人前端开发者销售代表后端开发者教练与培训师软件架构师法律顾问QA 工程师财务与行政全栈开发者创意设计师移动开发者研究员安全工程师人事与招聘
项目经理翻译Git 专家数据分析师SEO 专家会计本地化专员公关与传播头脑风暴者运营与物流营销专员客户服务项目助理采购专员社群运营私人助理

下载 AgentsRoom

在一个窗口中运行你所有项目的所有 AI 代理。

下载 AgentsRoom免费

配套应用:随时随地监控你的 Agent

使用 Claude、Codex、Antigravity CLI 或其他 AI 提供商。

获取扩展程序
Chrome Web Store

把 Bug 和需求直接发送到您的公开待办清单。

像读聊天记录一样读代理

每个代理都有角色、头像和一条对话线程,读起来就像聊天应用。

对话视图

AgentsRoom 对话视图:AI 编程代理的工作以聊天线程呈现
多项目管理
多供应商
多代理运行
实时状态
文件差异与提交
移动应用
实时预览
代理团队
浏览器自动化
Backlog 驱动开发
提示词库
技能库
查看所有功能