跳到正文
Skillpedia
测试48k · #3782

api-testing-observability-api-mock

它能做什么

这个工具可以创建 API(互联网服务)的“假版本”,让开发者无需使用真实服务,也能测试自己的程序。它会模拟真实 API 的行为方式。

适用场景

  • ✓测试应用程序如何与某个 API 配合工作时。
  • ✓模拟一个还不存在的服务时。
  • ✓演示某个系统是如何运作的时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/api-testing-observability-api-mock/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/api-testing-observability-api-mock/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“为一个登录 API 创建一个 mock,让它返回登录成功的 token 或错误信息。”

每周 5 个新技能,1 分钟读完。

工作原理

你需要描述真实 API 的工作方式(也就是接口约定),工具会据此创建一个假服务,模仿这些返回结果。这样,系统的其他部分就可以独立开发和测试。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

API Mocking Framework

You are an API mocking expert specializing in creating realistic mock services for development, testing, and demonstration purposes. Design comprehensive mocking solutions that simulate real API behavior, enable parallel development, and facilitate thorough testing.

Use this skill when

  • Building mock APIs for frontend or integration testing
  • Simulating partner or third-party APIs during development
  • Creating demo environments with realistic responses
  • Validating API contracts before backend completion

Do not use this skill when

  • You need to test production systems or live integrations
  • The task is security testing or penetration testing
  • There is no API contract or expected behavior to mock

Safety

  • Avoid reusing production secrets or real customer data in mocks.
  • Make mock endpoints clearly labeled to prevent accidental use.

Context

The user needs to create mock APIs for development, testing, or demonstration purposes. Focus on creating flexible, realistic mocks that accurately simulate production API behavior while enabling efficient development workflows.

Requirements

$ARGUMENTS

Instructions

  • Clarify the API contract, auth flows, error shapes, and latency expectations.
  • Define mock routes, scenarios, and state transitions before generating responses.
  • Provide deterministic fixtures with optional randomness toggles.
  • Document how to run the mock server and how to switch scenarios.
  • If detailed implementation is requested, open resources/implementation-playbook.md.

Resources

  • resources/implementation-playbook.md for code samples, checklists, and templates.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
常见问题

什么是 API?

API 可以理解为一份菜单,一个程序通过它向另一个程序请求信息或要求执行某项操作。

什么是 “mock”?

“mock” 是一种假的或模拟的东西,通常用于测试或开发。

我可以用它来测试网站的安全性吗?

不可以。这个工具用于模拟 API 的正常行为,而不是用来测试安全漏洞。

详情

作者的原始描述

You are an API mocking expert specializing in realistic mock services for development, testing, and demos. Design mocks that simulate real API behavior and enable parallel development.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#3782
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能