Agent skill

API Spec Analyzer

by MadAppGang in MadAppGang/claude-code

Analyzes API documentation from OpenAPI specs to provide TypeScript interfaces, request/response formats, and implementation guidance.

MITAuto-check passedBackend & APIs

Install API Spec Analyzer

skills CLI
$ npx skills add MadAppGang/claude-code --skill api-spec-analyzer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MadAppGang/claude-code api-spec-analyzer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/frontend/skills/api-spec-analyzer .claude/skills/api-spec-analyzer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-spec-analyzer
GitHub stars
284
Used in
1 other repo
Token cost
~2.7k tokens
SKILL.md length
447 words
Files
1
Skills in repo
69
Repo updated
First seen
Licence
MIT

At a glance

Analyzes API documentation from OpenAPI specs to provide TypeScript interfaces, request/response formats, and implementation guidance.

  • Works in 6 steps: Fetch API Documentation → Analyze the Specification → Generate TypeScript Interfaces → …
  • Implementing API integrations
  • SKILL.md covers When to use this Skill, Instructions, Output Format and Project Conventions, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

API Spec Analyzer is an agent skill from MadAppGang/claude-code. Analyzes API documentation from OpenAPI specs to provide TypeScript interfaces, request/response formats, and implementation guidance. Use when implementing API integrations, debugging API errors (400, 401, 404), replacing mock APIs, verifying data types, or when user mentions endpoints, API calls, or backend integration.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering OpenAPI specifications, Technical documentation and Third-party API integration. It works with TypeScript. The repository describes itself as: claude code plugins marketplace. The licence is MIT.

