← 返回 Skills 市场
Api Generator
作者
BytesAgain2
· GitHub ↗
· v2.0.0
· MIT-0
2324
总下载
3
收藏
20
当前安装
9
版本数
在 OpenClaw 中安装
/install api-generator
功能描述
API code generator. Generate RESTful endpoints, GraphQL schemas, OpenAPI/Swagger docs, API clients, mock servers, authentication, rate limiting.
使用说明 (SKILL.md)
⚡ API Generator
Generate production-ready API code scaffolds from zero. REST, GraphQL, auth, tests — all in one tool.
Usage
bash scripts/apigen.sh \x3Ccommand> \x3Cresource_name> [options]
Commands
Core Generation
- rest
\x3Cname>— RESTful CRUD endpoints (Express.js) - graphql
\x3Cname>— GraphQL Type + Query + Mutation schema - swagger
\x3Cname>— OpenAPI 3.0 specification document
Utilities
- client
\x3Cname>— Python API client class - mock
\x3Cname>— Mock API server with in-memory store - auth
\x3Ctype>— Auth code (jwt/oauth/apikey) - rate-limit
\x3Ctype>— Rate limiter (token-bucket/sliding-window) - test
\x3Cname>— 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
安全使用建议
This skill appears to do what it claims: generate API scaffolds and example code. Before running, review the bundled scripts (scripts/apigen.sh and scripts/script.sh). They are local template generators and do not make network calls, but script.sh will create ~/.local/share/api-generator (or $APIGEN_DIR/XDG_DATA_HOME) and append a history.log — if you prefer no writes, set APIGEN_DIR to a tmp path or inspect output without running stateful commands. Also review generated auth templates (they reference secrets like JWT_SECRET with 'change-me-in-production') and audit any generated code before using in production. If you need extra assurance, run the scripts in an isolated environment or container.
功能分析
Type: OpenClaw Skill
Name: api-generator
Version: 2.0.0
The api-generator skill bundle is a legitimate code scaffolding tool for generating REST, GraphQL, and authentication boilerplate. Analysis of scripts/apigen.sh and scripts/script.sh shows they only print templates to stdout or log basic command history to a local directory, with no evidence of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name/description (API code generator for REST/GraphQL/Swagger/clients/mocks/auth/rate-limiting/tests) align with the included scripts and templates. The two provided scripts produce the claimed outputs and suggested tooling (npm/pip) is only referenced in templates or usage hints — nothing appears unrelated to API generation.
Instruction Scope
SKILL.md directs the agent to run scripts/apigen.sh which generates templates to stdout; that stays within the stated purpose. Note: scripts/script.sh also provides a CLI-like helper that creates a per-user data directory and logs actions (history.log). Templates include references to environment variables (e.g., JWT_SECRET) as placeholders; the skill does not attempt to read arbitrary system files or external secrets.
Install Mechanism
No install spec is provided (instruction-only) and the included code is local shell/Python template generation. No downloads, third-party registries, or archive extraction are performed by the skill itself.
Credentials
The skill declares no required environment variables or credentials. References to env vars appear only in generated template snippets (e.g., JWT_SECRET) which are normal for auth examples and not requested/consumed by the skill at runtime.
Persistence & Privilege
always is false and the skill does not request elevated privileges. However, scripts/script.sh will create a data directory (default: ${APIGEN_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/api-generator}) and append to $DATA_DIR/history.log — local persistence in the user's home directory. This is reasonable for a scaffolding tool but worth noting to users who expect no filesystem writes.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install api-generator - 安装完成后,直接呼叫该 Skill 的名称或使用
/api-generator触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
v2.5 standard: Use-when desc, homepage, source, security fix
v2.3.4
yaml-fix+quality
v2.3.3
yaml-fix+quality
v2.3.2
Quality upgrade
v2.3.1
Quality upgrade: custom functionality
v2.3.0
Quality fixes: removed third-party references, aligned docs with implementation
v2.2.0
Enhanced descriptions for better AI triggering
v1.0.1
probe
v1.0.0
Initial release of API Generator skill.
- Generate RESTful endpoints, GraphQL schemas, and OpenAPI/Swagger docs.
- Create Python API clients and mock servers.
- Add authentication (JWT, OAuth, API key) and rate limiting.
- Generate Jest + Supertest API test suites.
- All commands output production-ready, well-commented code scaffolds for backend development.
元数据
常见问题
Api Generator 是什么?
API code generator. Generate RESTful endpoints, GraphQL schemas, OpenAPI/Swagger docs, API clients, mock servers, authentication, rate limiting. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2324 次。
如何安装 Api Generator?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install api-generator」即可一键安装,无需额外配置。
Api Generator 是免费的吗?
是的,Api Generator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Api Generator 支持哪些平台?
Api Generator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Api Generator?
由 BytesAgain2(@ckchzh)开发并维护,当前版本 v2.0.0。
推荐 Skills