airbnb-cli
Searches Airbnb from the terminal via cli-web-airbnb — find stays by location, dates, and filters; get listing details, guest reviews, and availability…
Analyzes captured HTTP traffic, designs the CLI architecture, and implements the Python CLI package (Phase 2): parse raw-traffic.json, identify the protocol, write api-spec.json, scaffold from templates, and implement endpoint methods and Click command groups. Use after a
$ npx -y skills add ItamarZand88/CLI-Anything-WEB --skill methodology --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/methodologyContext preview
The summary Claude sees to decide when to auto-load this skill.
Analyzes captured HTTP traffic, designs the CLI architecture, and implements the Python CLI package (Phase 2): parse raw-traffic.json, identify the protocol, write api-spec.json, scaffold from templates, and implement endpoint methods and Click command groups. Use after a
name: methodology version: 0.3.0 description: > Analyzes captured HTTP traffic, designs the CLI architecture, and implements the Python CLI package (Phase 2): parse raw-traffic.json, identify the protocol, write api-spec.json, scaffold from templates, and implement endpoint methods and Click command groups. Use after a capture completes and raw-traffic.json exists. when_to_use: > Trigger phrases: "analyze traffic", "design CLI", "implement CLI", "build CLI from network traffic", "generate API wrapper", "reverse engineer web API", "start Phase 2", or after the capture skill finishes. Not for traffic recording (capture), test writing (testing), or quality checks (standards).
Analyze captured traffic, design the CLI command structure, and implement the complete Python CLI package. This skill owns the core transformation from raw HTTP traffic to a production-ready CLI.
Copy this checklist and check off items as you complete them:
Phase 2 Progress:
- [ ] Prerequisites: raw-traffic.json exists (+ auth state if the site needs auth)
- [ ] Step A: traffic analyzed, protocol identified, <APP>.md written
- [ ] Step A: api-spec.json written (every endpoint cites raw-traffic.json evidence)
and passes `cli-web-devkit spec validate`
- [ ] Step B.0: scaffolded via scaffold-cli.py (.manifest.json present)
- [ ] Step B: client endpoint methods implemented from the spec
- [ ] Step B: command modules implemented + registered, REPL help in sync
- [ ] Smoke check passed (no protocol leaks), phase-state marked complete---
Do NOT start unless:
If raw-traffic.json is missing or has no WRITE operations, invoke the `capture` skill first. If Phase 1 state shows `failed`, follow `skills/shared/RECOVERY.md` §phase-state Check Failures before re-running.
**Exception for read-only sites:** If the site is genuinely read-only (search engine, dashboard, analytics viewer with no create/update/delete), the trace may contain only GET requests. In this case, note "read-only site — no write operations" in `<APP>.md` and proceed. The generated CLI will have read-only commands (list, get, search) but no create/update/delete commands. This is valid.
**No-auth sites:** If the target site requires no authentication (public API, no login needed), the "Auth state captured" prerequisite does not apply. Note "no-auth site" in `<APP>.md` and proceed.
---
**Goal:** Map raw traffic to a structured API model.
**Process:**
0. **Read `traffic-analysis.json` first** (if it exists alongside `raw-traffic.json`). This file is auto-generated by `parse-trace.py` or `mitmproxy-capture.py` → `analyze-traffic.py` and contains pre-detected protocol type, auth pattern, endpoint grouping, GraphQL operations, batchexecute RPC IDs, and suggested CLI commands. Use it as a starting point — verify its findings and fill in anything marked "unknown" by reading `raw-traffic.json` manually.
**Enhanced analysis (present only when captured via mitmproxy):** `request_sequence` (timeline-ordered requests with auth-flow detection), `session_lifecycle` (cookie inventory, auth-cookie identification, session pattern), and `endpoint_sizes` (response-size classification). If these are missing (`has_timestamps: false`), the capture came from the default trace path — rely on manual analysis for sequence/session detail.
If `traffic-analysis.json` doesn't exist, run the analyzer:
python ${CLAUDE_PLUGIN_ROOT}/scripts/analyze-traffic.py \
<app>/traffic-capture/raw-traffic.json --summary1. Parse `raw-traffic.json` (for details the analyzer couldn't extract) 2. Group requests by base path (e.g., `/api/v1/boards/`, `/api/v1/items/`) 3. For each endpoint group, identify:
4. **Identify RPC protocol type** -- classify the API transport:
| Protocol | Detection Signal | Client Pattern | |----------|-----------------|----------------| | REST | Resource URLs (`/api/v1/boards/:id`), standard HTTP methods | `client.py` with method-per-endpoint | | GraphQL | Single `/graphql` endpoint, `query`/`mutation` in body | `client.py` with query templates | | gRPC-Web | `application/grpc-web` content type, binary payloads | Proto-based client | | Google batchexecute | `batchexecute` in URL, `f.req=` body, `)]}'\n` prefix | `rpc/` subpackage (see `references/google-batchexecute.md`) | | Custom RPC | Single endpoint, method name in body, proprietary encoding | Custom codec module | | Public REST API | Documented `/api/` endpoints, OpenAPI spec, JSON responses | Standard `client.py` with httpx | | Plain HTML (no framework) | No SPA root, no framework globals, data in `<table>`/`<div>` | `client.py` with httpx + BeautifulSoup4 |
This determines client architecture in Step B -- REST uses simple `client.py`, non-REST protocols need a dedicated `rpc/` subpackage with encoder/decoder/types.
5. Detect data model:
6. Detect auth pattern:
not in HTTP headers. Requires CDP for initial cookies, HTTP for token e
Claude Code plugin that generates production-grade Python CLIs for any web app. 20 CLIs and counting.
Repo: ItamarZand88/CLI-Anything-WEB
Searches Airbnb from the terminal via cli-web-airbnb — find stays by location, dates, and filters; get listing details, guest reviews, and availability…
Searches Amazon from the terminal via cli-web-amazon — product search, product details by ASIN, Best Sellers by category, and autocomplete suggestions. Use…
Searches Booking.com from the terminal via cli-web-booking — find hotels, apartments, and hostels by destination, dates, and guests; get property details by…
Queries US congressional stock trades (STOCK Act disclosures) on capitoltrades.com via the cli-web-capitoltrades command-line tool — trades with rich filters,…
Drives ChatGPT from the terminal via cli-web-chatgpt — ask questions, generate and download images, list and view conversations, browse models, and manage…
Browses Google Code Wiki (codewiki.google) via cli-web-codewiki — AI-generated documentation for open source repos. Search repositories, read wiki sections,…