api-pattern-extractor

Extract API patterns from captured traffic or HAR files into OpenAPI specifications and structured pattern files.

2|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/Throokie/claude-code-skills --skill api-pattern-extractor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-pattern-extractor
Source: https://github.com/Throokie/claude-code-skills/tree/main/skills/api-pattern-extractor
Command: npx skills add https://github.com/Throokie/claude-code-skills --skill api-pattern-extractor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

从捕获的流量中自动提取 API 模式、参数规范、认证方式和数据结构,并生成可复用的 OpenAPI 规范和代码骨架。

Core Features & Use Cases

  • 自动发现端点并推断请求/响应参数、认证模式以及端点之间的依赖关系。
  • 生成 OpenAPI 规范(yaml/json)和初步的代码骨架,方便快速落地 API 工程。
  • Use Case: 在电商网站分析中,快速从流量捕获中抽取购物流程的 API 模式并输出一个可直接用于文档与实现的模板。

Quick Start

Run the extractor against your captured traffic (captures.json or HAR) to generate a patterns.yaml and an OpenAPI specification.

Frequently Asked Questions about api-pattern-extractor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate OpenAPI specifications from captured traffic?

You can generate OpenAPI specifications from captured traffic by running an extractor against captures.json or HAR files to analyze endpoints, parameters, authentication schemes, and data schemas, outputting a structured patterns.yaml and an OpenAPI file.

Can I extract API patterns from HAR files automatically?

Yes, you can extract API patterns from HAR files automatically. The extractor analyzes HAR captures to infer request and response parameters, authentication modes, and endpoint dependencies, producing reusable API specifications and code skeletons.

Do I need Python to extract API patterns from network traffic?

Yes, you need Python to extract API patterns from network traffic. The extraction process requires Python and minimal external libraries to parse captured traffic and generate the structured patterns file containing endpoints, schemas, and authentication details.

What output formats are supported when converting traffic captures to API documentation?

Supported output formats when converting traffic captures to API documentation include YAML and JSON. The extractor generates an OpenAPI specification in yaml or json format along with a preliminary code skeleton for quick API engineering implementation.

What's the best way to discover endpoint dependencies from API traffic captures?

The best way to discover endpoint dependencies from API traffic captures is using an automated pattern extractor. It analyzes the sequential flow within captures or HAR files to infer relationships between endpoints and outputs them in a structured patterns file.

Are there limitations when inferring authentication schemes from HAR files?

A limitation when inferring authentication schemes from HAR files is that the extractor relies entirely on the data present in the capture. If authentication tokens or headers are missing from the recorded traffic, the generated OpenAPI specification will lack accurate authentication details.