API Generator for Openclaw

A powerful CLI utility for generating production-ready API scaffolds, including REST, GraphQL, authentication, and testing suites.

ckchzh
v2.0.0
Mar 18, 2026
3
3.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install api-generator

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install api-generator using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is API Generator?

API Generator is a developer-centric utility designed to eliminate the repetitive tasks of backend scaffolding. As a key component of the Openclaw Skills ecosystem, it provides a streamlined interface for generating high-quality code for RESTful endpoints, GraphQL schemas, and OpenAPI documentation. Whether you are building a microservice from scratch or adding new resources to an existing project, this tool ensures your API architecture is consistent, well-documented, and secure.

By leveraging this skill, developers can focus on business logic rather than boilerplate. The generated code is optimized for modern environments, supporting Express.js for web services and providing robust client libraries in Python. It bridges the gap between design and implementation by offering instant mock servers and comprehensive test suites, making it an essential tool for rapid prototyping and production development alike.

API Generator Use Cases

  • Rapidly bootstrapping RESTful CRUD services using Express.js.
  • Designing complex GraphQL schemas including types, queries, and mutations.
  • Automatically generating OpenAPI 3.0/Swagger documentation for better team collaboration.
  • Implementing secure authentication flows such as JWT, OAuth, or API Keys with minimal effort.
  • Creating mock API servers and Jest test suites to validate endpoints during development.

How API Generator Works

  1. Identify the resource or data model you need to expose via an API.
  2. Execute the apigen.sh script from the Openclaw Skills library using the desired protocol command (e.g., rest or graphql).
  3. Specify additional requirements like authentication types or rate-limiting strategies through command options.
  4. The tool processes the request and generates fully commented, production-grade code.
  5. Capture the output from stdout and pipe it directly into your project files or review it in the terminal.

API Generator Setup

To begin using this tool within your Openclaw Skills environment, ensure you have the script available and executable in your project directory.

# Navigate to your skills directory
cd ai-skills

# Ensure the generator script is executable
chmod +x scripts/apigen.sh

# Run a test generation to verify setup
bash scripts/apigen.sh rest health-check

API Generator Data Schema & Taxonomy

The API Generator produces structured code intended for direct integration into application source trees. The output data is organized as follows:

Data Type Format/Language Description
REST Code JavaScript (Express) Full CRUD logic including routes and controllers
GraphQL Schema Definition Type definitions and mutation/query structures
Docs OpenAPI 3.0 (YAML/JSON) Standardized API specifications
Clients Python Reusable class-based clients for programmatic access
Tests Jest/Supertest Automated unit and integration tests

API Generator Advanced Features

  • Multi-protocol support allowing seamless switching between REST and GraphQL architectures.
  • Integrated security modules for rapid deployment of JWT and OAuth 2.0 authentication.
  • Sophisticated rate-limiting options including token-bucket and sliding-window implementations.
  • Automatic mock server generation to unblock frontend development teams.
  • Customizable output redirection for easy integration into existing Openclaw Skills automation pipelines.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*