Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计异常

reverse-engineering-apireverse engineering API 搜索

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

3,065

周安装

124

GitHub Stars

655

下载量

962
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:reverse-engineering-api(reverse engineering API 搜索)
来源仓库:https://github.com/kalil0321/reverse-api-engineer
仓库路径:skills/reverse-engineering-api
安装命令:
npx skills add https://github.com/kalil0321/reverse-api-engineer --skill reverse-engineering-api
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/kalil0321/reverse-api-engineer --skill reverse-engineering-api

简介

reverse-engineering-api 用于辅助 API 设计、接口文档生成和集成说明,适合在 Codex、Claude、Cursor、Gemini CLI 中梳理服务契约。

  • 支持 endpoint 归纳、OpenAPI 草稿生成及字段命名规范检查。
  • 结合现有代码或接口样例提取事实,避免凭空补全缺失参数或响应结构。
  • 涉及鉴权、分页和错误码时应以实际业务逻辑为准,防止引入错误假设。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Reverse Engineering API Skill

This skill enables you to reverse engineer web APIs by:

  1. Controlling a browser with HAR recording enabled
  2. Analyzing captured network traffic
  3. Generating production-ready Python API clients

Prerequisites

  • Playwright MCP: You must have access to Playwright MCP tools for browser control
  • HAR Recording: The browser must be configured to record HAR files
  • Python: For running analysis scripts and generated clients

Workflow Overview

[User Task] -> [Browser Capture] -> [HAR Analysis] -> [API Client Generation] -> [Testing & Refinement]

Phase 0: Preparation (Using HAR Helper Scripts)

Available Helper Scripts

This skill provides Python utilities for HAR analysis located at:

Script Directory: plugins/reverse-api-engineer/skills/reverse-engineering-api/scripts/

Available Scripts:

  • har_filter.py - Filter HAR files to API endpoints only
  • har_analyze.py - Extract structured endpoint information
  • har_validate.py - Validate generated code against HAR analysis
  • har_utils.py - Shared utility functions

Script Usage Pattern

Use these scripts in sequence for optimal code generation:

# 1. Filter HAR to remove noise (static assets, analytics, CDN)
python {SKILL_DIR}/scripts/har_filter.py {har_path} --output filtered.har --stats

# 2. Analyze endpoints and extract patterns
python {SKILL_DIR}/scripts/har_analyze.py filtered.har --output analysis.json

# 3. Read analysis for code generation guidance
cat analysis.json

# 4. Generate API client code based on analysis

# 5. Validate generated code
python {SKILL_DIR}/scripts/har_validate.py api_client.py analysis.json

Why Use These Scripts?

har_filter.py benefits:

  • Reduces HAR file size by 80-90% (removes noise)
  • Focuses analysis on actual API calls
  • Significantly improves code generation quality
  • Outputs statistics showing what was filtered

har_analyze.py benefits:

  • Provides structured endpoint information
  • Detects authentication patterns automatically
  • Identifies pagination mechanisms
  • Extracts request/response schemas
  • Groups endpoints by pattern

har_validate.py benefits:

  • Ensures all endpoints are implemented
  • Validates authentication handling
  • Checks for proper error handling
  • Calculates coverage score (must be >= 90)
  • Identifies missing features

Task Tracking

Use TodoWrite to track workflow progress:

  • Mark tasks as pending, in_progress, or completed
  • Only ONE task should be in_progress at a time
  • Complete ALL tasks - never stop early

Example TodoWrite usage:

TodoWrite([
  {"content": "Filter HAR using har_filter.py", "status": "in_progress", "activeForm": "Filtering HAR"},
  {"content": "Analyze HAR using har_analyze.py", "status": "pending", "activeForm": "Analyzing endpoints"},
  {"content": "Generate API client", "status": "pending", "activeForm": "Generating code"},
  {"content": "Validate using har_validate.py", "status": "pending", "activeForm": "Validating code"},
  {"content": "Test implementation", "status": "pending", "activeForm": "Testing API client"}
])

CRITICAL: Task tracking ensures complete workflow execution. Never skip tasks or stop early.

Phase 1: Browser Capture with HAR Recording

Starting the Browser

When starting a browser session for API capture:

  1. Launch browser with HAR recording enabled via Playwright MCP
  2. Generate a unique run ID: {run_id}
  3. Configure HAR output path: ~/.reverse-api/runs/har/{run_id}/recording.har

During Capture

Navigate autonomously to trigger the API calls needed:

  • Login flows (capture authentication)
  • Data fetching (capture GET endpoints)
  • Form submissions (capture POST/PUT endpoints)
  • Pagination (capture query parameter patterns)

On Browser Close

When the browser closes, note the HAR file location:

HAR file saved to: ~/.reverse-api/runs/har/{run_id}/recording.har

Phase 2: HAR Analysis

Reading the HAR File

HAR files are JSON with this structure:

{
  "log": {
    "entries": [
      {
        "request": {
          "method": "GET|POST|PUT|DELETE",
          "url": "https://api.example.com/endpoint",
          "headers": [...],
          "postData": {...}
        },
        "response": {
          "status": 200,
          "headers": [...],
          "content": {...}
        }
      }
    ]
  }
}

Filtering Relevant Entries

