{"id":"d2851af1-3063-4418-82f3-fa9a8b58e4fe","entityType":"agent","slug":"clawhub-linkfox-ai-linkfox-shopee-store-media","name":"Shopee-店铺媒体","canonicalUrl":"https://www.xpersona.co/agent/clawhub-linkfox-ai-linkfox-shopee-store-media","canonicalPath":"/agent/clawhub-linkfox-ai-linkfox-shopee-store-media","generatedAt":"2026-10-13T00:46:36.423Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T22:13:07.624Z","emptyReason":null},"description":"Shopee（虾皮）媒体上传 Media 模块（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Media 模块全部 6 个接口：upload_image、init_video_upload、upload_video_part、complete_video_upload、get_video_upload_result、cancel_video_upload。path 为 api/v2/media/...（module=130）。当用户提到 Shopee media 上传、v2.media.upload_image、media模块上传图片 时触发。与 media_space（module=91）接口名相同但 path 不同，按网关白名单选用。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 986 downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-shopee-store-media","sourceUrl":"https://clawhub.ai/linkfox-ai/linkfox-shopee-store-media","homepage":"https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-media","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/linkfox-ai/linkfox-shopee-store-media","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-media","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Shopee-店铺媒体 technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T22:13:07.624Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T22:13:07.624Z","emptyReason":null},"stars":null,"forks":null,"downloads":986,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.0.6","tractionLabel":"986 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T22:13:07.538Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T22:13:07.624Z","lastCrawledAt":"2026-10-11T22:13:07.538Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T22:13:07.538Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.6","createdAt":"2026-09-14T05:28:50.626Z","changelog":"Update from 1.0.5 to 1.0.6","fileCount":23,"zipByteSize":33812},{"version":"1.0.5","createdAt":"2026-08-14T15:05:26.391Z","changelog":"Update from 1.0.4 to 1.0.5","fileCount":23,"zipByteSize":33940},{"version":"1.0.4","createdAt":"2026-08-07T11:04:08.020Z","changelog":"Update from 1.0.3 to 1.0.4","fileCount":23,"zipByteSize":34056},{"version":"1.0.3","createdAt":"2026-07-13T12:22:43.238Z","changelog":"Update from 1.0.2 to 1.0.3","fileCount":15,"zipByteSize":17969},{"version":"1.0.2","createdAt":"2026-07-06T11:31:18.925Z","changelog":"Update from 1.0.1 to 1.0.2","fileCount":15,"zipByteSize":17432},{"version":"1.0.1","createdAt":"2026-07-03T08:30:33.765Z","changelog":"Update from 1.0.0 to 1.0.1","fileCount":14,"zipByteSize":16088},{"version":"1.0.0","createdAt":"2026-07-02T14:52:28.189Z","changelog":"Initial release","fileCount":14,"zipByteSize":16071}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-shopee-store-media","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-shopee-store-media` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/linkfox-ai/linkfox-shopee-store-media before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-media/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-media/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-media/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-media/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-media/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-media/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-13T00:46:36.421Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-media/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-media/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-media/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-media/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T22:13:07.624Z","emptyReason":null},"readme":"Skill: Shopee-店铺媒体\n\nOwner: linkfox-ai\n\nSummary: Shopee（虾皮）媒体上传 Media 模块（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Media 模块全部 6 个接口：upload_image、init_video_upload、upload_video_part、complete_video_upload、get_video_upload_result、cancel_video_upload。path 为 api/v2/media/...（module=130）。当用户提到 Shopee media 上传、v2.media.upload_image、media模块上传图片 时触发。与 media_space（module=91）接口名相同但 path 不同，按网关白名单选用。\n\nTags: latest:1.0.6\n\nVersion history:\n\nv1.0.6 | 2026-09-14T05:28:50.626Z | user\n\nUpdate from 1.0.5 to 1.0.6\n\nv1.0.5 | 2026-08-14T15:05:26.391Z | user\n\nUpdate from 1.0.4 to 1.0.5\n\nv1.0.4 | 2026-08-07T11:04:08.020Z | user\n\nUpdate from 1.0.3 to 1.0.4\n\nv1.0.3 | 2026-07-13T12:22:43.238Z | user\n\nUpdate from 1.0.2 to 1.0.3\n\nv1.0.2 | 2026-07-06T11:31:18.925Z | user\n\nUpdate from 1.0.1 to 1.0.2\n\nv1.0.1 | 2026-07-03T08:30:33.765Z | user\n\nUpdate from 1.0.0 to 1.0.1\n\nv1.0.0 | 2026-07-02T14:52:28.189Z | user\n\nInitial release\n\nArchive index:\n\nArchive v1.0.6: 23 files, 33812 bytes\n\nFiles: references/api.md (3484b), references/apis/cancel-video-upload.md (1402b), references/apis/complete-video-upload.md (1440b), references/apis/get-video-upload-result.md (1441b), references/apis/init-video-upload.md (1412b), references/apis/upload-image.md (1361b), references/apis/upload-video-part.md (1420b), references/onboarding.md (1999b), scripts/_media_api_runner.py (4276b), scripts/_media_endpoints.py (2102b), scripts/_shopee_media_common.py (11818b), scripts/cancel_video_upload.py (730b), scripts/check_auth_dependency.py (3979b), scripts/complete_video_upload.py (742b), scripts/get_video_upload_result.py (754b), scripts/init_video_upload.py (718b), scripts/media_api.py (991b), scripts/onboarding.py (24027b), scripts/upload_image.py (688b), scripts/upload_video_part.py (718b), skill-card.md (2932b), SKILL.md (5399b), _meta.json (145b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: linkfox-shopee-store-media\ndescription: Shopee（虾皮）媒体上传 Media 模块（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Media 模块全部 6 个接口：upload_image、init_video_upload、upload_video_part、complete_video_upload、get_video_upload_result、cancel_video_upload。path 为 api/v2/media/...（module=130）。当用户提到 Shopee media 上传、v2.media.upload_image、media模块上传图片 时触发。与 media_space（module=91）接口名相同但 path 不同，按网关白名单选用。\n---\n\n# Shopee 媒体 Media\n\nShopee Open Platform **Media 模块**（6 个 API，**`api/v2/media/...`**，module=130）。**依赖 `linkfox-shopee-store-auth`** 选店；经 **`POST /shopee/developerProxy`** 传入 `shopId`（或 `merchantId`），由服务端解析 token 转发。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/media_api.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗算力；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和算力问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示算力或余额不足**：消息含\"算力余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 官方参考\n\nMedia 模块索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n---\n\n## Media vs MediaSpace\n\n| Skill | path 前缀 | module |\n|-------|-----------|--------|\n| **本 skill** `linkfox-shopee-store-media` | `api/v2/media/...` | 130 |\n| `linkfox-shopee-store-media-space` | `api/v2/media_space/...` | 91 |\n\n接口名称相同（`upload_image`、`init_video_upload` 等），但 **path 前缀不同**。请按 LinkFox 网关白名单选择对应 skill。\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n## 可用脚本（6 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `upload_image.py` | upload_image | POST |\n| `init_video_upload.py` | init_video_upload | POST |\n| `upload_video_part.py` | upload_video_part | POST |\n| `complete_video_upload.py` | complete_video_upload | POST |\n| `get_video_upload_result.py` | get_video_upload_result | GET |\n| `cancel_video_upload.py` | cancel_video_upload | POST |\n| `media_api.py` | 通用入口 | — |\n\n## 接口说明（按 API）\n\n入参与响应细节放在 `references/apis/`，SKILL 只保留索引。\n\n| API | 说明文档 |\n|-----|----------|\n| `cancel_video_upload` | [references/apis/cancel-video-upload.md](./references/apis/cancel-video-upload.md) |\n| `complete_video_upload` | [references/apis/complete-video-upload.md](./references/apis/complete-video-upload.md) |\n| `get_video_upload_result` | [references/apis/get-video-upload-result.md](./references/apis/get-video-upload-result.md) |\n| `init_video_upload` | [references/apis/init-video-upload.md](./references/apis/init-video-upload.md) |\n| `upload_image` | [references/apis/upload-image.md](./references/apis/upload-image.md) |\n| `upload_video_part` | [references/apis/upload-video-part.md](./references/apis/upload-video-part.md) |\n\n模块总览 / Feedback 见 [references/api.md](./references/api.md)。\n\n## Usage Scenarios\n\n### 上传图片\n`upload_image.py` → 获取 Shopee 图片 URL → 用于 `linkfox-shopee-store-product` 的 `add_item`\n\n### 分片上传视频\n`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- MediaSpace（`api/v2/media_space/...`）→ `linkfox-shopee-store-media-space`\n- 视频发布/效果 → `linkfox-shopee-store-video`\n\n## 算力消耗规则\n\n不消耗算力。\n\n**Feedback:** 见 `references/api.md`。\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-media\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1789363730626\n}\n\nFile v1.0.6:references/api.md\n\n# linkfox-shopee-store-media — 参数与字段参考\n\n> 单接口入参/响应说明已拆到 **`apis/`**（按 API 一份）；本文件保留模块总览与 Feedback。\nShopee **Media 模块**全部 6 个 API，经 **`POST /shopee/developerProxy`** 转发。\n\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n> **Media vs MediaSpace**：本 skill 使用 `api/v2/media/...`（module=130）；`linkfox-shopee-store-media-space` 使用 `api/v2/media_space/...`（module=91）。接口名相同但 path 前缀不同，请按网关白名单选择。\n\n## 通用约定\n\n- **Base URL**：`https://tool-gateway.linkfox.com`\n- **path**：须 `api/v2/media/...`\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.media.{api}?module=130&type=1`\n\n---\n\n## Media 模块总览\n\n| # | API | Method | path | 脚本 | 官方文档 |\n|---|-----|--------|------|------|----------|\n| 1 | cancel_video_upload | POST | `api/v2/media/cancel_video_upload` | `cancel_video_upload.py` | [apis/cancel-video-upload.md](./apis/cancel-video-upload.md) |\n| 2 | complete_video_upload | POST | `api/v2/media/complete_video_upload` | `complete_video_upload.py` | [apis/complete-video-upload.md](./apis/complete-video-upload.md) |\n| 3 | get_video_upload_result | GET | `api/v2/media/get_video_upload_result` | `get_video_upload_result.py` | [apis/get-video-upload-result.md](./apis/get-video-upload-result.md) |\n| 4 | init_video_upload | POST | `api/v2/media/init_video_upload` | `init_video_upload.py` | [apis/init-video-upload.md](./apis/init-video-upload.md) |\n| 5 | upload_image | POST | `api/v2/media/upload_image` | `upload_image.py` | [apis/upload-image.md](./apis/upload-image.md) |\n| 6 | upload_video_part | POST | `api/v2/media/upload_video_part` | `upload_video_part.py` | [apis/upload-video-part.md](./apis/upload-video-part.md) |\n通用入口：`media_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\n\n---\n\n## 接口说明\n\n| API | 说明 |\n|-----|------|\n| `upload_image` | 上传图片，返回 Shopee 图片 URL — [apis/upload-image.md](./apis/upload-image.md) |\n| `init_video_upload` | 初始化视频分片上传 — [apis/init-video-upload.md](./apis/init-video-upload.md) |\n| `upload_video_part` | 上传视频分片 — [apis/upload-video-part.md](./apis/upload-video-part.md) |\n| `complete_video_upload` | 完成视频上传 — [apis/complete-video-upload.md](./apis/complete-video-upload.md) |\n| `get_video_upload_result` | 查询上传结果 — [apis/get-video-upload-result.md](./apis/get-video-upload-result.md) |\n| `cancel_video_upload` | 取消上传 — [apis/cancel-video-upload.md](./apis/cancel-video-upload.md) |\n\n视频分片流程：`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n---\n\n## curl 示例\n\n```bash\ncurl -X POST ${LINKFOX_TOOL_GATEWAY}/shopee/developerProxy \\\n  -H \"Authorization: $LINKFOX_AGENT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"path\": \"api/v2/media/upload_image\",\n    \"method\": \"POST\",\n    \"accessToken\": \"xxx\",\n    \"shopId\": \"67890\",\n    \"body\": \"...\"\n  }'\n```\n\n---\n\n## Feedback API\n\n```bash\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"skillName\":\"linkfox-shopee-store-media\",\"sentiment\":\"POSITIVE\",\n       \"category\":\"OTHER\",\"content\":\"图片上传正常\"}'\n```\n\nFile v1.0.6:references/apis/cancel-video-upload.md\n\n# cancel_video_upload\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/cancel_video_upload.py` |\n| Method / path | POST `api/v2/media/cancel_video_upload` |\n| 官方文档 | [cancel_video_upload](https://open.shopee.com/documents/v2/v2.media.cancel_video_upload?module=130&type=1) |\n| 用途 | Cancel in-progress video upload |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Cancel in-progress video upload\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/cancel_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"cancel_video_upload\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`cancelVideoUpload`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/complete-video-upload.md\n\n# complete_video_upload\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/complete_video_upload.py` |\n| Method / path | POST `api/v2/media/complete_video_upload` |\n| 官方文档 | [complete_video_upload](https://open.shopee.com/documents/v2/v2.media.complete_video_upload?module=130&type=1) |\n| 用途 | Complete video upload after all parts sent |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Complete video upload after all parts sent\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/complete_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"complete_video_upload\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`completeVideoUpload`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/get-video-upload-result.md\n\n# get_video_upload_result\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_video_upload_result.py` |\n| Method / path | GET `api/v2/media/get_video_upload_result` |\n| 官方文档 | [get_video_upload_result](https://open.shopee.com/documents/v2/v2.media.get_video_upload_result?module=130&type=1) |\n| 用途 | Query video upload result/status |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Query video upload result/status\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_video_upload_result.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"get_video_upload_result\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getVideoUploadResult`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/init-video-upload.md\n\n# init_video_upload\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/init_video_upload.py` |\n| Method / path | POST `api/v2/media/init_video_upload` |\n| 官方文档 | [init_video_upload](https://open.shopee.com/documents/v2/v2.media.init_video_upload?module=130&type=1) |\n| 用途 | Init chunked video upload session; pass body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Init chunked video upload session; pass body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/init_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"init_video_upload\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`initVideoUpload`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/upload-image.md\n\n# upload_image\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/upload_image.py` |\n| Method / path | POST `api/v2/media/upload_image` |\n| 官方文档 | [upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1) |\n| 用途 | Upload image; returns Shopee image URL |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Upload image; returns Shopee image URL\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/upload_image.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"upload_image\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`uploadImage`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/upload-video-part.md\n\n# upload_video_part\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/upload_video_part.py` |\n| Method / path | POST `api/v2/media/upload_video_part` |\n| 官方文档 | [upload_video_part](https://open.shopee.com/documents/v2/v2.media.upload_video_part?module=130&type=1) |\n| 用途 | Upload video chunk; pass body via developerProxy |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Upload video chunk; pass body via developerProxy\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/upload_video_part.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"upload_video_part\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`uploadVideoPart`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/onboarding.md\n\n# 解决认证和算力问题\n\n调用本 skill 时若网关返回 **auth** 或 **billing** 错误，走本 skill 自带的 `scripts/onboarding.py` 完成引导。\n\n**auth 场景**：`errcode=401` 或消息含 `authorized error`/`鉴权失败`/`未授权`/`unauthorized`；或 `LINKFOX_AGENT_API_KEY` 与 `LINKFOXAGENT_API_KEY` 均为空。\n1. 若已配置 key → 先让用户重启会话（最常见误判），仍失败让用户重新取 key 或换手机号重注册\n2. 未配置 → 询问：自助去 https://agent.linkfox.com/ 取 key，或提供手机号让脚本注册\n3. 手机号路径：\n   - `python scripts/onboarding.py send-code <phone>` → 展示 JSON 里的 phone/agreements\n   - 收到验证码后：`python scripts/onboarding.py login <phone> <code>`\n   - 拿到 `api_key` 后把下面三平台配置转发给用户，提示重启会话生效：\n     - Windows PowerShell（永久）：`setx LINKFOX_AGENT_API_KEY \"<key>\"`\n     - macOS zsh：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.zshrc && source ~/.zshrc`\n     - Linux bash：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.bashrc && source ~/.bashrc`\n     - 变量名 `LINKFOX_AGENT_API_KEY`（主推）或 `LINKFOXAGENT_API_KEY`（老规范）任一即可\n\n**billing 场景**：`errcode=402` 或消息含 `算力/余额/quota/insufficient/充值/套餐到期`。\n- `python scripts/onboarding.py list-plans` → 有 AskUserQuestion 就弹菜单，否则输出编号清单让用户选\n- 校验 `plan_id` ∈ 清单、支付方式 ∈ 该套餐 `available_methods`（通常 `wechat/alipay`）\n- `python scripts/onboarding.py order <plan_id> <method>` → 展示优先级 PNG > `pay_url` > `ascii_qr`（标注兜底）\n- 已付款可选调 `python scripts/onboarding.py query <order_id>`，不主动轮询\n\n排除 `errcode=403`（无权限，不归入这两类）。所有子命令输出 stdout JSON，`error` 字段已含阶段前缀，透传给用户即可。完整用法：`python scripts/onboarding.py --help`。\n\nFile v1.0.6:skill-card.md\n\n## Description:\n\nThis skill helps agents upload Shopee store media through LinkFox, covering image upload and the full chunked video upload lifecycle.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal developers and e-commerce operators use this skill to upload images and videos for Shopee store workflows, including product media preparation and video upload status checks.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill uses LinkFox endpoint variables and API keys for Shopee media operations.\n\nMitigation: Install only in trusted environments, restrict LINKFOX_* endpoint variables, and verify the configured LinkFox API key before use.\n\nRisk: The onboarding flow can request SMS codes and expose billing or payment links.\n\nMitigation: Only provide SMS codes intentionally for LinkFox onboarding and confirm any paid order before opening or scanning payment links.\n\nRisk: Saved response files may contain shop, media, request, or account details.\n\nMitigation: Treat local LinkFox response files as sensitive and limit access, retention, and sharing.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-media)\n- [Shopee Media upload_image documentation](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n- [Shopee Media cancel_video_upload documentation](https://open.shopee.com/documents/v2/v2.media.cancel_video_upload?module=130&type=1)\n- [Shopee Media complete_video_upload documentation](https://open.shopee.com/documents/v2/v2.media.complete_video_upload?module=130&type=1)\n- [Shopee Media get_video_upload_result documentation](https://open.shopee.com/documents/v2/v2.media.get_video_upload_result?module=130&type=1)\n- [Shopee Media init_video_upload documentation](https://open.shopee.com/documents/v2/v2.media.init_video_upload?module=130&type=1)\n- [Shopee Media upload_video_part documentation](https://open.shopee.com/documents/v2/v2.media.upload_video_part?module=130&type=1)\n- [API reference](references/api.md)\n- [Authentication and billing onboarding](references/onboarding.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with shell commands and JSON response summaries]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Scripts save full API responses as local JSON files and may print summaries for larger responses.]\n\n## Skill Version(s):\n\n1.0.6 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.5: 23 files, 33940 bytes\n\nFiles: references/api.md (3484b), references/apis/cancel-video-upload.md (1402b), references/apis/complete-video-upload.md (1440b), references/apis/get-video-upload-result.md (1441b), references/apis/init-video-upload.md (1412b), references/apis/upload-image.md (1361b), references/apis/upload-video-part.md (1420b), references/onboarding.md (2046b), scripts/_media_api_runner.py (4276b), scripts/_media_endpoints.py (2102b), scripts/_shopee_media_common.py (11588b), scripts/cancel_video_upload.py (730b), scripts/check_auth_dependency.py (3979b), scripts/complete_video_upload.py (742b), scripts/get_video_upload_result.py (754b), scripts/init_video_upload.py (718b), scripts/media_api.py (991b), scripts/onboarding.py (24089b), scripts/upload_image.py (688b), scripts/upload_video_part.py (718b), skill-card.md (3121b), SKILL.md (5399b), _meta.json (145b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: linkfox-shopee-store-media\ndescription: Shopee（虾皮）媒体上传 Media 模块（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Media 模块全部 6 个接口：upload_image、init_video_upload、upload_video_part、complete_video_upload、get_video_upload_result、cancel_video_upload。path 为 api/v2/media/...（module=130）。当用户提到 Shopee media 上传、v2.media.upload_image、media模块上传图片 时触发。与 media_space（module=91）接口名相同但 path 不同，按网关白名单选用。\n---\n\n# Shopee 媒体 Media\n\nShopee Open Platform **Media 模块**（6 个 API，**`api/v2/media/...`**，module=130）。**依赖 `linkfox-shopee-store-auth`** 选店；经 **`POST /shopee/developerProxy`** 传入 `shopId`（或 `merchantId`），由服务端解析 token 转发。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/media_api.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 官方参考\n\nMedia 模块索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n---\n\n## Media vs MediaSpace\n\n| Skill | path 前缀 | module |\n|-------|-----------|--------|\n| **本 skill** `linkfox-shopee-store-media` | `api/v2/media/...` | 130 |\n| `linkfox-shopee-store-media-space` | `api/v2/media_space/...` | 91 |\n\n接口名称相同（`upload_image`、`init_video_upload` 等），但 **path 前缀不同**。请按 LinkFox 网关白名单选择对应 skill。\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n## 可用脚本（6 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `upload_image.py` | upload_image | POST |\n| `init_video_upload.py` | init_video_upload | POST |\n| `upload_video_part.py` | upload_video_part | POST |\n| `complete_video_upload.py` | complete_video_upload | POST |\n| `get_video_upload_result.py` | get_video_upload_result | GET |\n| `cancel_video_upload.py` | cancel_video_upload | POST |\n| `media_api.py` | 通用入口 | — |\n\n## 接口说明（按 API）\n\n入参与响应细节放在 `references/apis/`，SKILL 只保留索引。\n\n| API | 说明文档 |\n|-----|----------|\n| `cancel_video_upload` | [references/apis/cancel-video-upload.md](./references/apis/cancel-video-upload.md) |\n| `complete_video_upload` | [references/apis/complete-video-upload.md](./references/apis/complete-video-upload.md) |\n| `get_video_upload_result` | [references/apis/get-video-upload-result.md](./references/apis/get-video-upload-result.md) |\n| `init_video_upload` | [references/apis/init-video-upload.md](./references/apis/init-video-upload.md) |\n| `upload_image` | [references/apis/upload-image.md](./references/apis/upload-image.md) |\n| `upload_video_part` | [references/apis/upload-video-part.md](./references/apis/upload-video-part.md) |\n\n模块总览 / Feedback 见 [references/api.md](./references/api.md)。\n\n## Usage Scenarios\n\n### 上传图片\n`upload_image.py` → 获取 Shopee 图片 URL → 用于 `linkfox-shopee-store-product` 的 `add_item`\n\n### 分片上传视频\n`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- MediaSpace（`api/v2/media_space/...`）→ `linkfox-shopee-store-media-space`\n- 视频发布/效果 → `linkfox-shopee-store-video`\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback:** 见 `references/api.md`。\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-media\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1786719926391\n}\n\nFile v1.0.5:references/api.md\n\n# linkfox-shopee-store-media — 参数与字段参考\n\n> 单接口入参/响应说明已拆到 **`apis/`**（按 API 一份）；本文件保留模块总览与 Feedback。\nShopee **Media 模块**全部 6 个 API，经 **`POST /shopee/developerProxy`** 转发。\n\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n> **Media vs MediaSpace**：本 skill 使用 `api/v2/media/...`（module=130）；`linkfox-shopee-store-media-space` 使用 `api/v2/media_space/...`（module=91）。接口名相同但 path 前缀不同，请按网关白名单选择。\n\n## 通用约定\n\n- **Base URL**：`https://tool-gateway.linkfox.com`\n- **path**：须 `api/v2/media/...`\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.media.{api}?module=130&type=1`\n\n---\n\n## Media 模块总览\n\n| # | API | Method | path | 脚本 | 官方文档 |\n|---|-----|--------|------|------|----------|\n| 1 | cancel_video_upload | POST | `api/v2/media/cancel_video_upload` | `cancel_video_upload.py` | [apis/cancel-video-upload.md](./apis/cancel-video-upload.md) |\n| 2 | complete_video_upload | POST | `api/v2/media/complete_video_upload` | `complete_video_upload.py` | [apis/complete-video-upload.md](./apis/complete-video-upload.md) |\n| 3 | get_video_upload_result | GET | `api/v2/media/get_video_upload_result` | `get_video_upload_result.py` | [apis/get-video-upload-result.md](./apis/get-video-upload-result.md) |\n| 4 | init_video_upload | POST | `api/v2/media/init_video_upload` | `init_video_upload.py` | [apis/init-video-upload.md](./apis/init-video-upload.md) |\n| 5 | upload_image | POST | `api/v2/media/upload_image` | `upload_image.py` | [apis/upload-image.md](./apis/upload-image.md) |\n| 6 | upload_video_part | POST | `api/v2/media/upload_video_part` | `upload_video_part.py` | [apis/upload-video-part.md](./apis/upload-video-part.md) |\n通用入口：`media_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\n\n---\n\n## 接口说明\n\n| API | 说明 |\n|-----|------|\n| `upload_image` | 上传图片，返回 Shopee 图片 URL — [apis/upload-image.md](./apis/upload-image.md) |\n| `init_video_upload` | 初始化视频分片上传 — [apis/init-video-upload.md](./apis/init-video-upload.md) |\n| `upload_video_part` | 上传视频分片 — [apis/upload-video-part.md](./apis/upload-video-part.md) |\n| `complete_video_upload` | 完成视频上传 — [apis/complete-video-upload.md](./apis/complete-video-upload.md) |\n| `get_video_upload_result` | 查询上传结果 — [apis/get-video-upload-result.md](./apis/get-video-upload-result.md) |\n| `cancel_video_upload` | 取消上传 — [apis/cancel-video-upload.md](./apis/cancel-video-upload.md) |\n\n视频分片流程：`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n---\n\n## curl 示例\n\n```bash\ncurl -X POST ${LINKFOX_TOOL_GATEWAY}/shopee/developerProxy \\\n  -H \"Authorization: $LINKFOX_AGENT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"path\": \"api/v2/media/upload_image\",\n    \"method\": \"POST\",\n    \"accessToken\": \"xxx\",\n    \"shopId\": \"67890\",\n    \"body\": \"...\"\n  }'\n```\n\n---\n\n## Feedback API\n\n```bash\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"skillName\":\"linkfox-shopee-store-media\",\"sentiment\":\"POSITIVE\",\n       \"category\":\"OTHER\",\"content\":\"图片上传正常\"}'\n```\n\nFile v1.0.5:references/apis/cancel-video-upload.md\n\n# cancel_video_upload\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/cancel_video_upload.py` |\n| Method / path | POST `api/v2/media/cancel_video_upload` |\n| 官方文档 | [cancel_video_upload](https://open.shopee.com/documents/v2/v2.media.cancel_video_upload?module=130&type=1) |\n| 用途 | Cancel in-progress video upload |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Cancel in-progress video upload\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/cancel_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"cancel_video_upload\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`cancelVideoUpload`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/complete-video-upload.md\n\n# complete_video_upload\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/complete_video_upload.py` |\n| Method / path | POST `api/v2/media/complete_video_upload` |\n| 官方文档 | [complete_video_upload](https://open.shopee.com/documents/v2/v2.media.complete_video_upload?module=130&type=1) |\n| 用途 | Complete video upload after all parts sent |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Complete video upload after all parts sent\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/complete_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"complete_video_upload\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`completeVideoUpload`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/get-video-upload-result.md\n\n# get_video_upload_result\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_video_upload_result.py` |\n| Method / path | GET `api/v2/media/get_video_upload_result` |\n| 官方文档 | [get_video_upload_result](https://open.shopee.com/documents/v2/v2.media.get_video_upload_result?module=130&type=1) |\n| 用途 | Query video upload result/status |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Query video upload result/status\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_video_upload_result.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"get_video_upload_result\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getVideoUploadResult`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/init-video-upload.md\n\n# init_video_upload\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/init_video_upload.py` |\n| Method / path | POST `api/v2/media/init_video_upload` |\n| 官方文档 | [init_video_upload](https://open.shopee.com/documents/v2/v2.media.init_video_upload?module=130&type=1) |\n| 用途 | Init chunked video upload session; pass body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Init chunked video upload session; pass body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/init_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"init_video_upload\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`initVideoUpload`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/upload-image.md\n\n# upload_image\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/upload_image.py` |\n| Method / path | POST `api/v2/media/upload_image` |\n| 官方文档 | [upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1) |\n| 用途 | Upload image; returns Shopee image URL |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Upload image; returns Shopee image URL\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/upload_image.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"upload_image\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`uploadImage`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/upload-video-part.md\n\n# upload_video_part\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/upload_video_part.py` |\n| Method / path | POST `api/v2/media/upload_video_part` |\n| 官方文档 | [upload_video_part](https://open.shopee.com/documents/v2/v2.media.upload_video_part?module=130&type=1) |\n| 用途 | Upload video chunk; pass body via developerProxy |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Upload video chunk; pass body via developerProxy\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/upload_video_part.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"upload_video_part\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`uploadVideoPart`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/onboarding.md\n\n# 解决认证和积分问题\n\n调用本 skill 时若网关返回 **auth** 或 **billing** 错误，走本 skill 自带的 `scripts/onboarding.py` 完成引导。\n\n**auth 场景**：`errcode=401` 或消息含 `authorized error`/`鉴权失败`/`未授权`/`unauthorized`；或 `LINKFOX_AGENT_API_KEY` 与 `LINKFOXAGENT_API_KEY` 均为空。\n1. 若已配置 key → 先让用户重启会话（最常见误判），仍失败让用户重新取 key 或换手机号重注册\n2. 未配置 → 询问：自助去 https://agent.linkfox.com/ 取 key，或提供手机号让脚本注册\n3. 手机号路径：\n   - `python scripts/onboarding.py send-code <phone>` → 展示 JSON 里的 phone/agreements\n   - 收到验证码后：`python scripts/onboarding.py login <phone> <code>`（workbuddy 宿主加 `--channel workbuddy`）\n   - 拿到 `api_key` 后把下面三平台配置转发给用户，提示重启会话生效：\n     - Windows PowerShell（永久）：`setx LINKFOX_AGENT_API_KEY \"<key>\"`\n     - macOS zsh：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.zshrc && source ~/.zshrc`\n     - Linux bash：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.bashrc && source ~/.bashrc`\n     - 变量名 `LINKFOX_AGENT_API_KEY`（主推）或 `LINKFOXAGENT_API_KEY`（老规范）任一即可\n\n**billing 场景**：`errcode=402` 或消息含 `积分/余额/quota/insufficient/充值/套餐到期`。\n- `python scripts/onboarding.py list-plans` → 有 AskUserQuestion 就弹菜单，否则输出编号清单让用户选\n- 校验 `plan_id` ∈ 清单、支付方式 ∈ 该套餐 `available_methods`（通常 `wechat/alipay`）\n- `python scripts/onboarding.py order <plan_id> <method>` → 展示优先级 PNG > `pay_url` > `ascii_qr`（标注兜底）\n- 已付款可选调 `python scripts/onboarding.py query <order_id>`，不主动轮询\n\n排除 `errcode=403`（无权限，不归入这两类）。所有子命令输出 stdout JSON，`error` 字段已含阶段前缀，透传给用户即可。完整用法：`python scripts/onboarding.py --help`。\n\nFile v1.0.5:skill-card.md\n\n## Description:\n\nShopee store media skill for uploading images and chunked videos through LinkFox's Shopee developer proxy for the Shopee Open API Media module.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal e-commerce operators and developers use this skill to upload Shopee store images and manage chunked video upload flows after selecting a shop through the companion LinkFox authentication skill.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill includes LinkFox account onboarding, API-key creation, and payment-order workflows in addition to media upload.\n\nMitigation: Install it only when those onboarding and billing helpers are expected; prefer the self-service LinkFox key flow when possible and treat API keys and SMS codes as secrets.\n\nRisk: LINKFOX_* base URL environment variables can affect which hosts receive requests.\n\nMitigation: Verify these environment variables point to trusted LinkFox hosts before running the skill.\n\nRisk: Generated linkfox response directories can retain API responses and account or payment workflow artifacts.\n\nMitigation: Keep generated response directories out of shared repositories and backups unless retaining that data is intentional.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-media)\n- [Media API reference](references/api.md)\n- [Onboarding reference](references/onboarding.md)\n- [Shopee upload_image documentation](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n- [Shopee init_video_upload documentation](https://open.shopee.com/documents/v2/v2.media.init_video_upload?module=130&type=1)\n- [Shopee upload_video_part documentation](https://open.shopee.com/documents/v2/v2.media.upload_video_part?module=130&type=1)\n- [Shopee complete_video_upload documentation](https://open.shopee.com/documents/v2/v2.media.complete_video_upload?module=130&type=1)\n- [Shopee get_video_upload_result documentation](https://open.shopee.com/documents/v2/v2.media.get_video_upload_result?module=130&type=1)\n- [Shopee cancel_video_upload documentation](https://open.shopee.com/documents/v2/v2.media.cancel_video_upload?module=130&type=1)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Shell commands, Configuration, Guidance, JSON, Files]\n\n**Output Format:** [Markdown guidance with shell commands and JSON API responses saved to files.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Complete responses are written under linkfox/<date>/<session>/data; small responses can print inline, while larger responses print summaries unless inline output is requested.]\n\n## Skill Version(s):\n\n1.0.5 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.4: 23 files, 34056 bytes\n\nFiles: references/api.md (3484b), references/apis/cancel-video-upload.md (1402b), references/apis/complete-video-upload.md (1440b), references/apis/get-video-upload-result.md (1441b), references/apis/init-video-upload.md (1412b), references/apis/upload-image.md (1361b), references/apis/upload-video-part.md (1420b), references/onboarding.md (2046b), scripts/_media_api_runner.py (4276b), scripts/_media_endpoints.py (2102b), scripts/_shopee_media_common.py (11588b), scripts/cancel_video_upload.py (730b), scripts/check_auth_dependency.py (3979b), scripts/complete_video_upload.py (742b), scripts/get_video_upload_result.py (754b), scripts/init_video_upload.py (718b), scripts/media_api.py (991b), scripts/onboarding.py (24089b), scripts/upload_image.py (688b), scripts/upload_video_part.py (718b), skill-card.md (3000b), SKILL.md (5399b), _meta.json (145b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: linkfox-shopee-store-media\ndescription: Shopee（虾皮）媒体上传 Media 模块（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Media 模块全部 6 个接口：upload_image、init_video_upload、upload_video_part、complete_video_upload、get_video_upload_result、cancel_video_upload。path 为 api/v2/media/...（module=130）。当用户提到 Shopee media 上传、v2.media.upload_image、media模块上传图片 时触发。与 media_space（module=91）接口名相同但 path 不同，按网关白名单选用。\n---\n\n# Shopee 媒体 Media\n\nShopee Open Platform **Media 模块**（6 个 API，**`api/v2/media/...`**，module=130）。**依赖 `linkfox-shopee-store-auth`** 选店；经 **`POST /shopee/developerProxy`** 传入 `shopId`（或 `merchantId`），由服务端解析 token 转发。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/media_api.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 官方参考\n\nMedia 模块索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n---\n\n## Media vs MediaSpace\n\n| Skill | path 前缀 | module |\n|-------|-----------|--------|\n| **本 skill** `linkfox-shopee-store-media` | `api/v2/media/...` | 130 |\n| `linkfox-shopee-store-media-space` | `api/v2/media_space/...` | 91 |\n\n接口名称相同（`upload_image`、`init_video_upload` 等），但 **path 前缀不同**。请按 LinkFox 网关白名单选择对应 skill。\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n## 可用脚本（6 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `upload_image.py` | upload_image | POST |\n| `init_video_upload.py` | init_video_upload | POST |\n| `upload_video_part.py` | upload_video_part | POST |\n| `complete_video_upload.py` | complete_video_upload | POST |\n| `get_video_upload_result.py` | get_video_upload_result | GET |\n| `cancel_video_upload.py` | cancel_video_upload | POST |\n| `media_api.py` | 通用入口 | — |\n\n## 接口说明（按 API）\n\n入参与响应细节放在 `references/apis/`，SKILL 只保留索引。\n\n| API | 说明文档 |\n|-----|----------|\n| `cancel_video_upload` | [references/apis/cancel-video-upload.md](./references/apis/cancel-video-upload.md) |\n| `complete_video_upload` | [references/apis/complete-video-upload.md](./references/apis/complete-video-upload.md) |\n| `get_video_upload_result` | [references/apis/get-video-upload-result.md](./references/apis/get-video-upload-result.md) |\n| `init_video_upload` | [references/apis/init-video-upload.md](./references/apis/init-video-upload.md) |\n| `upload_image` | [references/apis/upload-image.md](./references/apis/upload-image.md) |\n| `upload_video_part` | [references/apis/upload-video-part.md](./references/apis/upload-video-part.md) |\n\n模块总览 / Feedback 见 [references/api.md](./references/api.md)。\n\n## Usage Scenarios\n\n### 上传图片\n`upload_image.py` → 获取 Shopee 图片 URL → 用于 `linkfox-shopee-store-product` 的 `add_item`\n\n### 分片上传视频\n`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- MediaSpace（`api/v2/media_space/...`）→ `linkfox-shopee-store-media-space`\n- 视频发布/效果 → `linkfox-shopee-store-video`\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback:** 见 `references/api.md`。\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-media\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1786100648020\n}\n\nFile v1.0.4:references/api.md\n\n# linkfox-shopee-store-media — 参数与字段参考\n\n> 单接口入参/响应说明已拆到 **`apis/`**（按 API 一份）；本文件保留模块总览与 Feedback。\nShopee **Media 模块**全部 6 个 API，经 **`POST /shopee/developerProxy`** 转发。\n\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n> **Media vs MediaSpace**：本 skill 使用 `api/v2/media/...`（module=130）；`linkfox-shopee-store-media-space` 使用 `api/v2/media_space/...`（module=91）。接口名相同但 path 前缀不同，请按网关白名单选择。\n\n## 通用约定\n\n- **Base URL**：`https://tool-gateway.linkfox.com`\n- **path**：须 `api/v2/media/...`\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.media.{api}?module=130&type=1`\n\n---\n\n## Media 模块总览\n\n| # | API | Method | path | 脚本 | 官方文档 |\n|---|-----|--------|------|------|----------|\n| 1 | cancel_video_upload | POST | `api/v2/media/cancel_video_upload` | `cancel_video_upload.py` | [apis/cancel-video-upload.md](./apis/cancel-video-upload.md) |\n| 2 | complete_video_upload | POST | `api/v2/media/complete_video_upload` | `complete_video_upload.py` | [apis/complete-video-upload.md](./apis/complete-video-upload.md) |\n| 3 | get_video_upload_result | GET | `api/v2/media/get_video_upload_result` | `get_video_upload_result.py` | [apis/get-video-upload-result.md](./apis/get-video-upload-result.md) |\n| 4 | init_video_upload | POST | `api/v2/media/init_video_upload` | `init_video_upload.py` | [apis/init-video-upload.md](./apis/init-video-upload.md) |\n| 5 | upload_image | POST | `api/v2/media/upload_image` | `upload_image.py` | [apis/upload-image.md](./apis/upload-image.md) |\n| 6 | upload_video_part | POST | `api/v2/media/upload_video_part` | `upload_video_part.py` | [apis/upload-video-part.md](./apis/upload-video-part.md) |\n通用入口：`media_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\n\n---\n\n## 接口说明\n\n| API | 说明 |\n|-----|------|\n| `upload_image` | 上传图片，返回 Shopee 图片 URL — [apis/upload-image.md](./apis/upload-image.md) |\n| `init_video_upload` | 初始化视频分片上传 — [apis/init-video-upload.md](./apis/init-video-upload.md) |\n| `upload_video_part` | 上传视频分片 — [apis/upload-video-part.md](./apis/upload-video-part.md) |\n| `complete_video_upload` | 完成视频上传 — [apis/complete-video-upload.md](./apis/complete-video-upload.md) |\n| `get_video_upload_result` | 查询上传结果 — [apis/get-video-upload-result.md](./apis/get-video-upload-result.md) |\n| `cancel_video_upload` | 取消上传 — [apis/cancel-video-upload.md](./apis/cancel-video-upload.md) |\n\n视频分片流程：`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n---\n\n## curl 示例\n\n```bash\ncurl -X POST ${LINKFOX_TOOL_GATEWAY}/shopee/developerProxy \\\n  -H \"Authorization: $LINKFOX_AGENT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"path\": \"api/v2/media/upload_image\",\n    \"method\": \"POST\",\n    \"accessToken\": \"xxx\",\n    \"shopId\": \"67890\",\n    \"body\": \"...\"\n  }'\n```\n\n---\n\n## Feedback API\n\n```bash\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"skillName\":\"linkfox-shopee-store-media\",\"sentiment\":\"POSITIVE\",\n       \"category\":\"OTHER\",\"content\":\"图片上传正常\"}'\n```\n\nFile v1.0.4:references/apis/cancel-video-upload.md\n\n# cancel_video_upload\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/cancel_video_upload.py` |\n| Method / path | POST `api/v2/media/cancel_video_upload` |\n| 官方文档 | [cancel_video_upload](https://open.shopee.com/documents/v2/v2.media.cancel_video_upload?module=130&type=1) |\n| 用途 | Cancel in-progress video upload |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Cancel in-progress video upload\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/cancel_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"cancel_video_upload\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`cancelVideoUpload`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/complete-video-upload.md\n\n# complete_video_upload\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/complete_video_upload.py` |\n| Method / path | POST `api/v2/media/complete_video_upload` |\n| 官方文档 | [complete_video_upload](https://open.shopee.com/documents/v2/v2.media.complete_video_upload?module=130&type=1) |\n| 用途 | Complete video upload after all parts sent |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Complete video upload after all parts sent\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/complete_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"complete_video_upload\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`completeVideoUpload`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/get-video-upload-result.md\n\n# get_video_upload_result\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_video_upload_result.py` |\n| Method / path | GET `api/v2/media/get_video_upload_result` |\n| 官方文档 | [get_video_upload_result](https://open.shopee.com/documents/v2/v2.media.get_video_upload_result?module=130&type=1) |\n| 用途 | Query video upload result/status |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Query video upload result/status\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_video_upload_result.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"get_video_upload_result\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getVideoUploadResult`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/init-video-upload.md\n\n# init_video_upload\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/init_video_upload.py` |\n| Method / path | POST `api/v2/media/init_video_upload` |\n| 官方文档 | [init_video_upload](https://open.shopee.com/documents/v2/v2.media.init_video_upload?module=130&type=1) |\n| 用途 | Init chunked video upload session; pass body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Init chunked video upload session; pass body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/init_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"init_video_upload\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`initVideoUpload`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/upload-image.md\n\n# upload_image\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/upload_image.py` |\n| Method / path | POST `api/v2/media/upload_image` |\n| 官方文档 | [upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1) |\n| 用途 | Upload image; returns Shopee image URL |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Upload image; returns Shopee image URL\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/upload_image.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"upload_image\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`uploadImage`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/upload-video-part.md\n\n# upload_video_part\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/upload_video_part.py` |\n| Method / path | POST `api/v2/media/upload_video_part` |\n| 官方文档 | [upload_video_part](https://open.shopee.com/documents/v2/v2.media.upload_video_part?module=130&type=1) |\n| 用途 | Upload video chunk; pass body via developerProxy |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Upload video chunk; pass body via developerProxy\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/upload_video_part.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"upload_video_part\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`uploadVideoPart`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/onboarding.md\n\n# 解决认证和积分问题\n\n调用本 skill 时若网关返回 **auth** 或 **billing** 错误，走本 skill 自带的 `scripts/onboarding.py` 完成引导。\n\n**auth 场景**：`errcode=401` 或消息含 `authorized error`/`鉴权失败`/`未授权`/`unauthorized`；或 `LINKFOX_AGENT_API_KEY` 与 `LINKFOXAGENT_API_KEY` 均为空。\n1. 若已配置 key → 先让用户重启会话（最常见误判），仍失败让用户重新取 key 或换手机号重注册\n2. 未配置 → 询问：自助去 https://agent.linkfox.com/ 取 key，或提供手机号让脚本注册\n3. 手机号路径：\n   - `python scripts/onboarding.py send-code <phone>` → 展示 JSON 里的 phone/agreements\n   - 收到验证码后：`python scripts/onboarding.py login <phone> <code>`（workbuddy 宿主加 `--channel workbuddy`）\n   - 拿到 `api_key` 后把下面三平台配置转发给用户，提示重启会话生效：\n     - Windows PowerShell（永久）：`setx LINKFOX_AGENT_API_KEY \"<key>\"`\n     - macOS zsh：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.zshrc && source ~/.zshrc`\n     - Linux bash：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.bashrc && source ~/.bashrc`\n     - 变量名 `LINKFOX_AGENT_API_KEY`（主推）或 `LINKFOXAGENT_API_KEY`（老规范）任一即可\n\n**billing 场景**：`errcode=402` 或消息含 `积分/余额/quota/insufficient/充值/套餐到期`。\n- `python scripts/onboarding.py list-plans` → 有 AskUserQuestion 就弹菜单，否则输出编号清单让用户选\n- 校验 `plan_id` ∈ 清单、支付方式 ∈ 该套餐 `available_methods`（通常 `wechat/alipay`）\n- `python scripts/onboarding.py order <plan_id> <method>` → 展示优先级 PNG > `pay_url` > `ascii_qr`（标注兜底）\n- 已付款可选调 `python scripts/onboarding.py query <order_id>`，不主动轮询\n\n排除 `errcode=403`（无权限，不归入这两类）。所有子命令输出 stdout JSON，`error` 字段已含阶段前缀，透传给用户即可。完整用法：`python scripts/onboarding.py --help`。\n\nFile v1.0.4:skill-card.md\n\n## Description:\n\nShopee-店铺媒体 lets agents upload images and manage chunked video uploads through the Shopee Open Platform Media APIs via LinkFox.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal developers and commerce operators use this skill to call Shopee Media endpoints for image upload and chunked video upload workflows, including initialization, part upload, completion, result checking, and cancellation. It is intended for LinkFox-mediated Shopee store media operations after the related store-auth skill has selected a shop or merchant.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill can perform Shopee store media operations through LinkFox using a configured API key.\n\nMitigation: Install and run it only when you trust LinkFox for the relevant Shopee store, and review the intended shop or merchant ID before upload or cancellation commands.\n\nRisk: Onboarding helpers support phone-number login, API key generation, and payment-order creation.\n\nMitigation: Use onboarding and order commands only after explicit user intent to register, log in, retrieve an API key, or purchase credits.\n\nRisk: LINKFOX_* URL environment variables can redirect requests away from the default LinkFox hosts.\n\nMitigation: Keep LINKFOX_* URL variables pointed only at trusted LinkFox endpoints before executing media or onboarding scripts.\n\nRisk: Full API responses are saved locally and may include store, account, media, or transaction data.\n\nMitigation: Periodically review and delete local linkfox response files when they may contain sensitive information.\n\n## Reference(s):\n\n- [Skill source](artifact/SKILL.md)\n- [Media API reference](artifact/references/api.md)\n- [Onboarding and billing reference](artifact/references/onboarding.md)\n- [Shopee v2.media.upload_image documentation](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n- [LinkFox skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-media)\n- [LinkFox publisher profile](https://clawhub.ai/user/linkfox-ai)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance, files]\n\n**Output Format:** [Markdown guidance with shell commands and JSON API responses saved to files or printed to stdout.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Full API responses are written under a linkfox session data directory; small responses can print inline, while larger responses print summaries unless inline output is requested.]\n\n## Skill Version(s):\n\n1.0.4 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.3: 15 files, 17969 bytes\n\nFiles: references/api.md (3172b), scripts/_media_api_runner.py (4263b), scripts/_media_endpoints.py (2102b), scripts/_shopee_media_common.py (11402b), scripts/cancel_video_upload.py (701b), scripts/check_auth_dependency.py (3979b), scripts/complete_video_upload.py (713b), scripts/get_video_upload_result.py (725b), scripts/init_video_upload.py (689b), scripts/media_api.py (991b), scripts/upload_image.py (659b), scripts/upload_video_part.py (689b), skill-card.md (2242b), SKILL.md (5098b), _meta.json (145b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: linkfox-shopee-store-media\ndescription: Shopee（虾皮）媒体上传 Media 模块（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Media 模块全部 6 个接口：upload_image、init_video_upload、upload_video_part、complete_video_upload、get_video_upload_result、cancel_video_upload。path 为 api/v2/media/...（module=130）。当用户提到 Shopee media 上传、v2.media.upload_image、media模块上传图片 时触发。与 media_space（module=91）接口名相同但 path 不同，按网关白名单选用。\n---\n\n# Shopee 媒体 Media\n\nShopee Open Platform **Media 模块**（6 个 API，**`api/v2/media/...`**，module=130）。**依赖 `linkfox-shopee-store-auth`**：先取 `accessToken`，再经 **`POST /shopee/developerProxy`** 转发。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/media_api.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用以下措施来处理：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n### 措施\n- 优先采用skill内的 onboarding.md 引导解决问题。\n- 如找不到 onboarding.md 文件，则加载 /linkfox-onboarding 这个skill并根据它的引导来处理。如未安装请先安装：\n    - 下载 https://agent-files.linkfox.com/skills/linkfox-onboarding/release.zip，解压后安装这个skill。如需用户授权才可下载，要询问用户获得授权，你不能自己放弃下载。\n- 兜底措施：仅当前面两个措施经过所有努力都走不通时，才提示用户依据 https://skill.linkfox.com/linkfoxskills/guide.htm 指引获取API Key，或去 https://os.linkfox.com/ 补充积分。\n\n## 官方参考\n\nMedia 模块索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n---\n\n## Media vs MediaSpace\n\n| Skill | path 前缀 | module |\n|-------|-----------|--------|\n| **本 skill** `linkfox-shopee-store-media` | `api/v2/media/...` | 130 |\n| `linkfox-shopee-store-media-space` | `api/v2/media_space/...` | 91 |\n\n接口名称相同（`upload_image`、`init_video_upload` 等），但 **path 前缀不同**。请按 LinkFox 网关白名单选择对应 skill。\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n## 可用脚本（6 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `upload_image.py` | upload_image | POST |\n| `init_video_upload.py` | init_video_upload | POST |\n| `upload_video_part.py` | upload_video_part | POST |\n| `complete_video_upload.py` | complete_video_upload | POST |\n| `get_video_upload_result.py` | get_video_upload_result | GET |\n| `cancel_video_upload.py` | cancel_video_upload | POST |\n| `media_api.py` | 通用入口 | — |\n\n## Usage Scenarios\n\n### 上传图片\n`upload_image.py` → 获取 Shopee 图片 URL → 用于 `linkfox-shopee-store-product` 的 `add_item`\n\n### 分片上传视频\n`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- MediaSpace（`api/v2/media_space/...`）→ `linkfox-shopee-store-media-space`\n- 视频发布/效果 → `linkfox-shopee-store-video`\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback:** 见 `references/api.md`。\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-media\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1783945363238\n}\n\nFile v1.0.3:references/api.md\n\n# linkfox-shopee-store-media — 参数与字段参考\n\nShopee **Media 模块**全部 6 个 API，经 **`POST /shopee/developerProxy`** 转发。\n\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n> **Media vs MediaSpace**：本 skill 使用 `api/v2/media/...`（module=130）；`linkfox-shopee-store-media-space` 使用 `api/v2/media_space/...`（module=91）。接口名相同但 path 前缀不同，请按网关白名单选择。\n\n## 通用约定\n\n- **Base URL**：`https://tool-gateway.linkfox.com`\n- **path**：须 `api/v2/media/...`\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.media.{api}?module=130&type=1`\n\n---\n\n## Media 模块总览\n\n| # | API | Method | path | 脚本 | 官方文档 |\n|---|-----|--------|------|------|----------|\n| 1 | cancel_video_upload | POST | `api/v2/media/cancel_video_upload` | `cancel_video_upload.py` | [doc](https://open.shopee.com/documents/v2/v2.media.cancel_video_upload?module=130&type=1) |\n| 2 | complete_video_upload | POST | `api/v2/media/complete_video_upload` | `complete_video_upload.py` | [doc](https://open.shopee.com/documents/v2/v2.media.complete_video_upload?module=130&type=1) |\n| 3 | get_video_upload_result | GET | `api/v2/media/get_video_upload_result` | `get_video_upload_result.py` | [doc](https://open.shopee.com/documents/v2/v2.media.get_video_upload_result?module=130&type=1) |\n| 4 | init_video_upload | POST | `api/v2/media/init_video_upload` | `init_video_upload.py` | [doc](https://open.shopee.com/documents/v2/v2.media.init_video_upload?module=130&type=1) |\n| 5 | upload_image | POST | `api/v2/media/upload_image` | `upload_image.py` | [doc](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1) |\n| 6 | upload_video_part | POST | `api/v2/media/upload_video_part` | `upload_video_part.py` | [doc](https://open.shopee.com/documents/v2/v2.media.upload_video_part?module=130&type=1) |\n通用入口：`media_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\n\n---\n\n## 接口说明\n\n| API | 说明 |\n|-----|------|\n| `upload_image` | 上传图片，返回 Shopee 图片 URL |\n| `init_video_upload` | 初始化视频分片上传 |\n| `upload_video_part` | 上传视频分片 |\n| `complete_video_upload` | 完成视频上传 |\n| `get_video_upload_result` | 查询上传结果 |\n| `cancel_video_upload` | 取消上传 |\n\n视频分片流程：`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n---\n\n## curl 示例\n\n```bash\ncurl -X POST ${LINKFOX_TOOL_GATEWAY}/shopee/developerProxy \\\n  -H \"Authorization: $LINKFOX_AGENT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"path\": \"api/v2/media/upload_image\",\n    \"method\": \"POST\",\n    \"accessToken\": \"xxx\",\n    \"shopId\": \"67890\",\n    \"body\": \"...\"\n  }'\n```\n\n---\n\n## Feedback API\n\n```bash\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"skillName\":\"linkfox-shopee-store-media\",\"sentiment\":\"POSITIVE\",\n       \"category\":\"OTHER\",\"content\":\"图片上传正常\"}'\n```\n\nFile v1.0.3:skill-card.md\n\n## Description: <br>\nUploads Shopee store images and videos through LinkFox's Shopee Media module wrapper for the six Shopee v2 media endpoints. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal developers and e-commerce operators use this skill to upload Shopee store images and videos, including chunked video uploads, through LinkFox-authenticated Shopee Media API calls. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Shopee shop, token-related, media request, or media response data may be stored in local LinkFox JSON records after calls. <br>\nMitigation: Use the skill only in workspaces where generated linkfox data will not be committed, and delete saved session folders when they contain sensitive account or media data. <br>\nRisk: Shopee shop and media data is sent through LinkFox gateway endpoints to perform the advertised uploads. <br>\nMitigation: Install and run the skill only when routing this data through LinkFox is acceptable for the account, shop, and media involved. <br>\n\n\n## Reference(s): <br>\n- [Skill API Reference](references/api.md) <br>\n- [Shopee Open Platform v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1) <br>\n- [ClawHub Skill Page](https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-media) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [JSON, Files, Shell commands, Guidance] <br>\n**Output Format:** [JSON files with stdout JSON or summaries] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Full responses are saved locally under linkfox session data; small responses and --inline mode print full JSON, while larger responses print a summary.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.2: 15 files, 17432 bytes\n\nFiles: references/api.md (3172b), scripts/_media_api_runner.py (4263b), scripts/_media_endpoints.py (2102b), scripts/_shopee_media_common.py (11307b), scripts/cancel_video_upload.py (701b), scripts/check_auth_dependency.py (3979b), scripts/complete_video_upload.py (713b), scripts/get_video_upload_result.py (725b), scripts/init_video_upload.py (689b), scripts/media_api.py (991b), scripts/upload_image.py (659b), scripts/upload_video_part.py (689b), skill-card.md (2548b), SKILL.md (3964b), _meta.json (145b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: linkfox-shopee-store-media\ndescription: Shopee（虾皮）媒体上传 Media 模块（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Media 模块全部 6 个接口：upload_image、init_video_upload、upload_video_part、complete_video_upload、get_video_upload_result、cancel_video_upload。path 为 api/v2/media/...（module=130）。当用户提到 Shopee media 上传、v2.media.upload_image、media模块上传图片 时触发。与 media_space（module=91）接口名相同但 path 不同，按网关白名单选用。\n---\n\n# Shopee 媒体 Media\n\nShopee Open Platform **Media 模块**（6 个 API，**`api/v2/media/...`**，module=130）。**依赖 `linkfox-shopee-store-auth`**：先取 `accessToken`，再经 **`POST /shopee/developerProxy`** 转发。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/media_api.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 官方参考\n\nMedia 模块索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n---\n\n## Media vs MediaSpace\n\n| Skill | path 前缀 | module |\n|-------|-----------|--------|\n| **本 skill** `linkfox-shopee-store-media` | `api/v2/media/...` | 130 |\n| `linkfox-shopee-store-media-space` | `api/v2/media_space/...` | 91 |\n\n接口名称相同（`upload_image`、`init_video_upload` 等），但 **path 前缀不同**。请按 LinkFox 网关白名单选择对应 skill。\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n## 可用脚本（6 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `upload_image.py` | upload_image | POST |\n| `init_video_upload.py` | init_video_upload | POST |\n| `upload_video_part.py` | upload_video_part | POST |\n| `complete_video_upload.py` | complete_video_upload | POST |\n| `get_video_upload_result.py` | get_video_upload_result | GET |\n| `cancel_video_upload.py` | cancel_video_upload | POST |\n| `media_api.py` | 通用入口 | — |\n\n## Usage Scenarios\n\n### 上传图片\n`upload_image.py` → 获取 Shopee 图片 URL → 用于 `linkfox-shopee-store-product` 的 `add_item`\n\n### 分片上传视频\n`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- MediaSpace（`api/v2/media_space/...`）→ `linkfox-shopee-store-media-space`\n- 视频发布/效果 → `linkfox-shopee-store-video`\n\n**Feedback:** 见 `references/api.md`。\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-media\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1783337478925\n}\n\nFile v1.0.2:references/api.md\n\n# linkfox-shopee-store-media — 参数与字段参考\n\nShopee **Media 模块**全部 6 个 API，经 **`POST /shopee/developerProxy`** 转发。\n\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n> **Media vs MediaSpace**：本 skill 使用 `api/v2/media/...`（module=130）；`linkfox-shopee-store-media-space` 使用 `api/v2/media_space/...`（module=91）。接口名相同但 path 前缀不同，请按网关白名单选择。\n\n## 通用约定\n\n- **Base URL**：`https://tool-gateway.linkfox.com`\n- **path**：须 `api/v2/media/...`\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.media.{api}?module=130&type=1`\n\n---\n\n## Media 模块总览\n\n| # | API | Method | path | 脚本 | 官方文档 |\n|---|-----|--------|------|------|----------|\n| 1 | cancel_video_upload | POST | `api/v2/media/cancel_video_upload` | `cancel_video_upload.py` | [doc](https://open.shopee.com/documents/v2/v2.media.cancel_video_upload?module=130&type=1) |\n| 2 | complete_video_upload | POST | `api/v2/media/complete_video_upload` | `complete_video_upload.py` | [doc](https://open.shopee.com/documents/v2/v2.media.complete_video_upload?module=130&type=1) |\n| 3 | get_video_upload_result | GET | `api/v2/media/get_video_upload_result` | `get_video_upload_result.py` | [doc](https://open.shopee.com/documents/v2/v2.media.get_video_upload_result?module=130&type=1) |\n| 4 | init_video_upload | POST | `api/v2/media/init_video_upload` | `init_video_upload.py` | [doc](https://open.shopee.com/documents/v2/v2.media.init_video_upload?module=130&type=1) |\n| 5 | upload_image | POST | `api/v2/media/upload_image` | `upload_image.py` | [doc](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1) |\n| 6 | upload_video_part | POST | `api/v2/media/upload_video_part` | `upload_video_part.py` | [doc](https://open.shopee.com/documents/v2/v2.media.upload_video_part?module=130&type=1) |\n通用入口：`media_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\n\n---\n\n## 接口说明\n\n| API | 说明 |\n|-----|------|\n| `upload_image` | 上传图片，返回 Shopee 图片 URL |\n| `init_video_upload` | 初始化视频分片上传 |\n| `upload_video_part` | 上传视频分片 |\n| `complete_video_upload` | 完成视频上传 |\n| `get_video_upload_result` | 查询上传结果 |\n| `cancel_video_upload` | 取消上传 |\n\n视频分片流程：`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n---\n\n## curl 示例\n\n```bash\ncurl -X POST ${LINKFOX_TOOL_GATEWAY}/shopee/developerProxy \\\n  -H \"Authorization: $LINKFOX_AGENT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"path\": \"api/v2/media/upload_image\",\n    \"method\": \"POST\",\n    \"accessToken\": \"xxx\",\n    \"shopId\": \"67890\",\n    \"body\": \"...\"\n  }'\n```\n\n---\n\n## Feedback API\n\n```bash\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"skillName\":\"linkfox-shopee-store-media\",\"sentiment\":\"POSITIVE\",\n       \"category\":\"OTHER\",\"content\":\"图片上传正常\"}'\n```\n\nFile v1.0.2:skill-card.md\n\n## Description: <br>\nUploads images and handles chunked video upload workflows for Shopee Open Platform Media APIs through LinkFox gateway scripts. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal sellers, operators, and developers use this skill to upload Shopee listing media and manage the image and video upload lifecycle from agent-run Python commands. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The security scan reports suspicious handling of merchant media, tokens, and full API responses with broader local persistence than the documentation clearly scopes. <br>\nMitigation: Use the skill only in workspaces where saving merchant media responses is acceptable, and review generated linkfox data files before sharing or committing them. <br>\nRisk: Request bodies and feedback can contain sensitive store, token, or merchant information. <br>\nMitigation: Keep credentials in environment variables, avoid placing secrets in request bodies or feedback, and redact merchant identifiers before sharing outputs. <br>\nRisk: API calls consume LinkFox/Shopee credits and can create unintended repeated operations. <br>\nMitigation: Confirm the intended operation and cost before retrying, paginating, or running additional upload requests. <br>\n\n\n## Reference(s): <br>\n- [Skill API reference](references/api.md) <br>\n- [Shopee Media upload_image documentation](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1) <br>\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-media) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Shell commands, JSON, Files, Guidance] <br>\n**Output Format:** [Markdown guidance with Python command examples and JSON API responses saved to local files or printed to stdout.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Full API responses are persisted in a linkfox session data directory; large responses are summarized unless inline output is requested.] <br>\n\n## Skill Version(s): <br>\n1.0.2 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.1: 14 files, 16088 bytes\n\nFiles: references/api.md (3172b), scripts/_media_api_runner.py (4263b), scripts/_media_endpoints.py (2102b), scripts/_shopee_media_common.py (11307b), scripts/cancel_video_upload.py (701b), scripts/check_auth_dependency.py (3979b), scripts/complete_video_upload.py (713b), scripts/get_video_upload_result.py (725b), scripts/init_video_upload.py (689b), scripts/media_api.py (991b), scripts/upload_image.py (659b), scripts/upload_video_part.py (689b), SKILL.md (3964b), _meta.json (145b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: linkfox-shopee-store-media\ndescription: Shopee（虾皮）媒体上传 Media 模块（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Media 模块全部 6 个接口：upload_image、init_video_upload、upload_video_part、complete_video_upload、get_video_upload_result、cancel_video_upload。path 为 api/v2/media/...（module=130）。当用户提到 Shopee media 上传、v2.media.upload_image、media模块上传图片 时触发。与 media_space（module=91）接口名相同但 path 不同，按网关白名单选用。\n---\n\n# Shopee 媒体 Media\n\nShopee Open Platform **Media 模块**（6 个 API，**`api/v2/media/...`**，module=130）。**依赖 `linkfox-shopee-store-auth`**：先取 `accessToken`，再经 **`POST /shopee/developerProxy`** 转发。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/media_api.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 官方参考\n\nMedia 模块索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n---\n\n## Media vs MediaSpace\n\n| Skill | path 前缀 | module |\n|-------|-----------|--------|\n| **本 skill** `linkfox-shopee-store-media` | `api/v2/media/...` | 130 |\n| `linkfox-shopee-store-media-space` | `api/v2/media_space/...` | 91 |\n\n接口名称相同（`upload_image`、`init_video_upload` 等），但 **path 前缀不同**。请按 LinkFox 网关白名单选择对应 skill。\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n## 可用脚本（6 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `upload_image.py` | upload_image | POST |\n| `init_video_upload.py` | init_video_upload | POST |\n| `upload_video_part.py` | upload_video_part | POST |\n| `complete_video_upload.py` | complete_video_upload | POST |\n| `get_video_upload_result.py` | get_video_upload_result | GET |\n| `cancel_video_upload.py` | cancel_video_upload | POST |\n| `media_api.py` | 通用入口 | — |\n\n## Usage Scenarios\n\n### 上传图片\n`upload_image.py` → 获取 Shopee 图片 URL → 用于 `linkfox-shopee-store-product` 的 `add_item`\n\n### 分片上传视频\n`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- MediaSpace（`api/v2/media_space/...`）→ `linkfox-shopee-store-media-space`\n- 视频发布/效果 → `linkfox-shopee-store-video`\n\n**Feedback:** 见 `references/api.md`。\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-media\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1783067433765\n}\n\nFile v1.0.1:references/api.md\n\n# linkfox-shopee-store-media — 参数与字段参考\n\nShopee **Media 模块**全部 6 个 API，经 **`POST /shopee/developerProxy`** 转发。\n\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n> **Media vs MediaSpace**：本 skill 使用 `api/v2/media/...`（module=130）；`linkfox-shopee-store-media-space` 使用 `api/v2/media_space/...`（module=91）。接口名相同但 path 前缀不同，请按网关白名单选择。\n\n## 通用约定\n\n- **Base URL**：`https://tool-gateway.linkfox.com`\n- **path**：须 `api/v2/media/...`\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.media.{api}?module=130&type=1`\n\n---\n\n## Media 模块总览\n\n| # | API | Method | path | 脚本 | 官方文档 |\n|---|-----|--------|------|------|----------|\n| 1 | cancel_video_upload | POST | `api/v2/media/cancel_video_upload` | `cancel_video_upload.py` | [doc](https://open.shopee.com/documents/v2/v2.media.cancel_video_upload?module=130&type=1) |\n| 2 | complete_video_upload | POST | `api/v2/media/complete_video_upload` | `complete_video_upload.py` | [doc](https://open.shopee.com/documents/v2/v2.media.complete_video_upload?module=130&type=1) |\n| 3 | get_video_upload_result | GET | `api/v2/media/get_video_upload_result` | `get_video_upload_result.py` | [doc](https://open.shopee.com/documents/v2/v2.media.get_video_upload_result?module=130&type=1) |\n| 4 | init_video_upload | POST | `api/v2/media/init_video_upload` | `init_video_upload.py` | [doc](https://open.shopee.com/documents/v2/v2.media.init_video_upload?module=130&type=1) |\n| 5 | upload_image | POST | `api/v2/media/upload_image` | `upload_image.py` | [doc](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1) |\n| 6 | upload_video_part | POST | `api/v2/media/upload_video_part` | `upload_video_part.py` | [doc](https://open.shopee.com/documents/v2/v2.media.upload_video_part?module=130&type=1) |\n通用入口：`media_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\n\n---\n\n## 接口说明\n\n| API | 说明 |\n|-----|------|\n| `upload_image` | 上传图片，返回 Shopee 图片 URL |\n| `init_video_upload` | 初始化视频分片上传 |\n| `upload_video_part` | 上传视频分片 |\n| `complete_video_upload` | 完成视频上传 |\n| `get_video_upload_result` | 查询上传结果 |\n| `cancel_video_upload` | 取消上传 |\n\n视频分片流程：`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n---\n\n## curl 示例\n\n```bash\ncurl -X POST ${LINKFOX_TOOL_GATEWAY}/shopee/developerProxy \\\n  -H \"Authorization: $LINKFOX_AGENT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"path\": \"api/v2/media/upload_image\",\n    \"method\": \"POST\",\n    \"accessToken\": \"xxx\",\n    \"shopId\": \"67890\",\n    \"body\": \"...\"\n  }'\n```\n\n---\n\n## Feedback API\n\n```bash\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"skillName\":\"linkfox-shopee-store-media\",\"sentiment\":\"POSITIVE\",\n       \"category\":\"OTHER\",\"content\":\"图片上传正常\"}'\n```\n\nArchive v1.0.0: 14 files, 16071 bytes\n\nFiles: references/api.md (3173b), scripts/_media_api_runner.py (4263b), scripts/_media_endpoints.py (2102b), scripts/_shopee_media_common.py (11308b), scripts/cancel_video_upload.py (701b), scripts/check_auth_dependency.py (3979b), scripts/complete_video_upload.py (713b), scripts/get_video_upload_result.py (725b), scripts/init_video_upload.py (689b), scripts/media_api.py (991b), scripts/upload_image.py (659b), scripts/upload_video_part.py (689b), SKILL.md (3964b), _meta.json (145b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: linkfox-shopee-store-media\ndescription: Shopee（虾皮）媒体上传 Media 模块（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Media 模块全部 6 个接口：upload_image、init_video_upload、upload_video_part、complete_video_upload、get_video_upload_result、cancel_video_upload。path 为 api/v2/media/...（module=130）。当用户提到 Shopee media 上传、v2.media.upload_image、media模块上传图片 时触发。与 media_space（module=91）接口名相同但 path 不同，按网关白名单选用。\n---\n\n# Shopee 媒体 Media\n\nShopee Open Platform **Media 模块**（6 个 API，**`api/v2/media/...`**，module=130）。**依赖 `linkfox-shopee-store-auth`**：先取 `accessToken`，再经 **`POST /shopee/developerProxy`** 转发。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/media_api.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 官方参考\n\nMedia 模块索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n---\n\n## Media vs MediaSpace\n\n| Skill | path 前缀 | module |\n|-------|-----------|--------|\n| **本 skill** `linkfox-shopee-store-media` | `api/v2/media/...` | 130 |\n| `linkfox-shopee-store-media-space` | `api/v2/media_space/...` | 91 |\n\n接口名称相同（`upload_image`、`init_video_upload` 等），但 **path 前缀不同**。请按 LinkFox 网关白名单选择对应 skill。\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n## 可用脚本（6 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `upload_image.py` | upload_image | POST |\n| `init_video_upload.py` | init_video_upload | POST |\n| `upload_video_part.py` | upload_video_part | POST |\n| `complete_video_upload.py` | complete_video_upload | POST |\n| `get_video_upload_result.py` | get_video_upload_result | GET |\n| `cancel_video_upload.py` | cancel_video_upload | POST |\n| `media_api.py` | 通用入口 | — |\n\n## Usage Scenarios\n\n### 上传图片\n`upload_image.py` → 获取 Shopee 图片 URL → 用于 `linkfox-shopee-store-product` 的 `add_item`\n\n### 分片上传视频\n`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- MediaSpace（`api/v2/media_space/...`）→ `linkfox-shopee-store-media-space`\n- 视频发布/效果 → `linkfox-shopee-store-video`\n\n**Feedback:** 见 `references/api.md`。\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-media\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1783003948189\n}\n\nFile v1.0.0:references/api.md\n\n# linkfox-shopee-store-media — 参数与字段参考\n\nShopee **Media 模块**全部 6 个 API，经 **`POST /shopee/developerProxy`** 转发。\n\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n> **Media vs MediaSpace**：本 skill 使用 `api/v2/media/...`（module=130）；`linkfox-shopee-store-media-space` 使用 `api/v2/media_space/...`（module=91）。接口名相同但 path 前缀不同，请按网关白名单选择。\n\n## 通用约定\n\n- **Base URL**：`https://tool-gateway.linkfox.com`\n- **path**：须 `api/v2/media/...`\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.media.{api}?module=130&type=1`\n\n---\n\n## Media 模块总览\n\n| # | API | Method | path | 脚本 | 官方文档 |\n|---|-----|--------|------|------|----------|\n| 1 | cancel_video_upload | POST | `api/v2/media/cancel_video_upload` | `cancel_video_upload.py` | [doc](https://open.shopee.com/documents/v2/v2.media.cancel_video_upload?module=130&type=1) |\n| 2 | complete_video_upload | POST | `api/v2/media/complete_video_upload` | `complete_video_upload.py` | [doc](https://open.shopee.com/documents/v2/v2.media.complete_video_upload?module=130&type=1) |\n| 3 | get_video_upload_result | GET | `api/v2/media/get_video_upload_result` | `get_video_upload_result.py` | [doc](https://open.shopee.com/documents/v2/v2.media.get_video_upload_result?module=130&type=1) |\n| 4 | init_video_upload | POST | `api/v2/media/init_video_upload` | `init_video_upload.py` | [doc](https://open.shopee.com/documents/v2/v2.media.init_video_upload?module=130&type=1) |\n| 5 | upload_image | POST | `api/v2/media/upload_image` | `upload_image.py` | [doc](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1) |\n| 6 | upload_video_part | POST | `api/v2/media/upload_video_part` | `upload_video_part.py` | [doc](https://open.shopee.com/documents/v2/v2.media.upload_video_part?module=130&type=1) |\n通用入口：`media_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\n\n---\n\n## 接口说明\n\n| API | 说明 |\n|-----|------|\n| `upload_image` | 上传图片，返回 Shopee 图片 URL |\n| `init_video_upload` | 初始化视频分片上传 |\n| `upload_video_part` | 上传视频分片 |\n| `complete_video_upload` | 完成视频上传 |\n| `get_video_upload_result` | 查询上传结果 |\n| `cancel_video_upload` | 取消上传 |\n\n视频分片流程：`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n---\n\n## curl 示例\n\n```bash\ncurl -X POST ${LINKFOX_AGENT_API_URL}/shopee/developerProxy \\\n  -H \"Authorization: $LINKFOX_AGENT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"path\": \"api/v2/media/upload_image\",\n    \"method\": \"POST\",\n    \"accessToken\": \"xxx\",\n    \"shopId\": \"67890\",\n    \"body\": \"...\"\n  }'\n```\n\n---\n\n## Feedback API\n\n```bash\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"skillName\":\"linkfox-shopee-store-media\",\"sentiment\":\"POSITIVE\",\n       \"category\":\"OTHER\",\"content\":\"图片上传正常\"}'\n```","readmeExcerpt":"Skill: Shopee-店铺媒体 Owner: linkfox-ai Summary: Shopee（虾皮）媒体上传 Media 模块（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Media 模块全部 6 个接口：upload_image、init_video_upload、upload_video_part、complete_video_upload、get_video_upload_result、cancel_video_upload。path 为 api/v2/media/...（module=130）。当用户提到 Shopee media 上传、v2.media.upload_image、media模块上传图片 时触发。与 media_space（module=91）接口名相同但 path 不同，按网关白名单","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"curl -X POST ${LINKFOX_TOOL_GATEWAY}/shopee/developerProxy \\\n  -H \"Authorization: $LINKFOX_AGENT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{"},{"language":"bash","snippet":"curl -X POST ${LINKFOX_TOOL_GATEWAY}/shopee/developerProxy \\\n  -H \"Authorization: $LINKFOX_AGENT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"path\": \"api/v2/media/upload_image\",\n    \"method\": \"POST\",\n    \"accessToken\": \"xxx\",\n    \"shopId\": \"67890\",\n    \"body\": \"...\"\n  }'"},{"language":"bash","snippet":"curl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"skillName\":\"linkfox-shopee-store-media\",\"sentiment\":\"POSITIVE\","},{"language":"bash","snippet":"curl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"skillName\":\"linkfox-shopee-store-media\",\"sentiment\":\"POSITIVE\",\n       \"category\":\"OTHER\",\"content\":\"图片上传正常\"}'"},{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/cancel_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"cancel_video_upload\", \"shopId\": \"67890\"}'"},{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/complete_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"complete_video_upload\", \"shopId\": \"67890\"}'"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: linkfox-shopee-store-media\ndescription: Shopee（虾皮）媒体上传 Media 模块（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Media 模块全部 6 个接口：upload_image、init_video_upload、upload_video_part、complete_video_upload、get_video_upload_result、cancel_video_upload。path 为 api/v2/media/...（module=130）。当用户提到 Shopee media 上传、v2.media.upload_image、media模块上传图片 时触发。与 media_space（module=91）接口名相同但 path 不同，按网关白名单选用。\n---\n\n# Shopee 媒体 Media\n\nShopee Open Platform **Media 模块**（6 个 API，**`api/v2/media/...`**，module=130）。**依赖 `linkfox-shopee-store-auth`** 选店；经 **`POST /shopee/developerProxy`** 传入 `shopId`（或 `merchantId`），由服务端解析 token 转发。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/media_api.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗算力；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和算力问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示算力或余额不足**：消息含\"算力余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 官方参考\n\nMedia 模块索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n---\n\n## Media vs MediaSpace\n\n| Skill | path 前缀 | module |\n|-------|-----------|--------|\n| **本 skill** `linkfox-shopee-store-media` | `api/v2/media/...` | 130 |\n| `linkfox-shopee-store-media-space` | `api/v2/media_space/...` | 91 |\n\n接口名称相同（`upload_image`、`init_video_upload` 等），但 **path 前缀不同**。请按 LinkFox 网关白名单选择对应 skill。\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n## 可用脚本（6 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `upload_image.py` | upload_image | POST |\n| `init_video_upload.py` | init_video_upload | POST |\n| `upload_video_part.py` | upload_video_part | POST |\n| `complete_video_upload.py` | complete_video_upload | POST |\n| `get_video_upload_result.py` | get_video_upload_result | GET |\n| `cancel_video_upload.py` | cancel_video_upload | POST |\n| `media_api.py` | 通用入口 | — |\n\n## 接口说明（按 API）\n\n入参与响应细节放在 `references/apis/`，SKILL 只保留索引。\n\n| API | 说明文档 |\n|-----|----------|\n| `cancel_video_upload` | [references/apis/cancel-video-upload.md](./references/apis/cancel-video-upload.md) |\n| `complete_video_upload` | [references/apis/complete-video-upload.md](./references/apis/complete-video-upload.md) |\n| `get_video_uplo"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-media\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1789363730626\n}"},{"path":"references/api.md","content":"# linkfox-shopee-store-media — 参数与字段参考\n\n> 单接口入参/响应说明已拆到 **`apis/`**（按 API 一份）；本文件保留模块总览与 Feedback。\nShopee **Media 模块**全部 6 个 API，经 **`POST /shopee/developerProxy`** 转发。\n\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.media.upload_image](https://open.shopee.com/documents/v2/v2.media.upload_image?module=130&type=1)\n\n> **Media vs MediaSpace**：本 skill 使用 `api/v2/media/...`（module=130）；`linkfox-shopee-store-media-space` 使用 `api/v2/media_space/...`（module=91）。接口名相同但 path 前缀不同，请按网关白名单选择。\n\n## 通用约定\n\n- **Base URL**：`https://tool-gateway.linkfox.com`\n- **path**：须 `api/v2/media/...`\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.media.{api}?module=130&type=1`\n\n---\n\n## Media 模块总览\n\n| # | API | Method | path | 脚本 | 官方文档 |\n|---|-----|--------|------|------|----------|\n| 1 | cancel_video_upload | POST | `api/v2/media/cancel_video_upload` | `cancel_video_upload.py` | [apis/cancel-video-upload.md](./apis/cancel-video-upload.md) |\n| 2 | complete_video_upload | POST | `api/v2/media/complete_video_upload` | `complete_video_upload.py` | [apis/complete-video-upload.md](./apis/complete-video-upload.md) |\n| 3 | get_video_upload_result | GET | `api/v2/media/get_video_upload_result` | `get_video_upload_result.py` | [apis/get-video-upload-result.md](./apis/get-video-upload-result.md) |\n| 4 | init_video_upload | POST | `api/v2/media/init_video_upload` | `init_video_upload.py` | [apis/init-video-upload.md](./apis/init-video-upload.md) |\n| 5 | upload_image | POST | `api/v2/media/upload_image` | `upload_image.py` | [apis/upload-image.md](./apis/upload-image.md) |\n| 6 | upload_video_part | POST | `api/v2/media/upload_video_part` | `upload_video_part.py` | [apis/upload-video-part.md](./apis/upload-video-part.md) |\n通用入口：`media_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\n\n---\n\n## 接口说明\n\n| API | 说明 |\n|-----|------|\n| `upload_image` | 上传图片，返回 Shopee 图片 URL — [apis/upload-image.md](./apis/upload-image.md) |\n| `init_video_upload` | 初始化视频分片上传 — [apis/init-video-upload.md](./apis/init-video-upload.md) |\n| `upload_video_part` | 上传视频分片 — [apis/upload-video-part.md](./apis/upload-video-part.md) |\n| `complete_video_upload` | 完成视频上传 — [apis/complete-video-upload.md](./apis/complete-video-upload.md) |\n| `get_video_upload_result` | 查询上传结果 — [apis/get-video-upload-result.md](./apis/get-video-upload-result.md) |\n| `cancel_video_upload` | 取消上传 — [apis/cancel-video-upload.md](./apis/cancel-video-upload.md) |\n\n视频分片流程：`init_video_upload` → `upload_video_part`(×N) → `complete_video_upload` → `get_video_upload_result`\n\n---\n\n## curl 示例\n\n```bash\ncurl -X POST ${LINKFOX_TOOL_GATEWAY}/shopee/developerProxy \\\n  -H \"Authorization: $LINKFOX_AGENT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"path\": \"api/v2/media/upload_image\",\n    \"method\": \"POST\",\n    \"accessToken\": \"xxx\",\n    \"shopId\": \"67890\",\n    \"body\": \"...\"\n  }'\n```\n\n---\n\n## Feedback API\n\n```bash\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"skillName\":\"linkfox-sh"},{"path":"references/apis/cancel-video-upload.md","content":"# cancel_video_upload\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/cancel_video_upload.py` |\n| Method / path | POST `api/v2/media/cancel_video_upload` |\n| 官方文档 | [cancel_video_upload](https://open.shopee.com/documents/v2/v2.media.cancel_video_upload?module=130&type=1) |\n| 用途 | Cancel in-progress video upload |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Cancel in-progress video upload\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/cancel_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"cancel_video_upload\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`cancelVideoUpload`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准"},{"path":"references/apis/complete-video-upload.md","content":"# complete_video_upload\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/complete_video_upload.py` |\n| Method / path | POST `api/v2/media/complete_video_upload` |\n| 官方文档 | [complete_video_upload](https://open.shopee.com/documents/v2/v2.media.complete_video_upload?module=130&type=1) |\n| 用途 | Complete video upload after all parts sent |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Complete video upload after all parts sent\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/complete_video_upload.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/media_api.py '{\"api\": \"complete_video_upload\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`completeVideoUpload`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1022,"uniquenessScore":33,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T22:13:07.624Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T22:13:07.624Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-13T00:46:36.423Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}