Api Generator

👤 ckchzh 📦 v2.0.0 ⭐ 4.1 ⬇️ 3.5K 下载
💻 开发编程 免费

📖 技能介绍


version: "2.0.0" name: api-generator description: "API code generator. Generate RESTful endpoints, GraphQL schemas, OpenAPI/Swagger docs, API clients, mock servers, authentication, rate limiting." author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills


⚡ API Generator

Generate production-ready API code scaffolds from zero. REST, GraphQL, auth, tests — all in one tool.

Usage

bash scripts/apigen.sh <command> <resource_name> [options]

Commands

Core Generation

  • rest <name> — RESTful CRUD endpoints (Express.js)
  • graphql <name> — GraphQL Type + Query + Mutation schema
  • swagger <name> — OpenAPI 3.0 specification document

Utilities

  • client <name> — Python API client class
  • mock <name> — Mock API server with in-memory store
  • auth <type> — Auth code (jwt / oauth / apikey)

    7w4.net提供免费和付费技能下载。

  • rate-limit <type> — Rate limiter (token-bucket / sliding-window)
  • test <name> — Jest + Supertest API test suite

Examples

bash scripts/apigen.sh rest user          # RESTful user endpoints
bash scripts/apigen.sh graphql product    # GraphQL product schema
bash scripts/apigen.sh auth jwt           # JWT authentication
bash scripts/apigen.sh test order         # Order API tests

Output

All code prints to stdout. Copy or redirect into your project files. Generated code includes full comments and can serve as a project starting point.


💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com

🤖 AI 评测

这个 Skill 质量中等偏上,功能覆盖面广,能生成 REST、GraphQL、API 文档等多种代码。生成代码包含错误处理和分页等实用功能,配套有使用技巧说明。不过部分功能实现可以更完善,整体缺少示例输出展示实际效果。对于需要快速搭建 API 脚手架的开发者有一定帮助。

📊 多维度评分

适应性4
规范性3.9
有效性4.5
可靠性3.9
可信度4.3

📁 包含文件 (5 个)

📄 SKILL.md 1.6 KB
📄 _meta.json 132 B
📄 scripts/apigen.sh 18.1 KB
📄 scripts/script.sh 9.7 KB
📄 tips.md 949 B