Filter out noise by excluding:

  • Static assets: .js, .css, .png, .jpg, .svg, .woff, .ico
  • Analytics: google-analytics, segment, mixpanel, hotjar
  • Ads: doubleclick, adsense, facebook.com/tr
  • CDN resources: cloudflare, cdn., static.

Focus on:

  • API endpoints: /api/, /v1/, /v2/, /graphql
  • XHR/Fetch requests with JSON responses
  • Requests with authentication headers

Extracting Patterns

For each relevant endpoint, extract:

  1. URL Pattern: Base URL, path, query parameters
  2. Method: GET, POST, PUT, DELETE, PATCH
  3. Headers:

- Required headers (Authorization, Content-Type, custom headers) - Optional headers (User-Agent, Accept)

  1. Request Body: JSON schema, form data structure
  2. Response Schema: JSON structure, status codes
  3. Authentication: See references/AUTH_PATTERNS.md

Phase 3: API Client Generation

Code Structure

Generate a Python module with:

{output_dir}/
  api_client.py    # Main API client class
  README.md        # Usage documentation

api_client.py Template

"""
Auto-generated API client for {domain}
Generated from HAR capture on {date}
"""

import requests
from typing import Optional, Dict, Any, List
import logging

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

class {ClassName}Client:
    """API client for {domain}."""

    def __init__(
        self,
        base_url: str = "{base_url}",
        session: Optional[requests.Session] = None,
    ):
        self.base_url = base_url.rstrip("/")
        self.session = session or requests.Session()
        self._setup_session()

    def _setup_session(self):
        """Configure session with default headers."""
        self.session.headers.update({
            "User-Agent": "Mozilla/5.0 (compatible)",
            "Accept": "application/json",
            # Add other required headers
        })

    def _request(
        self,
        method: str,
        endpoint: str,
        **kwargs,
    ) -> requests.Response:
        """Make an HTTP request with error handling."""
        url = f"{self.base_url}{endpoint}"
        try:
            response = self.session.request(method, url, **kwargs)
            response.raise_for_status()
            return response
        except requests.exceptions.RequestException as e:
            logger.error(f"Request failed: {e}")
            raise

    # Generated endpoint methods go here
    def get_example(self, param: str) -> Dict[str, Any]:
        """
        Fetch example data.

        Args:
            param: Description of parameter

        Returns:
            JSON response data
        """
        response = self._request("GET", f"/api/example/{param}")
        return response.json()

# Example usage
if __name__ == "__main__":
    client = {ClassName}Client()
    # Example calls

Code Quality Requirements

All generated code must include:

  1. Type hints for all parameters and return values
  2. Docstrings for all public methods
  3. Error handling with try-except blocks
  4. Logging for debugging
  5. Session management for connection reuse
  6. Authentication handling based on detected patterns

Phase 4: Testing & Refinement

Testing the Generated Client

After generating the client:

  1. Run the example usage section
  2. Verify responses match expected structure
  3. Handle any errors encountered

Iteration Protocol

You have up to 5 attempts to fix issues:

Attempt 1: Initial implementation
  - What was tried
  - What failed (if anything)
  - What was changed

Attempt 2: Refinement
  ...

Common Issues

IssueSolution
403 ForbiddenAdd missing headers, check authentication
Bot detectionSwitch to Playwright with stealth mode
Rate limitingAdd delays, respect Retry-After headers
Session expiryImplement token refresh logic
CORS errorsUse server-side requests (not applicable to Python)

Domain Discovery (Optional)

Before capture, you may want to map the domain to understand its structure.

Using the Mapper Script

Run scripts/mapper.py to quickly discover:

  • All pages on the domain or subdomains
  • Subdomains

It is useful for generalizing your scripts on multitenants websites.

For example, for Ashby ATS or Workday it's useful to find other companies using this ATS when trying to generalize your script.

python scripts/mapper.py https://example.com

Using the Sitemap Parser

Run scripts/sitemap.py to extract URLs from sitemaps:

python scripts/sitemap.py https://example.com

Output Locations

  • HAR files: ~/.reverse-api/runs/har/{run_id}/
  • Generated scripts: ./{task_name}

Example Session

User: "Create an API client for the Apple Jobs website"

1. [Browser Capture]
   Launch browser with HAR recording
   Navigate to jobs.apple.com
   Perform search, browse listings
   Close browser
   HAR saved to: ~/.reverse-api/runs/har/{run_id}/recording.har

   Note: you can monitor browser requests with the Playwright MCP

2. [HAR Analysis]
   Found endpoints:
   - GET /api/role/search?query=...
   - GET /api/role/{id}
   Authentication: None required (public API)

3. [Generate Client]
   Create : {task_name}/api_client.py

4. [Test]
   Ran example usage - Success!

5. [Summary]
   Generated Apple Jobs API client with:
   - search_roles(query, location, page)
   - get_role(role_id)
   Files: ./{task_name}/

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Gemini CLI

29.93%
按下载量换算288

Antigravity

23.09%
按下载量换算222

OpenCode

16.13%
按下载量换算155

Cursor

12.96%
按下载量换算125

Claude Code

8.85%
按下载量换算85

windsurf

3.29%
按下载量换算32

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills