Generate Api Docs by jeremylongshore
Generate comprehensive OpenAPI/Swagger documentation from existing APIs
- Type
- Slash Command
- Repository
- jeremylongshore/tons-of-skills-marketplace
- GitHub stars
- 2.8k
- License
- MIT
- Repo last updated
- Sep 27, 2026
What Generate Api Docs by jeremylongshore is
Generate Api Docs by jeremylongshore is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”
A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.
Generate Api Docs gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.
How to install Generate Api Docs by jeremylongshore
Claude Code
- Download generate-api-docs.md from the repository.
- Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
- Run it by typing / followed by its name.
Claude Cowork
- Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
- In Customize → Skills, click +, then upload the ZIP.
- Run it from any task with / and the skill name.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from plugins/api-development/api-documentation-generator/commands/generate-api-docs.md, shared under the repository's MIT license. Read the full file on GitHub.
Automatically generate comprehensive OpenAPI 3.0 specifications with interactive documentation, automated testing, and multi-language client SDKs from your existing API codebase or by analyzing live endpoints.
When to Use This Command
Use /generate-api-docs when you need to:
- Document existing APIs without manual specification writing
- Generate interactive API documentation for developers
- Create Postman/Insomnia collections from your API
- Enable "try it out" functionality for API endpoints
- Generate client SDKs in multiple languages
- Maintain API documentation synchronized with code
- Create API reference documentation for external consumers
- Validate API contracts and schemas
- Enable API mocking for frontend development
DON'T use this when:
- Your API is still in early design phase (use /api-contract-generator instead)
- You only need internal code comments (use JSDoc/docstrings)
- Building GraphQL APIs (use /build-graphql-server with introspection)
- APIs have no stable contract (too early in development)
Design Decisions
This command implements OpenAPI 3.0.3 specification as the primary approach because:
- Industry standard adopted by major organizations
- Extensive tooling ecosystem (Swagger UI, Redoc, SDKs)
- Supports complex schemas including oneOf, allOf, discriminators
- Native support for webhooks and callbacks
- JSON Schema validation built-in
- Multiple security schemes support
Alternative considered: API Blueprint
- Markdown-based format
- Simpler for human writing
- Less tooling support
- Recommended for documentation-first design
Alternative considered: RAML
- YAML-based with reusable components
- Good for large enterprise APIs
- Smaller ecosystem
- Recommended when modularity is critical
Alternative considered: AsyncAPI
- Specialized for event-driven APIs
- WebSocket and message queue support
- Use alongside OpenAPI for complete coverage
Prerequisites
Before running this command:
- Functioning API with consistent patterns
- Request/response examples available
- Authentication mechanism implemented
- Error response format standardized
- API versioning strategy defined
Implementation Process
Step 1: API Analysis and Discovery
Scan codebase and running API to discover all endpoints, methods, and data structures.
Step 2: Schema Extraction
Extract request/response schemas from code annotations, TypeScript types, or runtime analysis.
Step 3: OpenAPI Generation
Generate complete OpenAPI 3.0 specification with all paths, schemas, and security definitions.
Step 4: Documentation Enhancement
Add descriptions, examples, and grouping tags for better organization and understanding.
Step 5: Interactive Documentation Setup
Deploy Swagger UI and Redoc for interactive API exploration and testing.
Output Format
The command generates:
- openapi.yaml - Main OpenAPI 3.0 specification
- openapi.json - JSON format for tooling
- docs/ - Static HTML documentation
- index.html - Swagger UI interface
- redoc.html - Redoc documentation
- collections/ - External tool formats
- postman_collection.json - Postman import
- insomnia_workspace.json - Insomnia import
- bruno_collection.bru - Bruno collection
- examples/ - Request/response examples
- schemas/ - Extracted JSON schemas
- README.md - Getting started guide
Code Examples
Example 1: Express.js API with Automatic Documentation Generation
// api-documentation-generator.js
const swaggerJsdoc = require('swagger-jsdoc');
const swaggerUi = require('swagger-ui-express');
const { z } = require('zod');
const zodToJsonSchema = require('zod-to-json-schema');
const express = require('express');
const fs = require('fs').promises;
const path = require('path');
const yaml = require('js-yaml');
class APIDocumentationGenerator {
constructor(app, config = {}) {
this.app = app;
this.config = {
title: config.title || 'API Documentation',
version: config.version || '1.0.0',
description: config.description || 'API Documentation',
servers: config.servers || [{ url: 'http://localhost:3000' }],
…Example 2: Python FastAPI with Automatic OpenAPI Enhancement
# api_doc_enhancer.py
from fastapi import FastAPI, APIRouter, Depends, HTTPException
from fastapi.openapi.utils import get_openapi
from fastapi.openapi.docs import get_swagger_ui_html, get_redoc_html
from pydantic import BaseModel, Field
from typing import List, Optional, Dict, Any
import json
import yaml
from pathlib import Path
import httpx
from datetime import datetime
class OpenAPIEnhancer:
"""Enhance FastAPI's auto-generated OpenAPI with additional features"""
def __init__(self, app: FastAPI):
self.app = app
self.examples = {}
… Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Generate Api Docs by jeremylongshore?
Generate Api Docs by jeremylongshore is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Generate comprehensive OpenAPI/Swagger documentation from existing APIs
How do I install Generate Api Docs by jeremylongshore in Claude Code?
Download generate-api-docs.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.
Can I use Generate Api Docs by jeremylongshore in Claude Cowork?
Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.
Is Generate Api Docs by jeremylongshore safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Geepers Corpus Ux Designs linguistically-informed interfaces for corpus research tools — KWIC displays, concordance viewers, frequency charts, and genre filters following Swiss Design principles. Use when building or improving a UI for a corpus or NLP tool. Trigger with "design the concordance viewer", "improve the KWIC display". Subagent · jeremylongshore/tons-of-skills-marketplace
- Geepers Dashboard Synchronizes admin dashboards, registers new services for persistence via service_manager.py, and verifies all dashboards reflect accurate system state after reboots. Use when adding a new service or verifying the system after a restart. Trigger with "sync the dashboard", "register this service for persistence". Subagent · jeremylongshore/tons-of-skills-marketplace
- Geepers Db Analyzes query plans, recommends indexes, and diagnoses N+1 patterns, lock contention, and missing pagination for SQLite and PostgreSQL databases. Use when a search endpoint is slow or the database shows signs of needing to scale. Trigger with "analyze slow queries", "optimize the database". Subagent · jeremylongshore/tons-of-skills-marketplace
- Geepers Deps Audits project dependencies for CVEs, outdated packages, and license compatibility using pip-audit, npm audit, and pip-licenses/license-checker. Use when hardening security posture or planning a major dependency upgrade. Trigger with "audit dependencies for vulnerabilities", "check what breaks if I upgrade this". Subagent · jeremylongshore/tons-of-skills-marketplace
- Generate Contract Generate comprehensive API contracts for consumer-driven contract testing Slash Command · jeremylongshore/tons-of-skills-marketplace
- Gen Report Generate comprehensive test reports with coverage and trends Slash Command · jeremylongshore/tons-of-skills-marketplace
- Generate E2e Generate end-to-end browser tests for user workflows Slash Command · jeremylongshore/tons-of-skills-marketplace
- Gen Doubles Generate test doubles (mocks, stubs, spies, fakes) for unit testing Slash Command · jeremylongshore/tons-of-skills-marketplace