When your agent uses it

  • Implementing API integrations
  • Debugging API errors (400
  • Replacing mock APIs
  • Verifying data types

Example prompts

  • “Use the api-spec-analyzer skill to analyz API documentation from OpenAPI specs to provide TypeScript interfaces, request/response formats, and…”
  • “/api-spec-analyzer”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Fetch API Documentation
  2. Analyze the Specification
  3. Generate TypeScript Interfaces
  4. Provide Implementation Guidance
  5. Document Security and Validation
  6. Provide Test Recommendations

What it can do on your machine

Read from SKILL.md and the folder at commit 6097ad4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Spec Analyzer loads about 2.7k tokens when it runs. Until then it costs about 85 tokens; SKILL.md has 447 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~85
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MadAppGang/claude-code at commit 6097ad4, republished under its MIT licence (© MadAppGang). 447 words, ~2,711 tokens.

Download SKILL.mdSave it as .claude/skills/api-spec-analyzer/SKILL.md (or your agent's skills folder).
name
api-spec-analyzer
description
Analyzes API documentation from OpenAPI specs to provide TypeScript interfaces, request/response formats, and implementation guidance. Use when implementing API integrations, debugging API errors (400, 401, 404), replacing mock APIs, verifying data types, or when user mentions endpoints, API calls, or backend integration.

API Specification Analyzer

This Skill analyzes OpenAPI specifications to provide accurate API documentation, TypeScript interfaces, and implementation guidance for the caremaster-tenant-frontend project.

When to use this Skill

Claude should invoke this Skill when:

  • User is implementing a new API integration
  • User encounters API errors (400 Bad Request, 401 Unauthorized, 404 Not Found, etc.)
  • User wants to replace mock API with real backend
  • User asks about data types, required fields, or API formats
  • User mentions endpoints like "/api/users" or "/api/tenants"
  • Before implementing any feature that requires API calls
  • When debugging type mismatches between frontend and backend

Instructions

Step 1: Fetch API Documentation

Use the MCP server tools to get the OpenAPI specification:

mcp__Tenant_Management_Portal_API__read_project_oas_f4bjy4

If user requests fresh data or if documentation seems outdated:

mcp__Tenant_Management_Portal_API__refresh_project_oas_f4bjy4

For referenced schemas (when $ref is used):

mcp__Tenant_Management_Portal_API__read_project_oas_ref_resources_f4bjy4
Step 2: Analyze the Specification

Extract the following information for each relevant endpoint:

  1. HTTP Method and Path: GET /api/users, POST /api/tenants, etc.
  2. Authentication: Bearer token, API key, etc.
  3. Request Parameters:
    • Path parameters (e.g., :id)
    • Query parameters (e.g., ?page=1&limit=10)
    • Request body schema
    • Required headers
  4. Response Specification:
    • Success response structure (200, 201, etc.)
    • Error response formats (400, 401, 404, 500)
    • Status codes and their meanings
  5. Data Types:
    • Exact types (string, number, boolean, array, object)
    • Format specifications (ISO 8601, UUID, email)
    • Required vs optional fields
    • Enum values and constraints
    • Default values
Step 3: Generate TypeScript Interfaces

Create ready-to-use TypeScript interfaces that match the API specification exactly:

typescript
/**
 * User creation input
 * Required fields: email, name, role
 */
export interface UserCreateInput {
	/** User's email address - must be unique */
	email: string
	/** Full name of the user (2-100 characters) */
	name: string
	/** User role - determines access permissions */
	role: "admin" | "manager" | "user"
	/** Account status - defaults to "active" */
	status?: "active" | "inactive"
}

/**
 * User entity returned from API
 */
export interface User {
	/** Unique identifier (UUID format) */
	id: string
	email: string
	name: string
	role: "admin" | "manager" | "user"
	status: "active" | "inactive"
	/** ISO 8601 timestamp */
	createdAt: string
	/** ISO 8601 timestamp */
	updatedAt: string
}
Step 4: Provide Implementation Guidance
API Service Pattern
typescript
// src/api/userApi.ts
export async function createUser(input: UserCreateInput): Promise<User> {
	const response = await fetch("/api/users", {
		method: "POST",
		headers: {
			"Content-Type": "application/json",
			"Authorization": `Bearer ${getToken()}`,
		},
		body: JSON.stringify(input),
	})

	if (!response.ok) {
		const error = await response.json()
		throw new Error(error.message)
	}

	return response.json()
}
TanStack Query Hook Pattern
typescript
// src/hooks/useCreateUser.ts
import { useMutation, useQueryClient } from "@tanstack/react-query"
import { createUser } from "@/api/userApi"
import { userKeys } from "@/lib/queryKeys"
import { toast } from "sonner"

export function useCreateUser() {
	const queryClient = useQueryClient()

	return useMutation({
		mutationFn: createUser,
		onSuccess: (newUser) => {
			// Invalidate queries to refetch updated data
			queryClient.invalidateQueries({ queryKey: userKeys.all() })
			toast.success("User created successfully")
		},
		onError: (error) => {
			toast.error(`Failed to create user: ${error.message}`)
		},
	})
}
Query Key Pattern
typescript
// src/lib/queryKeys.ts
export const userKeys = {
	all: () => ["users"] as const,
	lists: () => [...userKeys.all(), "list"] as const,
	list: (filters: UserFilters) => [...userKeys.lists(), filters] as const,
	details: () => [...userKeys.all(), "detail"] as const,
	detail: (id: string) => [...userKeys.details(), id] as const,
}
Show full SKILL.md (196 more words)Show less
Step 5: Document Security and Validation
  • OWASP Considerations: SQL injection, XSS, CSRF protection
  • Input Validation: Required field validation, format validation
  • Authentication: Token handling, refresh logic
  • Error Handling: Proper HTTP status code handling
  • Rate Limiting: Retry logic, exponential backoff
Step 6: Provide Test Recommendations
typescript
// Example test cases based on API spec
describe("createUser", () => {
	it("should create user with valid data", async () => {
		// Test success case
	})

	it("should reject duplicate email", async () => {
		// Test 409 Conflict
	})

	it("should validate email format", async () => {
		// Test 400 Bad Request
	})

	it("should require authentication", async () => {
		// Test 401 Unauthorized
	})
})

Output Format

Provide analysis in this structure:

markdown
# API Analysis: [Endpoint Name]

## Endpoint Summary
- **Method**: POST
- **Path**: /api/users
- **Authentication**: Bearer token required

## Request Specification

### Path Parameters
None

### Query Parameters
None

### Request Body
[TypeScript interface]

### Required Headers
- Content-Type: application/json
- Authorization: Bearer {token}

## Response Specification

### Success Response (201)
[TypeScript interface]

### Error Responses
- 400: Validation error (duplicate email, invalid format)
- 401: Unauthorized (missing/invalid token)
- 403: Forbidden (insufficient permissions)
- 500: Server error

## Data Type Details
- **email**: string, required, must be valid email format, unique
- **name**: string, required, 2-100 characters
- **role**: enum ["admin", "manager", "user"], required
- **status**: enum ["active", "inactive"], optional, defaults to "active"

## TypeScript Interfaces
[Complete interfaces with JSDoc comments]

## Implementation Guide
[API service + TanStack Query hook examples]

## Security Notes
- Validate email format on client and server
- Hash passwords if handling credentials
- Use HTTPS for all requests
- Store tokens securely (httpOnly cookies recommended)

## Integration Checklist
- [ ] Add types to src/types/
- [ ] Create API service in src/api/
- [ ] Add query keys to src/lib/queryKeys.ts
- [ ] Create hooks in src/hooks/
- [ ] Add error handling with toast notifications
- [ ] Test with Vitest

Project Conventions

Path Aliases

Always use @/ path alias:

typescript
import { User } from "@/types/user"
import { createUser } from "@/api/userApi"
Code Style (Biome)
  • Tabs for indentation
  • Double quotes
  • Semicolons optional (only when needed)
  • Line width: 100 characters
File Organization
src/
├── types/           # Domain types
│   └── user.ts
├── api/             # API service functions
│   └── userApi.ts
├── hooks/           # TanStack Query hooks
│   └── useUsers.ts
└── lib/
    └── queryKeys.ts # Query key factories

Common Patterns

Optimistic Updates
typescript
onMutate: async (newUser) => {
	// Cancel outgoing queries
	await queryClient.cancelQueries({ queryKey: userKeys.lists() })

	// Snapshot previous value
	const previous = queryClient.getQueryData(userKeys.lists())

	// Optimistically update cache
	queryClient.setQueryData(userKeys.lists(), (old) => [...old, newUser])

	return { previous }
},
onError: (err, newUser, context) => {
	// Rollback on error
	queryClient.setQueryData(userKeys.lists(), context.previous)
},
Pagination
typescript
export const userKeys = {
	list: (page: number, limit: number) =>
		[...userKeys.lists(), { page, limit }] as const,
}
Search and Filters
typescript
export interface UserFilters {
	search?: string
	role?: UserRole
	status?: UserStatus
	sortBy?: "name" | "email" | "createdAt"
	sortOrder?: "asc" | "desc"
}

export const userKeys = {
	list: (filters: UserFilters) => [...userKeys.lists(), filters] as const,
}

Error Handling Patterns

API Service
typescript
if (!response.ok) {
	const error = await response.json()
	throw new ApiError(error.message, response.status, error.details)
}
Custom Hook
typescript
onError: (error: ApiError) => {
	if (error.status === 409) {
		toast.error("Email already exists")
	} else if (error.status === 400) {
		toast.error("Invalid data: " + error.details)
	} else {
		toast.error("An error occurred. Please try again.")
	}
}

Quality Checklist

Before providing analysis, ensure:

  • ✅ Fetched latest OpenAPI specification
  • ✅ Extracted all required/optional fields
  • ✅ Documented all possible status codes
  • ✅ Created complete TypeScript interfaces
  • ✅ Provided working code examples
  • ✅ Noted security considerations
  • ✅ Aligned with project conventions
  • ✅ Included error handling patterns

Examples

Example 1: User asks to implement user creation
User: "I need to implement user creation"

Claude: [Invokes api-spec-analyzer Skill]
1. Fetches OpenAPI spec for POST /api/users
2. Extracts request/response schemas
3. Generates TypeScript interfaces
4. Provides API service implementation
5. Shows TanStack Query hook example
6. Lists validation requirements
Example 2: User gets 400 error
User: "I'm getting a 400 error when creating a tenant"

Claude: [Invokes api-spec-analyzer Skill]
1. Fetches POST /api/tenants specification
2. Identifies required fields and formats
3. Compares user's implementation with spec
4. Points out data type mismatches
5. Provides corrected implementation
Example 3: Replacing mock API
User: "Replace mockUserApi with real backend"

Claude: [Invokes api-spec-analyzer Skill]
1. Fetches all /api/users/* endpoints
2. Generates interfaces for all CRUD operations
3. Shows how to implement each API function
4. Maintains same interface as mock API
5. Provides migration checklist

Notes

  • Always fetch fresh documentation when user reports API issues
  • Quote directly from OpenAPI spec when documenting requirements
  • Flag ambiguities or missing information in documentation
  • Prioritize type safety - use strict TypeScript types
  • Follow existing patterns in the codebase
  • Consider OWASP security guidelines
  • Provide actionable, copy-paste-ready code

© MadAppGang, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/frontend/skills/api-spec-analyzer of MadAppGang/claude-code.

Open the folder on GitHubat commit 6097ad4

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in MadAppGang/claude-code, which our catalogue first saw on October 7, 2026.

Compare with similar skills

API Spec Analyzer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Spec Analyzer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Spec Analyzer this skillMadAppGang/claude-code2841 repos~2.7kAutomated safety check: PassMIT
Api2clialexknowshtml/api2cli455—~2.9kAutomated safety check: PassMIT
Code Documenterzebbern/claude-code-guide4.7k—~1kAutomated safety check: PassMIT
Code DocumenterJeffallan/claude-skills12k—~1.5kAutomated safety check: PassMIT
E2a Integratetokencanopy/e2a192—~840Automated safety check: PassApache-2.0
Implementing API Patternsancoleman/ai-design-components5261 repos~3kAutomated safety check: PassMIT

Similar skills

  • Api2cli

    alexknowshtml/api2cli

    Generate a working CLI from any API, then wrap it in a Claude Code skill.

    455 GitHub stars~2.9k tokensUpdated 7 mo ago
    Backend & APIsAuto-check passed
  • Code Documenter

    zebbern/claude-code-guide

    A skill your agent uses when adding docstrings, creating API documentation, or building documentation sites.

    4.7k GitHub stars~1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Code Documenter

    Jeffallan/claude-skills

    Generates and validates docstrings, OpenAPI specs, JSDoc annotations and user guides, running every code example through a real compiler or linter before reporting coverage.

    12k GitHub stars~1.5k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • E2a Integrate

    tokencanopy/e2a

    A skill your agent uses when adding e2a email capabilities to an application or codebase: outbound sending, inbound signed webhooks, REST polling, or SDK integration.

    192 GitHub stars~840 tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Implementing API Patterns

    ancoleman/ai-design-components

    API design and implementation across REST, GraphQL, gRPC, and tRPC patterns.

    526 GitHub starsUsed in 1 repo~3k tokens
    Backend & APIsAuto-check passed
  • Windsurf API Development

    jeremylongshore/tons-of-skills-marketplace

    Generate API clients and documentation with Cascade. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~501 tokensUpdated today
    Backend & APIsAuto-check passed

More from MadAppGang/claude-code

All 69 skills in this repo
  • Content Brief

    MadAppGang/claude-code

    Content brief template and creation methodology for SEO-optimized content.

    284 GitHub starsUsed in 1 repo~959 tokens
    Auto-check passed
  • Context Detection

    MadAppGang/claude-code

    A skill your agent uses when detecting project technology stack from files/configs/directory structure, auto-loading framework-specific skills, or analyzing multi-stack fullstack projects (e.g…

    284 GitHub stars~5.4k tokensUpdated 6 mo ago
    Auto-check passed
  • Content Optimizer

    MadAppGang/claude-code

    On-page SEO optimization techniques including keyword density, meta tags, heading structure, and readability.

    284 GitHub starsUsed in 1 repo~694 tokens
    Auto-check passed
  • Keyword Cluster Builder

    MadAppGang/claude-code

    Techniques for expanding seed keywords and clustering by topic and intent.

    284 GitHub starsUsed in 1 repo~674 tokens
    Auto-check passed
  • Serp Analysis

    MadAppGang/claude-code

    SERP analysis techniques for intent classification, feature identification, and competitive intelligence.

    284 GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Technical Audit

    MadAppGang/claude-code

    Technical SEO audit methodology including crawlability, indexability, and Core Web Vitals analysis.

    284 GitHub starsUsed in 1 repo~909 tokens
    Auto-check passed

Works with

Questions about API Spec Analyzer

What does API Spec Analyzer do?

Analyzes API documentation from OpenAPI specs to provide TypeScript interfaces, request/response formats, and implementation guidance. API Spec Analyzer is an agent skill from MadAppGang/claude-code. Analyzes API documentation from OpenAPI specs to provide TypeScript interfaces, request/response formats, and implementation guidance.

When should I use API Spec Analyzer?

API Spec Analyzer fits situations like: implementing API integrations; debugging API errors (400; replacing mock APIs; verifying data types.

How do I install API Spec Analyzer in Claude Code?

Run `npx skills add MadAppGang/claude-code --skill api-spec-analyzer -a claude-code`. Or copy the skill folder (plugins/frontend/skills/api-spec-analyzer in MadAppGang/claude-code) into .claude/skills/api-spec-analyzer in your project. Claude Code loads it when a task matches its description.

How do I install API Spec Analyzer in Codex?

Run `npx skills add MadAppGang/claude-code --skill api-spec-analyzer -a codex`. Or copy the skill folder (plugins/frontend/skills/api-spec-analyzer in MadAppGang/claude-code) into .agents/skills/api-spec-analyzer in your project. Codex loads it when a task matches its description.

Can I use API Spec Analyzer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MadAppGang/claude-code --skill api-spec-analyzer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-spec-analyzer, .gemini/skills/api-spec-analyzer, .github/skills/api-spec-analyzer and .opencode/skills/api-spec-analyzer in your project.

What does API Spec Analyzer need to run?

SKILL.md names no scripts, command-line tools or credentials: API Spec Analyzer is instructions for the agent only.

Does API Spec Analyzer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Spec Analyzer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Spec Analyzer use?

API Spec Analyzer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Spec Analyzer use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Spec Analyzer?

Skills that share tags, products or a category with API Spec Analyzer: Api2cli (alexknowshtml/api2cli, 455 stars), Code Documenter (zebbern/claude-code-guide, 4.7k stars), Code Documenter (Jeffallan/claude-skills, 12k stars) and E2a Integrate (tokencanopy/e2a, 192 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Spec Analyzer?

MadAppGang (a GitHub organization) maintains it in MadAppGang/claude-code, which has 284 GitHub stars. The repository holds 69 skills in this directory. The repository was last updated on March 15, 2026.

Source: MadAppGang/claude-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.