合约构建器

设计与多媒体 社区

技能解读

当前原文的自动摘译,尚未人工审校。

概述

在实施细节开始发生变化之前定义合同。

核心工作流程

明确消费者、操作和边界:端点、事件、内部服务或公共 API。定义请求形状、必填字段、验证规则、默认值和身份验证期望。定义成功和失败的响应形状,包括稳定的错误代码和消息。添加使合约易于采用和测试的示例。检查兼容性、命名一致性、分页、幂等性和版本控制问题。

交付

提供可供实施的合同。包括示例有效负载和明确的错误案例。呼吁做出影响消费者或向后兼容性的开放决策。

护栏

比起纯散文的描述,更喜欢明确的模式。当系统已有模式时,请保持端点之间的错误形状一致。尽早打破旗帜改变,而不是把它们隐藏在草稿中。

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
设计与多媒体
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@00PrabalK00 · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# Api Contract Builder

## Overview

Define the contract before implementation details start to drift.

## Core Workflow

1. Clarify the consumer, operation, and boundary: endpoint, event, internal service, or public API.
2. Define the request shape, required fields, validation rules, defaults, and auth expectations.
3. Define the response shape for success and failure, including stable error codes and messages.
4. Add examples that make the contract easy to adopt and test.
5. Check compatibility, naming consistency, pagination, idempotency, and versioning concerns.

## Deliver

- Provide a contract that is implementation-ready.
- Include sample payloads and clear error cases.
- Call out open decisions that affect consumers or backward compatibility.

## Guardrails

- Prefer explicit schemas over prose-only descriptions.
- Keep error shapes consistent across endpoints when the system already has a pattern.
- Flag breaking changes early rather than hiding them in a draft.

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。