agentleFS
GabrieleDattileGabrieleDattile/agent-superpowers/skills/reverse-engineering/api-synthesizer/SKILL.md

api-synthesizer

Skill1 starsChanged 15 days agoMITView on GitHub

Autonomous API reverse-engineering engine. Converts raw network traffic (cURL commands or HAR files) into fully typed Python/TypeScript client SDKs.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the Synthesizer CLI:

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

🔌 Skill: API Synthesizer (Network to SDK)

1. When to Trigger (Routing)

  • TRIGGER WHEN:
    • The user provides a curl command, network log, or request payload from Chrome/Firefox DevTools.
    • The user says: "create an SDK for this API", "turn this curl into a typed client", or "reverse engineer this endpoint".
  • DO NOT TRIGGER WHEN:
    • An official, maintained SDK already exists and is easily installable via pip/npm.

2. Fundamental Philosophy

"Developers waste hours copying endpoints, headers, and crafting request boilerplate. API Synthesizer automatically parses network traces and emits robust, typed, ready-to-run client libraries in seconds."


3. Operational Protocol

Phase 1: Ingest & Parse

  1. Take the user's raw cURL string or network dump.
  2. Run the Synthesizer CLI:
    python skills/reverse-engineering/api-synthesizer/scripts/synthesizer.py --curl "<curl_string>" --name "OrderClient"

Phase 2: Structural Analysis

The synthesizer:

  1. Extracts HTTP Method (GET, POST, PUT, etc.) and URL path.
  2. Identifies Authentication headers (Authorization: Bearer ..., cookies, API keys) and abstracts them into configurable constructor parameters.
  3. Analyzes JSON payload structures and automatically defines Pydantic / TypedDict schemas for request bodies.

Phase 3: Code Generation & Test

  1. Emits the generated Python client class with async or sync requests/httpx methods.
  2. Emits a mock execution script to verify successful instantiation.

4. Guardrails & Negative Constraints

  • ❌ NEVER hardcode sensitive API keys or bearer tokens in the generated SDK. Always extract them as environment variables or constructor arguments.
  • ❌ NEVER produce untyped **kwargs when payload fields can be statically inferred.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.