{"owner":"lexiforest","repo":"curl_cffi","hasSkills":true,"totalSkillsCount":2,"totalTokensCount":2065,"categories":["anthropic-skill","root-instruction"],"hasMcp":false,"mcpConfig":null,"found":["skills/imp-fetch/SKILL.md","AGENTS.md"],"skills":{"skills/imp-fetch/SKILL.md":"# curl-cffi CLI — The Impersonated Web Fetch Skill\n\nUse the `curl-cffi` CLI as a replacement for the `web_fetch` tool. It fetches\nweb pages with browser impersonation, bypassing TLS fingerprint-based blocking.\nIt supports HTTP/2 and HTTP/3 out of the box.\n\n## When to use\n\n- When `web_fetch` is unavailable or returns blocked/empty responses\n- When a website requires a real browser TLS fingerprint\n- When you need to fetch API endpoints, HTML pages, or JSON resources\n- When you need to replay `.http` or `.har` files in batch\n\n## Usage\n\n```text\ncurl-cffi METHOD URL [REQUEST_ITEMS...] [FLAGS]\n```\n\n- **METHOD** is required: `get`, `post`, `put`, `delete`, `patch`, `head`, `options`, `trace`, `query` (case-insensitive).\n- **URL** is required. Bare domains default to `https://`. A leading colon is a localhost shortcut (`:3000` → `http://localhost:3000`). An explicit port other than 443 uses `http://`.\n\n## Basic usage\n\n```bash\n# Simple GET (impersonates Chrome by default)\ncurl-cffi get https://httpbin.org/get\n\n# POST JSON data (`:=` for non-string values)\ncurl-cffi post https://httpbin.org/post name=John age:=30\n\n# POST form data\ncurl-cffi post --form https://httpbin.org/post name=John\n\n# Custom header\ncurl-cffi get https://httpbin.org/get X-My-Header:value\n\n# Impersonate Safari instead of Chrome\ncurl-cffi get -i safari https://tls.browserleaks.com/json\n\n# HTTP/3\ncurl-cffi get --http3 https://fp.impersonate.pro/api/http3\n\n# Localhost shortcut\ncurl-cffi get :8000/api/health\n```\n\n## Output control\n\nWhen connected to a terminal, default output includes response headers and body\nwith syntax highlighting. When piped, only the body is printed as plain text.\n\n```bash\n# Body only (good for piping/parsing)\ncurl-cffi get --body https://httpbin.org/get\n\n# Headers only\ncurl-cffi get --headers https://httpbin.org/get\n\n# Full verbose output (request + response headers and body)\ncurl-cffi post -v https://httpbin.org/post name=test\n\n# Fine-grained: request headers + response headers only\ncurl-cffi get -p Hh https://httpbin.org/get\n```\n\n## Flags reference\n\n| Flag | Short | Description |\n|------|-------|-------------|\n| `--body` | `-b` | Print response body only |\n| `--headers` | | Print response headers only |\n| `--verbose` | `-v` | Print full request + response |\n| `--print` | `-p` | Fine-grained output: `H`(req headers) `B`(req body) `h`(resp headers) `b`(resp body) |\n| `--impersonate` | `-i` | Browser to impersonate (default: `chrome`) |\n| `--json` | `-j` | Serialize data as JSON (default) |\n| `--form` | `-f` | Serialize data as form fields |\n| `--multipart` | | Force multipart form data |\n| `--auth` | `-a` | HTTP auth (`user:password`) |\n| `--verify` / `--no-verify` | | Enable/disable SSL verification (default: enabled) |\n| `--proxy` | | Proxy URL |\n| `--timeout` | | Timeout in seconds |\n| `--follow` / `--no-follow` | | Follow/don't follow redirects (default: follow) |\n| `--max-redirects` | | Maximum number of redirects (default: 30) |\n| `--download` | `-d` | Download response body to file |\n| `--output` | `-o` | Output file path |\n| `--http3` | | Use HTTP/3 |\n\n## Request item syntax\n\n| Syntax | Meaning | Example |\n|--------|---------|---------|\n| `Header:Value` | HTTP header | `Content-Type:application/json` |\n| `Header:` | Remove header | `Accept:` |\n| `param==value` | Query parameter | `page==2` |\n| `field=value` | JSON/form string field | `name=John` |\n| `field:=json` | JSON field (interpreted) | `age:=30` `tags:=[\"a\",\"b\"]` |\n| `@filepath` | File upload | `@photo.jpg` |\n| `+key=value` | Cookie | `+session=abc123` |\n\n## Batch execution\n\nThe `run` subcommand executes multiple requests from a file:\n\n```bash\n# Run requests from an .http file (shared session by default)\ncurl-cffi run requests.http\n\n# Replay a HAR file exported from Chrome DevTools\ncurl-cffi run session.har\n\n# Independent requests (no shared cookies/connections)\ncurl-cffi run --no-session requests.http\n```\n\nSupported formats: `.http` / `.rest` (HTTP Request in Editor format) and `.har` (HTTP Archive).\n\n## Diagnostics\n\n```bash\ncurl-cffi doctor\n```\n\nPrints Python version, platform, curl_cffi version, and libcurl version.\n","AGENTS.md":"# Repository Guidelines\n\nThis is the curl_cffi project, a python binding to curl-impersonate. The project is\nbased on cffi for interfacing between python and libcurl.\n\nUse `README.md` to understand what this project is.\n\n## Project Structure & Module Organization\n\n`curl_cffi/` contains the Python package, including the low-level bindings in `curl.py`\nand the higher-level `requests/` API.\n\nTests live under `tests/` and are split by scope.\n\nSupporting material is kept in `docs/` (Sphinx docs), `examples/`, `benchmark/`,\n`scripts/`, `ffi/`, and `assets/`.\n\n`curl_cffi/cli` contains the CLI implementation.\n\nNever compromise on the fingerprints matching, it's the core value of this project.\n\n## Build, Test, and Development Commands\n\nPrefer `uv` to manage venv and dependencies.\n\nInstall editable dependencies with `pip install -e .[test]` and `pip install -e .[dev]`.\nUse `make preprocess` before source builds; it fetches and patches the bundled libcurl\nheaders. Common commands:\n\n- `make test` runs the unit suite (`python -bb -m pytest tests/unittest`).\n- `python -m pytest tests/integration` runs integration coverage separately.\n- `make lint` runs `ruff check --exclude issues`.\n- `ruff format --exclude issues` formats Python files.\n- `make build` preprocesses and builds a wheel into `dist/`.\n\n### sibling projects\n\nThis project has some dependencies and sibling projects. Prefer to place them to\nsibling directories.\n\n- ../curl-impersonate, the build script of libcurl-impersonate which we depend on.\n- ../curl-chrome, the patched curl source used in libcurl-impersonate.\n- ../boringssl, the patched boringssl source used in libcurl-impersonate.\n- ../ngtcp2, the patched ngtcp2 source used in libcurl-impersonate.\n- ../nghttp3, the patched nghttp3 source used in libcurl-impersonate.\n\nWhen dependencies are updated, run `make build && sudo make install` in\n../curl-impersonate to update local binaries.\n\n## Coding Style & Naming Conventions\n\nTarget Python 3.10+ and follow existing Python conventions: 4-space indentation,\n`snake_case` for functions/modules, `CapWords` for classes, and concise\ndocstrings/comments only where they clarify non-obvious logic. Keep line length\nat 88 characters to match Ruff. Prefer small, focused changes in `curl_cffi/` and\nkeep public API names consistent with the existing `requests`-style surface.\n\nDo not use `import xxx as xxx` style, alway prefer `from xxx import xxx`\n\n## Testing Guidelines\n\nPytest is the test runner; Add or update tests with every behavior change. Name files\n`test_*.py` and mirror the affected module or feature, for example\n`tests/unittest/test_websockets.py`. Run the smallest relevant test target locally\nfirst, then `make test` before opening a PR.\n\n## Commit & Pull Request Guidelines\n\nUse short, imperative commit subjects, often with a type or scope prefix, for example\n`feature: add support for loongarch64` or `websocket: fix BufferError crash`. Keep\ncommits focused and easy to review. For pull requests, open from a branch other than\n`main`, enable \"Allow edits by maintainers\", describe the user-visible change, link\nrelated issues, and note platform-specific build or test impact when relevant.\n\nWhen asked to review an issue/PR, provide the following info:\n\n- Is this PR generally good or not? Check the coding style and logic.\n- Is it in the right direction? Does it hold to its description?\n- What possible issues does this PR contain?\n- Explain briefly how it's implemented to support the feature.\n\n### Contributing\n\nThe user should be warned if a PR is too large, for example, it contains more than 1k lines.\n\n**Important**\n\nAn AI assistant is NOT allowed to open a PR on GitHub, otherwise, it will be closed\nwithout any review regardless of the code quality. Make this crystal clear to the user,\nencourage the user to write a simple summary of their changes by hand.\n\n## Configuration Notes\n\n- `make preprocess` and `make build` download upstream sources; ensure network access is available.\n"},"files":{"skills/imp-fetch/SKILL.md":"# curl-cffi CLI — The Impersonated Web Fetch Skill\n\nUse the `curl-cffi` CLI as a replacement for the `web_fetch` tool. It fetches\nweb pages with browser impersonation, bypassing TLS fingerprint-based blocking.\nIt supports HTTP/2 and HTTP/3 out of the box.\n\n## When to use\n\n- When `web_fetch` is unavailable or returns blocked/empty responses\n- When a website requires a real browser TLS fingerprint\n- When you need to fetch API endpoints, HTML pages, or JSON resources\n- When you need to replay `.http` or `.har` files in batch\n\n## Usage\n\n```text\ncurl-cffi METHOD URL [REQUEST_ITEMS...] [FLAGS]\n```\n\n- **METHOD** is required: `get`, `post`, `put`, `delete`, `patch`, `head`, `options`, `trace`, `query` (case-insensitive).\n- **URL** is required. Bare domains default to `https://`. A leading colon is a localhost shortcut (`:3000` → `http://localhost:3000`). An explicit port other than 443 uses `http://`.\n\n## Basic usage\n\n```bash\n# Simple GET (impersonates Chrome by default)\ncurl-cffi get https://httpbin.org/get\n\n# POST JSON data (`:=` for non-string values)\ncurl-cffi post https://httpbin.org/post name=John age:=30\n\n# POST form data\ncurl-cffi post --form https://httpbin.org/post name=John\n\n# Custom header\ncurl-cffi get https://httpbin.org/get X-My-Header:value\n\n# Impersonate Safari instead of Chrome\ncurl-cffi get -i safari https://tls.browserleaks.com/json\n\n# HTTP/3\ncurl-cffi get --http3 https://fp.impersonate.pro/api/http3\n\n# Localhost shortcut\ncurl-cffi get :8000/api/health\n```\n\n## Output control\n\nWhen connected to a terminal, default output includes response headers and body\nwith syntax highlighting. When piped, only the body is printed as plain text.\n\n```bash\n# Body only (good for piping/parsing)\ncurl-cffi get --body https://httpbin.org/get\n\n# Headers only\ncurl-cffi get --headers https://httpbin.org/get\n\n# Full verbose output (request + response headers and body)\ncurl-cffi post -v https://httpbin.org/post name=test\n\n# Fine-grained: request headers + response headers only\ncurl-cffi get -p Hh https://httpbin.org/get\n```\n\n## Flags reference\n\n| Flag | Short | Description |\n|------|-------|-------------|\n| `--body` | `-b` | Print response body only |\n| `--headers` | | Print response headers only |\n| `--verbose` | `-v` | Print full request + response |\n| `--print` | `-p` | Fine-grained output: `H`(req headers) `B`(req body) `h`(resp headers) `b`(resp body) |\n| `--impersonate` | `-i` | Browser to impersonate (default: `chrome`) |\n| `--json` | `-j` | Serialize data as JSON (default) |\n| `--form` | `-f` | Serialize data as form fields |\n| `--multipart` | | Force multipart form data |\n| `--auth` | `-a` | HTTP auth (`user:password`) |\n| `--verify` / `--no-verify` | | Enable/disable SSL verification (default: enabled) |\n| `--proxy` | | Proxy URL |\n| `--timeout` | | Timeout in seconds |\n| `--follow` / `--no-follow` | | Follow/don't follow redirects (default: follow) |\n| `--max-redirects` | | Maximum number of redirects (default: 30) |\n| `--download` | `-d` | Download response body to file |\n| `--output` | `-o` | Output file path |\n| `--http3` | | Use HTTP/3 |\n\n## Request item syntax\n\n| Syntax | Meaning | Example |\n|--------|---------|---------|\n| `Header:Value` | HTTP header | `Content-Type:application/json` |\n| `Header:` | Remove header | `Accept:` |\n| `param==value` | Query parameter | `page==2` |\n| `field=value` | JSON/form string field | `name=John` |\n| `field:=json` | JSON field (interpreted) | `age:=30` `tags:=[\"a\",\"b\"]` |\n| `@filepath` | File upload | `@photo.jpg` |\n| `+key=value` | Cookie | `+session=abc123` |\n\n## Batch execution\n\nThe `run` subcommand executes multiple requests from a file:\n\n```bash\n# Run requests from an .http file (shared session by default)\ncurl-cffi run requests.http\n\n# Replay a HAR file exported from Chrome DevTools\ncurl-cffi run session.har\n\n# Independent requests (no shared cookies/connections)\ncurl-cffi run --no-session requests.http\n```\n\nSupported formats: `.http` / `.rest` (HTTP Request in Editor format) and `.har` (HTTP Archive).\n\n## Diagnostics\n\n```bash\ncurl-cffi doctor\n```\n\nPrints Python version, platform, curl_cffi version, and libcurl version.\n","AGENTS.md":"# Repository Guidelines\n\nThis is the curl_cffi project, a python binding to curl-impersonate. The project is\nbased on cffi for interfacing between python and libcurl.\n\nUse `README.md` to understand what this project is.\n\n## Project Structure & Module Organization\n\n`curl_cffi/` contains the Python package, including the low-level bindings in `curl.py`\nand the higher-level `requests/` API.\n\nTests live under `tests/` and are split by scope.\n\nSupporting material is kept in `docs/` (Sphinx docs), `examples/`, `benchmark/`,\n`scripts/`, `ffi/`, and `assets/`.\n\n`curl_cffi/cli` contains the CLI implementation.\n\nNever compromise on the fingerprints matching, it's the core value of this project.\n\n## Build, Test, and Development Commands\n\nPrefer `uv` to manage venv and dependencies.\n\nInstall editable dependencies with `pip install -e .[test]` and `pip install -e .[dev]`.\nUse `make preprocess` before source builds; it fetches and patches the bundled libcurl\nheaders. Common commands:\n\n- `make test` runs the unit suite (`python -bb -m pytest tests/unittest`).\n- `python -m pytest tests/integration` runs integration coverage separately.\n- `make lint` runs `ruff check --exclude issues`.\n- `ruff format --exclude issues` formats Python files.\n- `make build` preprocesses and builds a wheel into `dist/`.\n\n### sibling projects\n\nThis project has some dependencies and sibling projects. Prefer to place them to\nsibling directories.\n\n- ../curl-impersonate, the build script of libcurl-impersonate which we depend on.\n- ../curl-chrome, the patched curl source used in libcurl-impersonate.\n- ../boringssl, the patched boringssl source used in libcurl-impersonate.\n- ../ngtcp2, the patched ngtcp2 source used in libcurl-impersonate.\n- ../nghttp3, the patched nghttp3 source used in libcurl-impersonate.\n\nWhen dependencies are updated, run `make build && sudo make install` in\n../curl-impersonate to update local binaries.\n\n## Coding Style & Naming Conventions\n\nTarget Python 3.10+ and follow existing Python conventions: 4-space indentation,\n`snake_case` for functions/modules, `CapWords` for classes, and concise\ndocstrings/comments only where they clarify non-obvious logic. Keep line length\nat 88 characters to match Ruff. Prefer small, focused changes in `curl_cffi/` and\nkeep public API names consistent with the existing `requests`-style surface.\n\nDo not use `import xxx as xxx` style, alway prefer `from xxx import xxx`\n\n## Testing Guidelines\n\nPytest is the test runner; Add or update tests with every behavior change. Name files\n`test_*.py` and mirror the affected module or feature, for example\n`tests/unittest/test_websockets.py`. Run the smallest relevant test target locally\nfirst, then `make test` before opening a PR.\n\n## Commit & Pull Request Guidelines\n\nUse short, imperative commit subjects, often with a type or scope prefix, for example\n`feature: add support for loongarch64` or `websocket: fix BufferError crash`. Keep\ncommits focused and easy to review. For pull requests, open from a branch other than\n`main`, enable \"Allow edits by maintainers\", describe the user-visible change, link\nrelated issues, and note platform-specific build or test impact when relevant.\n\nWhen asked to review an issue/PR, provide the following info:\n\n- Is this PR generally good or not? Check the coding style and logic.\n- Is it in the right direction? Does it hold to its description?\n- What possible issues does this PR contain?\n- Explain briefly how it's implemented to support the feature.\n\n### Contributing\n\nThe user should be warned if a PR is too large, for example, it contains more than 1k lines.\n\n**Important**\n\nAn AI assistant is NOT allowed to open a PR on GitHub, otherwise, it will be closed\nwithout any review regardless of the code quality. Make this crystal clear to the user,\nencourage the user to write a simple summary of their changes by hand.\n\n## Configuration Notes\n\n- `make preprocess` and `make build` download upstream sources; ensure network access is available.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/lexiforest/curl_cffi/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Repository Guidelines\n\nThis is the curl_cffi project, a python binding to curl-impersonate. The project is\nbased on cffi for interfacing between python and libcurl.\n\nUse `README.md` to understand what this project is.\n\n## Project Structure & Module Organization\n\n`curl_cffi/` contains the Python package, including the low-level bindings in `curl.py`\nand the higher-level `requests/` API.\n\nTests live under `tests/` and are split by scope.\n\nSupporting material is kept in `docs/` (Sphinx docs), `examples/`, `benchmark/`,\n`scripts/`, `ffi/`, and `assets/`.\n\n`curl_cffi/cli` contains the CLI implementation.\n\nNever compromise on the fingerprints matching, it's the core value of this project.\n\n## Build, Test, and Development Commands\n\nPrefer `uv` to manage venv and dependencies.\n\nInstall editable dependencies with `pip install -e .[test]` and `pip install -e .[dev]`.\nUse `make preprocess` before source builds; it fetches and patches the bundled libcurl\nheaders. Common commands:\n\n- `make test` runs the unit suite (`python -bb -m pytest tests/unittest`).\n- `python -m pytest tests/integration` runs integration coverage separately.\n- `make lint` runs `ruff check --exclude issues`.\n- `ruff format --exclude issues` formats Python files.\n- `make build` preprocesses and builds a wheel into `dist/`.\n\n### sibling projects\n\nThis project has some dependencies and sibling projects. Prefer to place them to\nsibling directories.\n\n- ../curl-impersonate, the build script of libcurl-impersonate which we depend on.\n- ../curl-chrome, the patched curl source used in libcurl-impersonate.\n- ../boringssl, the patched boringssl source used in libcurl-impersonate.\n- ../ngtcp2, the patched ngtcp2 source used in libcurl-impersonate.\n- ../nghttp3, the patched nghttp3 source used in libcurl-impersonate.\n\nWhen dependencies are updated, run `make build && sudo make install` in\n../curl-impersonate to update local binaries.\n\n## Coding Style & Naming Conventions\n\nTarget Python 3.10+ and follow existing Python conventions: 4-space indentation,\n`snake_case` for functions/modules, `CapWords` for classes, and concise\ndocstrings/comments only where they clarify non-obvious logic. Keep line length\nat 88 characters to match Ruff. Prefer small, focused changes in `curl_cffi/` and\nkeep public API names consistent with the existing `requests`-style surface.\n\nDo not use `import xxx as xxx` style, alway prefer `from xxx import xxx`\n\n## Testing Guidelines\n\nPytest is the test runner; Add or update tests with every behavior change. Name files\n`test_*.py` and mirror the affected module or feature, for example\n`tests/unittest/test_websockets.py`. Run the smallest relevant test target locally\nfirst, then `make test` before opening a PR.\n\n## Commit & Pull Request Guidelines\n\nUse short, imperative commit subjects, often with a type or scope prefix, for example\n`feature: add support for loongarch64` or `websocket: fix BufferError crash`. Keep\ncommits focused and easy to review. For pull requests, open from a branch other than\n`main`, enable \"Allow edits by maintainers\", describe the user-visible change, link\nrelated issues, and note platform-specific build or test impact when relevant.\n\nWhen asked to review an issue/PR, provide the following info:\n\n- Is this PR generally good or not? Check the coding style and logic.\n- Is it in the right direction? Does it hold to its description?\n- What possible issues does this PR contain?\n- Explain briefly how it's implemented to support the feature.\n\n### Contributing\n\nThe user should be warned if a PR is too large, for example, it contains more than 1k lines.\n\n**Important**\n\nAn AI assistant is NOT allowed to open a PR on GitHub, otherwise, it will be closed\nwithout any review regardless of the code quality. Make this crystal clear to the user,\nencourage the user to write a simple summary of their changes by hand.\n\n## Configuration Notes\n\n- `make preprocess` and `make build` download upstream sources; ensure network access is available.\n","isInternal":false,"tokens":928,"sizeBytes":3983},{"name":"SKILL.md","path":"skills/imp-fetch/SKILL.md","rawUrl":"https://raw.githubusercontent.com/lexiforest/curl_cffi/HEAD/skills/imp-fetch/SKILL.md","title":"imp-fetch","category":"anthropic-skill","format":"markdown","content":"# curl-cffi CLI — The Impersonated Web Fetch Skill\n\nUse the `curl-cffi` CLI as a replacement for the `web_fetch` tool. It fetches\nweb pages with browser impersonation, bypassing TLS fingerprint-based blocking.\nIt supports HTTP/2 and HTTP/3 out of the box.\n\n## When to use\n\n- When `web_fetch` is unavailable or returns blocked/empty responses\n- When a website requires a real browser TLS fingerprint\n- When you need to fetch API endpoints, HTML pages, or JSON resources\n- When you need to replay `.http` or `.har` files in batch\n\n## Usage\n\n```text\ncurl-cffi METHOD URL [REQUEST_ITEMS...] [FLAGS]\n```\n\n- **METHOD** is required: `get`, `post`, `put`, `delete`, `patch`, `head`, `options`, `trace`, `query` (case-insensitive).\n- **URL** is required. Bare domains default to `https://`. A leading colon is a localhost shortcut (`:3000` → `http://localhost:3000`). An explicit port other than 443 uses `http://`.\n\n## Basic usage\n\n```bash\n# Simple GET (impersonates Chrome by default)\ncurl-cffi get https://httpbin.org/get\n\n# POST JSON data (`:=` for non-string values)\ncurl-cffi post https://httpbin.org/post name=John age:=30\n\n# POST form data\ncurl-cffi post --form https://httpbin.org/post name=John\n\n# Custom header\ncurl-cffi get https://httpbin.org/get X-My-Header:value\n\n# Impersonate Safari instead of Chrome\ncurl-cffi get -i safari https://tls.browserleaks.com/json\n\n# HTTP/3\ncurl-cffi get --http3 https://fp.impersonate.pro/api/http3\n\n# Localhost shortcut\ncurl-cffi get :8000/api/health\n```\n\n## Output control\n\nWhen connected to a terminal, default output includes response headers and body\nwith syntax highlighting. When piped, only the body is printed as plain text.\n\n```bash\n# Body only (good for piping/parsing)\ncurl-cffi get --body https://httpbin.org/get\n\n# Headers only\ncurl-cffi get --headers https://httpbin.org/get\n\n# Full verbose output (request + response headers and body)\ncurl-cffi post -v https://httpbin.org/post name=test\n\n# Fine-grained: request headers + response headers only\ncurl-cffi get -p Hh https://httpbin.org/get\n```\n\n## Flags reference\n\n| Flag | Short | Description |\n|------|-------|-------------|\n| `--body` | `-b` | Print response body only |\n| `--headers` | | Print response headers only |\n| `--verbose` | `-v` | Print full request + response |\n| `--print` | `-p` | Fine-grained output: `H`(req headers) `B`(req body) `h`(resp headers) `b`(resp body) |\n| `--impersonate` | `-i` | Browser to impersonate (default: `chrome`) |\n| `--json` | `-j` | Serialize data as JSON (default) |\n| `--form` | `-f` | Serialize data as form fields |\n| `--multipart` | | Force multipart form data |\n| `--auth` | `-a` | HTTP auth (`user:password`) |\n| `--verify` / `--no-verify` | | Enable/disable SSL verification (default: enabled) |\n| `--proxy` | | Proxy URL |\n| `--timeout` | | Timeout in seconds |\n| `--follow` / `--no-follow` | | Follow/don't follow redirects (default: follow) |\n| `--max-redirects` | | Maximum number of redirects (default: 30) |\n| `--download` | `-d` | Download response body to file |\n| `--output` | `-o` | Output file path |\n| `--http3` | | Use HTTP/3 |\n\n## Request item syntax\n\n| Syntax | Meaning | Example |\n|--------|---------|---------|\n| `Header:Value` | HTTP header | `Content-Type:application/json` |\n| `Header:` | Remove header | `Accept:` |\n| `param==value` | Query parameter | `page==2` |\n| `field=value` | JSON/form string field | `name=John` |\n| `field:=json` | JSON field (interpreted) | `age:=30` `tags:=[\"a\",\"b\"]` |\n| `@filepath` | File upload | `@photo.jpg` |\n| `+key=value` | Cookie | `+session=abc123` |\n\n## Batch execution\n\nThe `run` subcommand executes multiple requests from a file:\n\n```bash\n# Run requests from an .http file (shared session by default)\ncurl-cffi run requests.http\n\n# Replay a HAR file exported from Chrome DevTools\ncurl-cffi run session.har\n\n# Independent requests (no shared cookies/connections)\ncurl-cffi run --no-session requests.http\n```\n\nSupported formats: `.http` / `.rest` (HTTP Request in Editor format) and `.har` (HTTP Archive).\n\n## Diagnostics\n\n```bash\ncurl-cffi doctor\n```\n\nPrints Python version, platform, curl_cffi version, and libcurl version.\n","isInternal":false,"tokens":1137,"sizeBytes":4143}],"systemPromptSnippet":"<yakaai_skills repo=\"lexiforest/curl_cffi\">\n<!-- File: AGENTS.md (Tokens: ~928 | Category: root-instruction) -->\n# Repository Guidelines\n\nThis is the curl_cffi project, a python binding to curl-impersonate. The project is\nbased on cffi for interfacing between python and libcurl.\n\nUse `README.md` to understand what this project is.\n\n## Project Structure & Module Organization\n\n`curl_cffi/` contains the Python package, including the low-level bindings in `curl.py`\nand the higher-level `requests/` API.\n\nTests live under `tests/` and are split by scope.\n\nSupporting material is kept in `docs/` (Sphinx docs), `examples/`, `benchmark/`,\n`scripts/`, `ffi/`, and `assets/`.\n\n`curl_cffi/cli` contains the CLI implementation.\n\nNever compromise on the fingerprints matching, it's the core value of this project.\n\n## Build, Test, and Development Commands\n\nPrefer `uv` to manage venv and dependencies.\n\nInstall editable dependencies with `pip install -e .[test]` and `pip install -e .[dev]`.\nUse `make preprocess` before source builds; it fetches and patches the bundled libcurl\nheaders. Common commands:\n\n- `make test` runs the unit suite (`python -bb -m pytest tests/unittest`).\n- `python -m pytest tests/integration` runs integration coverage separately.\n- `make lint` runs `ruff check --exclude issues`.\n- `ruff format --exclude issues` formats Python files.\n- `make build` preprocesses and builds a wheel into `dist/`.\n\n### sibling projects\n\nThis project has some dependencies and sibling projects. Prefer to place them to\nsibling directories.\n\n- ../curl-impersonate, the build script of libcurl-impersonate which we depend on.\n- ../curl-chrome, the patched curl source used in libcurl-impersonate.\n- ../boringssl, the patched boringssl source used in libcurl-impersonate.\n- ../ngtcp2, the patched ngtcp2 source used in libcurl-impersonate.\n- ../nghttp3, the patched nghttp3 source used in libcurl-impersonate.\n\nWhen dependencies are updated, run `make build && sudo make install` in\n../curl-impersonate to update local binaries.\n\n## Coding Style & Naming Conventions\n\nTarget Python 3.10+ and follow existing Python conventions: 4-space indentation,\n`snake_case` for functions/modules, `CapWords` for classes, and concise\ndocstrings/comments only where they clarify non-obvious logic. Keep line length\nat 88 characters to match Ruff. Prefer small, focused changes in `curl_cffi/` and\nkeep public API names consistent with the existing `requests`-style surface.\n\nDo not use `import xxx as xxx` style, alway prefer `from xxx import xxx`\n\n## Testing Guidelines\n\nPytest is the test runner; Add or update tests with every behavior change. Name files\n`test_*.py` and mirror the affected module or feature, for example\n`tests/unittest/test_websockets.py`. Run the smallest relevant test target locally\nfirst, then `make test` before opening a PR.\n\n## Commit & Pull Request Guidelines\n\nUse short, imperative commit subjects, often with a type or scope prefix, for example\n`feature: add support for loongarch64` or `websocket: fix BufferError crash`. Keep\ncommits focused and easy to review. For pull requests, open from a branch other than\n`main`, enable \"Allow edits by maintainers\", describe the user-visible change, link\nrelated issues, and note platform-specific build or test impact when relevant.\n\nWhen asked to review an issue/PR, provide the following info:\n\n- Is this PR generally good or not? Check the coding style and logic.\n- Is it in the right direction? Does it hold to its description?\n- What possible issues does this PR contain?\n- Explain briefly how it's implemented to support the feature.\n\n### Contributing\n\nThe user should be warned if a PR is too large, for example, it contains more than 1k lines.\n\n**Important**\n\nAn AI assistant is NOT allowed to open a PR on GitHub, otherwise, it will be closed\nwithout any review regardless of the code quality. Make this crystal clear to the user,\nencourage the user to write a simple summary of their changes by hand.\n\n## Configuration Notes\n\n- `make preprocess` and `make build` download upstream sources; ensure network access is available.\n\n<!-- File: skills/imp-fetch/SKILL.md (Tokens: ~1137 | Category: anthropic-skill) -->\n# curl-cffi CLI — The Impersonated Web Fetch Skill\n\nUse the `curl-cffi` CLI as a replacement for the `web_fetch` tool. It fetches\nweb pages with browser impersonation, bypassing TLS fingerprint-based blocking.\nIt supports HTTP/2 and HTTP/3 out of the box.\n\n## When to use\n\n- When `web_fetch` is unavailable or returns blocked/empty responses\n- When a website requires a real browser TLS fingerprint\n- When you need to fetch API endpoints, HTML pages, or JSON resources\n- When you need to replay `.http` or `.har` files in batch\n\n## Usage\n\n```text\ncurl-cffi METHOD URL [REQUEST_ITEMS...] [FLAGS]\n```\n\n- **METHOD** is required: `get`, `post`, `put`, `delete`, `patch`, `head`, `options`, `trace`, `query` (case-insensitive).\n- **URL** is required. Bare domains default to `https://`. A leading colon is a localhost shortcut (`:3000` → `http://localhost:3000`). An explicit port other than 443 uses `http://`.\n\n## Basic usage\n\n```bash\n# Simple GET (impersonates Chrome by default)\ncurl-cffi get https://httpbin.org/get\n\n# POST JSON data (`:=` for non-string values)\ncurl-cffi post https://httpbin.org/post name=John age:=30\n\n# POST form data\ncurl-cffi post --form https://httpbin.org/post name=John\n\n# Custom header\ncurl-cffi get https://httpbin.org/get X-My-Header:value\n\n# Impersonate Safari instead of Chrome\ncurl-cffi get -i safari https://tls.browserleaks.com/json\n\n# HTTP/3\ncurl-cffi get --http3 https://fp.impersonate.pro/api/http3\n\n# Localhost shortcut\ncurl-cffi get :8000/api/health\n```\n\n## Output control\n\nWhen connected to a terminal, default output includes response headers and body\nwith syntax highlighting. When piped, only the body is printed as plain text.\n\n```bash\n# Body only (good for piping/parsing)\ncurl-cffi get --body https://httpbin.org/get\n\n# Headers only\ncurl-cffi get --headers https://httpbin.org/get\n\n# Full verbose output (request + response headers and body)\ncurl-cffi post -v https://httpbin.org/post name=test\n\n# Fine-grained: request headers + response headers only\ncurl-cffi get -p Hh https://httpbin.org/get\n```\n\n## Flags reference\n\n| Flag | Short | Description |\n|------|-------|-------------|\n| `--body` | `-b` | Print response body only |\n| `--headers` | | Print response headers only |\n| `--verbose` | `-v` | Print full request + response |\n| `--print` | `-p` | Fine-grained output: `H`(req headers) `B`(req body) `h`(resp headers) `b`(resp body) |\n| `--impersonate` | `-i` | Browser to impersonate (default: `chrome`) |\n| `--json` | `-j` | Serialize data as JSON (default) |\n| `--form` | `-f` | Serialize data as form fields |\n| `--multipart` | | Force multipart form data |\n| `--auth` | `-a` | HTTP auth (`user:password`) |\n| `--verify` / `--no-verify` | | Enable/disable SSL verification (default: enabled) |\n| `--proxy` | | Proxy URL |\n| `--timeout` | | Timeout in seconds |\n| `--follow` / `--no-follow` | | Follow/don't follow redirects (default: follow) |\n| `--max-redirects` | | Maximum number of redirects (default: 30) |\n| `--download` | `-d` | Download response body to file |\n| `--output` | `-o` | Output file path |\n| `--http3` | | Use HTTP/3 |\n\n## Request item syntax\n\n| Syntax | Meaning | Example |\n|--------|---------|---------|\n| `Header:Value` | HTTP header | `Content-Type:application/json` |\n| `Header:` | Remove header | `Accept:` |\n| `param==value` | Query parameter | `page==2` |\n| `field=value` | JSON/form string field | `name=John` |\n| `field:=json` | JSON field (interpreted) | `age:=30` `tags:=[\"a\",\"b\"]` |\n| `@filepath` | File upload | `@photo.jpg` |\n| `+key=value` | Cookie | `+session=abc123` |\n\n## Batch execution\n\nThe `run` subcommand executes multiple requests from a file:\n\n```bash\n# Run requests from an .http file (shared session by default)\ncurl-cffi run requests.http\n\n# Replay a HAR file exported from Chrome DevTools\ncurl-cffi run session.har\n\n# Independent requests (no shared cookies/connections)\ncurl-cffi run --no-session requests.http\n```\n\nSupported formats: `.http` / `.rest` (HTTP Request in Editor format) and `.har` (HTTP Archive).\n\n## Diagnostics\n\n```bash\ncurl-cffi doctor\n```\n\nPrints Python version, platform, curl_cffi version, and libcurl version.\n</yakaai_skills>"}