Agent Skillsespressif/esp-claw › cap_http_request

cap_http_request

GitHub

用于向白名单内的 HTTP/HTTPS 端点发起请求,返回状态码和响应体文本,或直接将响应流式保存至文件。适用于已知目标地址且需受控访问的场景。

components/claw_capabilities/cap_http_request/skills/cap_http_request/SKILL.md espressif/esp-claw

Trigger Scenarios

需要从特定 URL 获取原始 API 数据或文件内容 工作流已知目标端点且需要执行受白名单保护的抓取操作

Install

npx skills add espressif/esp-claw --skill cap_http_request -g -y
More Options

Non-standard path

npx skills add https://github.com/espressif/esp-claw/tree/master/components/claw_capabilities/cap_http_request/skills/cap_http_request -g -y

Use without installing

npx skills use espressif/esp-claw@cap_http_request

指定 Agent (Claude Code)

npx skills add espressif/esp-claw --skill cap_http_request -a claude-code -g -y

安装 repo 全部 skill

npx skills add espressif/esp-claw --all -g -y

预览 repo 内 skill

npx skills add espressif/esp-claw --list

SKILL.md

Frontmatter
{
    "name": "cap_http_request",
    "metadata": {
        "cap_groups": [
            "cap_http_request"
        ],
        "manage_mode": "readonly"
    },
    "description": "Call allowlisted HTTP or HTTPS endpoints directly and return response status plus body text, or stream the response body to a file."
}

HTTP Request

Use this skill when the task needs a direct HTTP or HTTPS request to a known endpoint instead of search-engine results.

When to use

  • The user needs raw API or file content from a specific URL.
  • A workflow already knows the target endpoint and only needs a guarded fetch.
  • The request should stay inside the device allowlist policy.

Available capability

  • http_request: send standard HTTP requests to allowlisted domains or IPs and return status plus body text, or save the response body directly to a file.

Calling rules

  • Only call http_request when the target host is expected to be in the configured allowlist.
  • Input must be a JSON object:
{
  "url": "https://api.example.com/v1/data",
  "method": "GET",
  "headers": {
    "Authorization": "Bearer <token>"
  },
  "body": "",
  "timeout_ms": 15000,
  "max_body_bytes": 16384,
  "save_path": "/spiffs/download.bin",
  "max_file_bytes": 1048576
}
  • url is required and must start with http:// or https://.
  • method defaults to GET.
  • body is only valid for methods that accept a request body.
  • save_path is optional. When present, the response body is streamed directly to this file and is not returned in memory.
  • max_body_bytes applies only when returning the response body as text.
  • max_file_bytes is optional and applies only when save_path is present.
  • Redirects are allowed only when the redirect target also matches the allowlist.

Output shape

  • The capability returns plain text, not JSON.
  • Success format:
    • HTTP <status>
    • followed by the response body text
  • File-save success format:
    • HTTP <status>
    • Saved response body to <path> (<bytes> bytes)
  • Common error strings include:
    • Error: HTTP allowlist is empty; configure search_http_allowlist first
    • Error: host '...' is not in allowlist
    • Error: method must be GET/POST/PUT/PATCH/DELETE/HEAD
    • Error: save_path must be a non-empty string
    • Error: failed to open save_path
    • Error: http request failed (...)

Examples

{
  "url": "https://skills-lab.esp-claw.com/raw/tags.json"
}
{
  "url": "https://api.example.com/v1/items",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json"
  },
  "body": "{\"name\":\"demo\"}"
}
{
  "url": "https://example.com/file.bin",
  "save_path": "/spiffs/file.bin",
  "max_file_bytes": 10485760
}

Version History

  • 06eb576 Current 2026-07-24 19:53

Same Skill Collection

components/claw_capabilities/cap_im_platform/skills/cap_im_platform/SKILL.md
components/claw_capabilities/cap_router_mgr/skills/cap_router_mgr/SKILL.md
components/claw_capabilities/cap_scheduler/skills/cap_scheduler/SKILL.md
components/claw_capabilities/cap_web_search/skills/cap_web_search/SKILL.md
components/claw_modules/claw_memory/skills/memory_ops/SKILL.md
components/claw_modules/claw_memory/skills/profile_memory_ops/SKILL.md
components/common/skill_builder/skills/skill_creator/SKILL.md
components/common/skill_builder/skills/skills_lab_downloader/SKILL.md
components/common/skill_builder/skills/skills_lab_search/SKILL.md
components/lua_modules/lua_driver_touch/skills/read_touch/SKILL.md
components/lua_modules/lua_module_ble_hid/skills/ble_hid/SKILL.md
components/lua_modules/lua_module_ble/skills/ble/SKILL.md
components/lua_modules/lua_module_camera/skills/take_picture/SKILL.md
components/lua_modules/lua_module_http_server/skills/http_server_lua_demo/SKILL.md
components/claw_capabilities/cap_llm_inspect/skills/cap_llm_inspect_image/SKILL.md

Metadata

Files
0
Version
fda303f
Hash
501a5125
Indexed
2026-07-24 19:53

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 00:03
浙ICP备14020137号-1 $mapa de visitantes$