api-pattern-extractor
API 模式提取工具。从捕获的流量中自动提取 API 模式、参数规范、认证方式、数据结构,生成 OpenAPI 规范和可复用代码。
npx skills add majiayu000/claude-skill-registry --skill api-pattern-extractor --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# API Pattern Extractor 从网站流量中自动提取 API 模式: - **Endpoint 发现** - 识别所有 API 端点 - **参数推断** - 分析请求参数和响应结构 - **认证模式** - 识别认证方式(Cookie、Token、API Key) - **依赖分析** - 发现 API 之间的数据依赖关系 - **OpenAPI 生成** - 自动生成 API 规范 ## 核心功能 ### 1. 从 Neo 捕获中提取 ```bash # 使用 neo 捕获数据 neo capture list target-site.com --json > captures.json # 提取 API 模式 python ~/skills/api-pattern-extractor/tools/extract-patterns.py \ --captures captures.json \ --output patterns.yaml ``` ### 2. 从 HAR 文件提取 ```bash # 导出 HAR neo capture export target-site.com --format har > traffic.har # 提取模式 python ~/skills/api-pattern-extractor/tools/har-to-openapi.py \ --har traffic.har \ --output openapi.yaml ``` ### 3. 实时分析 ```bash # 监控模式 python ~/skills/api-pattern-extractor/tools/live-analyzer.py \ --domain target-site.com \ --watch ``` ## 模式类型 ### Endpoint 模式 ```yaml endpoints: - path: /api/v1/products method: GET parameters: - name: page type: integer default: 1 - name: limit type: integer default: 20 - name: category type: string required: false response: type: object properties: items: type: array items: $ref: "#/components/schemas/Product" total: type: integer page: type: integer ``` ### 认证模式 ```yaml authentication: type: bearer location: he
- 核心功能
- 1. 从 Neo 捕获中提取
- 2. 从 HAR 文件提取
- 3. 实时分析
- 模式类型
- Endpoint 模式
- 认证模式
- 数据流模式
- 命令详解
- extract-patterns
- analyze-dependencies
- generate-openapi
- 使用示例
- 电商网站 API 分析
neo capture list target-site.com --json > captures.json python ~/skills/api-pattern-extractor/tools/extract-patterns.py \ neo capture export target-site.com --format har > traffic.har python ~/skills/api-pattern-extractor/tools/har-to-openapi.py \ python ~/skills/api-pattern-extractor/tools/live-analyzer.py \ python extract-patterns.py [options] python analyze-dependencies.py [options] python generate-openapi.py [options] python ~/skills/api-pattern-extractor/tools/analyze-dependencies.py \ python ~/skills/api-pattern-extractor/tools/generate-openapi.py \
What does the api-pattern-extractor skill do?
API 模式提取工具。从捕获的流量中自动提取 API 模式、参数规范、认证方式、数据结构,生成 OpenAPI 规范和可复用代码。
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-pattern-extractor --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
