{"id":"604206bd-0016-4977-9f09-21aeed55c1b8","entityType":"agent","slug":"clawhub-linkfox-ai-linkfox-amazon-store-feeds","name":"亚马逊-店铺数据上传","canonicalUrl":"https://www.xpersona.co/agent/clawhub-linkfox-ai-linkfox-amazon-store-feeds","canonicalPath":"/agent/clawhub-linkfox-ai-linkfox-amazon-store-feeds","generatedAt":"2026-10-10T11:51:27.839Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T09:03:46.175Z","emptyReason":null},"description":"亚马逊店铺 Feed 批量数据提交与处理状态管理。用于创建 Feed 文档、向预签名地址上传 Feed 内容、提交库存或 Listing 等批量文件、查询或列出 Feed、获取结果文档以及取消 Feed。用户提到亚马逊 Feed、批量更新库存或商品、提交 Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、Feed 处理状态、Feed 结果、取消 Feed、Feeds API 时触发。即使未明确说“Feed”，只要希望通过亚马逊 SP-API 批量提交结构化商品或库存数据，也应触发此技能；单个 Listing 的增删改查使用 linkfox-amazon-store-listings。 Skill: 亚马逊-店铺数据上传 Owner: linkfox-ai Summary: 亚马逊店铺 Feed 批量数据提交与处理状态管理。用于创建 Feed 文档、向预签名地址上传 Feed 内容、提交库存或 Listing 等批量文件、查询或列出 Feed、获取结果文档以及取消 Feed。用户提到亚马逊 Feed、批量更新库存或商品、提交 Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、Feed 处理状态、Feed 结果、取消 Feed、Feeds API 时触发。即使未明确说“Feed”，只要希望通过亚马逊 SP-API 批量提交结构化商品或库存数据，也应触发此技能；单个 Listing 的增删改查使用 linkfox-amazon-store-listings。 Tags: latest:1.0.8 Version history: v1.0.8 |","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.5K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-amazon-store-feeds","sourceUrl":"https://clawhub.ai/linkfox-ai/linkfox-amazon-store-feeds","homepage":"https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-feeds","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/linkfox-ai/linkfox-amazon-store-feeds","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-feeds","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":64,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"亚马逊店铺 Feed 批量数据提交与处理状态管理。用于创建 Feed 文档、向预签名地址上传 Feed 内容、提交库存或 Listing 等批量文件、查询或列出 Feed、获取结果文档以及取消 Feed。用户提到亚马逊 Feed、批量更新库存或商品、提交 Listing Feed、POST_FLAT_FILE、feed"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T09:03:46.175Z","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-10T09:03:46.175Z","emptyReason":null},"stars":null,"forks":null,"downloads":1539,"packageName":null,"latestVersion":"1.0.8","tractionLabel":"1.5K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T09:03:46.175Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T09:03:46.175Z","lastCrawledAt":"2026-10-10T09:03:46.175Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T09:03:46.175Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.8","createdAt":"2026-09-14T04:57:01.950Z","changelog":"Update from 1.0.7 to 1.0.8","fileCount":15,"zipByteSize":31865},{"version":"1.0.7","createdAt":"2026-08-14T14:45:32.620Z","changelog":"Update from 1.0.6 to 1.0.7","fileCount":15,"zipByteSize":30645},{"version":"1.0.6","createdAt":"2026-08-07T10:42:03.917Z","changelog":"Update from 1.0.5 to 1.0.6","fileCount":15,"zipByteSize":30701},{"version":"1.0.5","createdAt":"2026-07-13T12:04:51.289Z","changelog":"Update from 1.0.4 to 1.0.5","fileCount":13,"zipByteSize":22239},{"version":"1.0.4","createdAt":"2026-07-06T11:12:22.996Z","changelog":"Update from 1.0.3 to 1.0.4","fileCount":13,"zipByteSize":21517},{"version":"1.0.3","createdAt":"2026-07-03T08:11:45.675Z","changelog":"Update from 1.0.2 to 1.0.3","fileCount":12,"zipByteSize":20105},{"version":"1.0.2","createdAt":"2026-07-03T04:36:55.410Z","changelog":"Update from 1.0.1 to 1.0.2","fileCount":12,"zipByteSize":20130},{"version":"1.0.1","createdAt":"2026-06-29T09:45:01.883Z","changelog":"Update from 0.0.1 to 1.0.1","fileCount":14,"zipByteSize":25481}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-amazon-store-feeds","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"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-amazon-store-feeds/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-feeds/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-feeds/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-feeds/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-feeds/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-feeds/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-10T11:51:27.836Z"}},"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-amazon-store-feeds/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-feeds/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-feeds/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-feeds/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":"high","updatedAt":"2026-10-10T09:03:46.175Z","emptyReason":null},"readme":"Skill: 亚马逊-店铺数据上传\n\nOwner: linkfox-ai\n\nSummary: 亚马逊店铺 Feed 批量数据提交与处理状态管理。用于创建 Feed 文档、向预签名地址上传 Feed 内容、提交库存或 Listing 等批量文件、查询或列出 Feed、获取结果文档以及取消 Feed。用户提到亚马逊 Feed、批量更新库存或商品、提交 Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、Feed 处理状态、Feed 结果、取消 Feed、Feeds API 时触发。即使未明确说“Feed”，只要希望通过亚马逊 SP-API 批量提交结构化商品或库存数据，也应触发此技能；单个 Listing 的增删改查使用 linkfox-amazon-store-listings。\n\nTags: latest:1.0.8\n\nVersion history:\n\nv1.0.8 | 2026-09-14T04:57:01.950Z | user\n\nUpdate from 1.0.7 to 1.0.8\n\nv1.0.7 | 2026-08-14T14:45:32.620Z | user\n\nUpdate from 1.0.6 to 1.0.7\n\nv1.0.6 | 2026-08-07T10:42:03.917Z | user\n\nUpdate from 1.0.5 to 1.0.6\n\nv1.0.5 | 2026-07-13T12:04:51.289Z | user\n\nUpdate from 1.0.4 to 1.0.5\n\nv1.0.4 | 2026-07-06T11:12:22.996Z | user\n\nUpdate from 1.0.3 to 1.0.4\n\nv1.0.3 | 2026-07-03T08:11:45.675Z | user\n\nUpdate from 1.0.2 to 1.0.3\n\nv1.0.2 | 2026-07-03T04:36:55.410Z | user\n\nUpdate from 1.0.1 to 1.0.2\n\nv1.0.1 | 2026-06-29T09:45:01.883Z | user\n\nUpdate from 0.0.1 to 1.0.1\n\nv0.0.1 | 2026-05-20T07:03:33.339Z | user\n\nInitial release\n\nArchive index:\n\nArchive v1.0.8: 15 files, 31865 bytes\n\nFiles: references/api.md (3989b), references/onboarding.md (1999b), scripts/_spapi_feeds_common.py (12512b), scripts/cancel_feed.py (1411b), scripts/check_auth_dependency.py (6074b), scripts/create_feed_document.py (1828b), scripts/create_feed.py (2626b), scripts/get_feed_document.py (1966b), scripts/get_feed.py (1460b), scripts/get_feeds.py (2811b), scripts/onboarding.py (24027b), scripts/upload_feed_document.py (3271b), skill-card.md (3140b), SKILL.md (8765b), _meta.json (145b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: linkfox-amazon-store-feeds\ndescription: 亚马逊店铺 Feed 批量数据提交与处理状态管理。用于创建 Feed 文档、向预签名地址上传 Feed 内容、提交库存或 Listing 等批量文件、查询或列出 Feed、获取结果文档以及取消 Feed。用户提到亚马逊 Feed、批量更新库存或商品、提交 Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、Feed 处理状态、Feed 结果、取消 Feed、Feeds API 时触发。即使未明确说“Feed”，只要希望通过亚马逊 SP-API 批量提交结构化商品或库存数据，也应触发此技能；单个 Listing 的增删改查使用 linkfox-amazon-store-listings。\n---\n\n# Amazon 店铺 Feeds\n\n本 skill 与 **`linkfox-amazon-store-auth`** 等同属 **Amazon Store** 系列：依赖 **`linkfox-amazon-store-auth`** 选店（`sellerId`+`region`）；直接 **`POST /spApi/developerProxy`** 传入 `sellerId`+`region`，由服务端解析 token（勿传 `amzAccessToken`，除非兼容旧调用）。转发 **GET / POST / DELETE**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗算力；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-feeds-<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\n| 能力 | 文档 |\n|------|------|\n| createFeedDocument | [createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) |\n| getFeedDocument | [getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) |\n| createFeed | [createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed) |\n| getFeed | [getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed) |\n| getFeeds | [getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds) |\n| cancelFeed | [cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) |\n\n---\n\n## Prerequisites\n\n1. 依赖 **`linkfox-amazon-store-auth`**；运行 `python scripts/check_auth_dependency.py`，exit **42** 时需先安装授权 skill。\n2. 应用需具备 **Feeds** 相关角色；`feedType` 须与上传文件格式匹配（见 Amazon Feed Type Values 文档）。\n\n---\n\n## 典型工作流\n\n1. **`create_feed_document.py`** → 得到 `feedDocumentId` 与 **`url`**（上传地址）。\n2. **`upload_feed_document.py`** → 对 `url` **PUT** 上传 feed 文件（**不经** developerProxy）。\n3. **`create_feed.py`** → 传入 `inputFeedDocumentId`、`feedType`、`marketplaceIds`。\n4. **`get_feed.py`** / **`get_feeds.py`** → 轮询 `processingStatus`（如 IN_QUEUE、IN_PROGRESS、DONE、FATAL）。\n5. 处理完成后用 **`get_feed_document.py`** 下载 **resultFeedDocumentId** 对应文档（再按返回 URL 自行下载结果文件）。\n\n---\n\n## Current Capabilities\n\n| 能力 | path | method | 脚本 |\n|------|------|--------|------|\n| createFeedDocument | `feeds/2021-06-30/documents` | POST | `create_feed_document.py` |\n| getFeedDocument | `feeds/2021-06-30/documents/{feedDocumentId}` | GET | `get_feed_document.py` |\n| createFeed | `feeds/2021-06-30/feeds` | POST | `create_feed.py` |\n| getFeed | `feeds/2021-06-30/feeds/{feedId}` | GET | `get_feed.py` |\n| getFeeds | `feeds/2021-06-30/feeds` | GET | `get_feeds.py` |\n| cancelFeed | `feeds/2021-06-30/feeds/{feedId}` | DELETE | `cancel_feed.py` |\n| 上传文档内容 | createFeedDocument 返回的 URL | PUT | `upload_feed_document.py` |\n\n共享模块：**`_spapi_feeds_common.py`**。\n\n---\n\n## Scripts 示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/create_feed_document.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\"}'\n\npython scripts/upload_feed_document.py '{\"uploadUrl\":\"<from createFeedDocument>\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\",\"filePath\":\"./inventory.tsv\"}'\n\npython scripts/create_feed.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"feedType\":\"POST_FLAT_FILE_INVLOADER_DATA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"inputFeedDocumentId\":\"<feedDocumentId>\"}'\n```\n\n---\n\n## Display Rules\n\n1. 先看 **`developerProxy.errcode` / `httpStatus`**；createFeedDocument 常为 **201**，createFeed 常为 **202**。\n2. **getFeeds** 分页：仅用上一页 **`nextToken`** 作为下一请求的 **`paginationToken` 参数名在 Amazon 侧为 `nextToken`**（脚本字段名 `nextToken`）。\n3. **upload** 失败与 SP-API 网关无关，检查 `uploadUrl` 是否过期、**Content-Type** 是否与 createFeedDocument 一致。\n4. 网关 path 白名单需包含 **`feeds/2021-06-30/`** 前缀。\n\n---\n\n## Important Limitations\n\n- 本 skill **不**代替 Amazon 侧 feed 文件 schema 校验；`feedType`、TSV/XML 格式以官方为准。\n- 下载 **getFeedDocument** 返回的 **url** 内容需另行 HTTP GET（与 upload 类似，不经 developerProxy）。\n- 详见 **`references/api.md`**。\n\n## Amazon SP-API 接口保护与重试指引\n\n同一店铺连续收到 Amazon SP-API 的 400、403、404 或 429 时，网关会返回 450、453、454 或 459 并短暂冷却。这些自定义状态码不是 Amazon 原生状态，也不表示封号；目的是避免持续异常或高频调用扩大店铺风险。\n\n| 状态与 message | 范围 | 触发与冷却 | 处理 |\n|---|---|---|---|\n| `450`：`400，请求异常，请优化您的参数` | 店铺+接口 | 60 秒内超过 3 次：5 分钟；10 分钟内超过 4 次：20 分钟 | 停止原参数重试，检查必填字段、marketplace、ID、日期和请求体 |\n| `453`：`403，店铺未授权，请先授权` | 店铺全部接口 | 60 秒内超过 2 次：5 分钟；10 分钟内超过 4 次：30 分钟 | 停止该店铺调用，检查授权、权限、店铺归属和区域 |\n| `454`：`404，资源不存在，请优化您的参数` | 店铺+接口 | 60 秒内超过 3 次：5 分钟；10 分钟内超过 4 次：30 分钟 | 确认资源 ID、所属店铺/站点、资源状态和接口路径 |\n| `459`：`429限流中，请降低频率` | 店铺+接口 | 首次：15 秒；2 分钟内超过 2 次：30 秒；3 分钟内超过 4 次：2 分钟 | 降低并发、分页和轮询频率并逐级退避 |\n\n- 立即停止自动或并发重试，不得通过换脚本或重复创建任务绕过保护；优先遵循 `retryAfter`、`blockedUntil`，没有时按表中时长说明。\n- 450/453/454 必须先修正参数、授权或资源标识，冷却后最多谨慎重试一次；再次触发则停止调用。453 期间停止该店铺全部 SP-API。\n- 保留已有 `reportId`、`feedId` 等任务 ID；写操作结果不确定时先查询状态，不直接重放。\n- 向用户先说明店铺保护，再给原因、处理和等待时间。可回复：“为保护您的亚马逊店铺安全，检测到 Amazon SP-API 连续返回{原因}，当前已进入短暂保护。请先{处理动作}，预计{等待时间}后再试；这不代表封号，也不是套餐或算力限制。”不要只说“LinkFox 限流”或“服务器繁忙”。\n\n## 算力消耗规则\n\n不消耗算力。\n\n**Feedback：** `skillName`：`linkfox-amazon-store-feeds`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-feeds\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1789361821950\n}\n\nFile v1.0.8:references/api.md\n\n# linkfox-amazon-store-feeds — API 参考（Feeds v2021-06-30）\n\n## 1. 调用链\n\n| 步骤 | 端点 | 说明 |\n|------|------|------|\n| 1 | `POST {BASE}/spApi/storeTokens` | `{\"sellerId\",\"region\"}` → `accessToken` |\n| 2 | `POST {BASE}/spApi/developerProxy` | 转发 SP-API（除文档上传/下载 URL 外） |\n\n环境变量：`LINKFOX_AGENT_API_KEY`（或 `LINKFOXAGENT_API_KEY`，必填）（如未配置 按 SKILL.md 的 **## 解决认证和算力问题** 处理）；`LINKFOX_TOOL_GATEWAY`（可选，默认 `https://tool-gateway.linkfox.com`，回退 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`）。\n\n### developerProxy Body\n\n| 字段 | 说明 |\n|------|------|\n| region | NA / EU / FE |\n| path | 如 `feeds/2021-06-30/feeds`，无前导 `/` |\n| method | GET / POST / DELETE |\n| amzAccessToken | storeTokens 返回值 |\n| queryString | 无 `?` 前缀 |\n| body | POST 时为 JSON 字符串 |\n| contentType | 一般 `application/json` |\n\n网关响应：`errcode`、`httpStatus`、`body`（字符串）。成功 HTTP 可能为 **200 / 201 / 202 / 204**。\n\n---\n\n## 2. 脚本入参摘要\n\n### 公共\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| sellerId | 是 | 卖家 ID |\n| region | 是 | 区域 |\n| skipDepCheck | 否 | 跳过本地 auth 探测 |\n\n### create_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| contentType | 是 | 与将要上传的文件 MIME 一致，如 `text/tab-separated-values; charset=UTF-8` |\n\n解析字段：**`feedDocument`**（含 `feedDocumentId`、`url` 等，以 Amazon 为准）。\n\n### upload_feed_document.py（不经 developerProxy）\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| uploadUrl | 是 | createFeedDocument 返回的 `url` |\n| contentType | 是 | 与 createFeedDocument 相同 |\n| filePath | 三选一 | 本地文件路径 |\n| content | 三选一 | UTF-8 字符串内容 |\n| contentBase64 | 三选一 | Base64 编码内容 |\n\n### create_feed.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedType | 是 | 如 `POST_FLAT_FILE_INVLOADER_DATA` |\n| marketplaceIds | 是 | 1～25 个站点 ID |\n| inputFeedDocumentId | 是 | 已上传内容的文档 ID |\n| feedOptions | 否 | 因 feedType 而异的对象 |\n\n### get_feed.py / cancel_feed.py\n\n| 字段 | 必填 |\n|------|------|\n| feedId | 是 |\n\n### get_feeds.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedTypes | 条件 | 与 nextToken 二选一；最多 10 个 |\n| nextToken | 条件 | 分页时**单独**传此参数 |\n| marketplaceIds | 否 | 最多 10 个 |\n| processingStatuses | 否 | CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE |\n| createdSince / createdUntil | 否 | ISO 8601 |\n| pageSize | 否 | 1～100，默认 10 |\n\n### get_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedDocumentId | 是 | |\n| enableContentEncodingUrlHeader | 否 | boolean；GZIP 时便于客户端自动解压 |\n\n---\n\n## 3. Feed 标准流程\n\n```text\ncreateFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url\n```\n\n---\n\n## 4. 常见 feedType（示例）\n\n以 [Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) 为准，例如：\n\n- `POST_PRODUCT_DATA` / `POST_INVENTORY_AVAILABILITY_DATA`\n- `POST_FLAT_FILE_INVLOADER_DATA`\n- `POST_ORDER_FULFILLMENT_DATA`\n\n---\n\n## 5. 错误与限制\n\n- **401**：HTTP 401 或 authorized error：按 SKILL.md 的 **## 解决认证和算力问题** 处理。\n- **402**：HTTP 402：按 SKILL.md 的 **## 解决认证和算力问题** 处理。\n- **403**：权限或 feedType 未授权。\n- **1005**（网关）：path 未在白名单，需放行 `feeds/2021-06-30/`。\n- **429**：降频；getFeeds 等有独立 usage plan。\n- 上传 URL 有时效，过期需重新 createFeedDocument。\n\n---\n\n## 6. Feedback\n\n上报问题时注明 **`skillName`: `linkfox-amazon-store-feeds`**，并附 `developerProxy` JSON（脱敏）。\n\nFile v1.0.8: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.8:skill-card.md\n\n## Description:\n\nHelps agents manage Amazon store Feed workflows for bulk inventory or listing data, including creating feed documents, uploading feed content to presigned URLs, submitting feeds, checking status, retrieving result documents, and cancelling feeds.\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 users and developers use this skill to automate Amazon SP-API Feeds tasks for bulk store data updates, including feed document creation, upload, submission, polling, result retrieval, and cancellation. It is intended for workflows that already have LinkFox authorization and the required Amazon Feeds permissions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles login, API keys, billing flows, feed uploads, and saved response files that may contain seller data or presigned URLs.\n\nMitigation: Use a least-privilege LinkFox key, upload only explicit feed files to fresh Amazon presigned URLs, avoid endpoint override environment variables unless you control them, and clean up saved linkfox response files after use.\n\nRisk: Repeated bad requests, authorization failures, missing resources, or high-frequency polling can trigger Amazon SP-API store-protection cooldown behavior.\n\nMitigation: Stop automatic retries, fix parameters or authorization before retrying, follow retryAfter or blockedUntil when present, and reduce polling or pagination frequency.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-feeds)\n- [API reference](references/api.md)\n- [Onboarding and authentication guidance](references/onboarding.md)\n- [Amazon SP-API createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument)\n- [Amazon SP-API getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument)\n- [Amazon SP-API createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed)\n- [Amazon SP-API getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed)\n- [Amazon SP-API getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds)\n- [Amazon SP-API cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed)\n- [Amazon Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with Python shell commands and JSON response summaries]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Scripts persist full JSON responses under a local linkfox session directory and print full or summarized JSON to stdout.]\n\n## Skill Version(s):\n\n1.0.8 (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.7: 15 files, 30645 bytes\n\nFiles: references/api.md (3989b), references/onboarding.md (2046b), scripts/_spapi_feeds_common.py (12282b), scripts/cancel_feed.py (1411b), scripts/check_auth_dependency.py (6074b), scripts/create_feed_document.py (1828b), scripts/create_feed.py (2626b), scripts/get_feed_document.py (1966b), scripts/get_feed.py (1460b), scripts/get_feeds.py (2811b), scripts/onboarding.py (24089b), scripts/upload_feed_document.py (3271b), skill-card.md (2833b), SKILL.md (6531b), _meta.json (145b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: linkfox-amazon-store-feeds\ndescription: 亚马逊店铺 Feeds（与 linkfox-amazon-store-auth / report / listings / pricing / orders 同系列），经 /spApi/developerProxy 调用 SP-API Feeds v2021-06-30：createFeedDocument、getFeedDocument、createFeed、getFeed、getFeeds、cancelFeed；另含 upload_feed_document 向预签名 URL 上传内容。当用户提到亚马逊 Feed、提交库存/Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、取消 Feed、查询 Feed 处理状态、Feeds API、SP-API 上传文件 时触发。\n---\n\n# Amazon 店铺 Feeds\n\n本 skill 与 **`linkfox-amazon-store-auth`** 等同属 **Amazon Store** 系列：依赖 **`linkfox-amazon-store-auth`** 选店（`sellerId`+`region`）；直接 **`POST /spApi/developerProxy`** 传入 `sellerId`+`region`，由服务端解析 token（勿传 `amzAccessToken`，除非兼容旧调用）。转发 **GET / POST / DELETE**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-feeds-<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\n| 能力 | 文档 |\n|------|------|\n| createFeedDocument | [createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) |\n| getFeedDocument | [getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) |\n| createFeed | [createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed) |\n| getFeed | [getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed) |\n| getFeeds | [getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds) |\n| cancelFeed | [cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) |\n\n---\n\n## Prerequisites\n\n1. 依赖 **`linkfox-amazon-store-auth`**；运行 `python scripts/check_auth_dependency.py`，exit **42** 时需先安装授权 skill。\n2. 应用需具备 **Feeds** 相关角色；`feedType` 须与上传文件格式匹配（见 Amazon Feed Type Values 文档）。\n\n---\n\n## 典型工作流\n\n1. **`create_feed_document.py`** → 得到 `feedDocumentId` 与 **`url`**（上传地址）。\n2. **`upload_feed_document.py`** → 对 `url` **PUT** 上传 feed 文件（**不经** developerProxy）。\n3. **`create_feed.py`** → 传入 `inputFeedDocumentId`、`feedType`、`marketplaceIds`。\n4. **`get_feed.py`** / **`get_feeds.py`** → 轮询 `processingStatus`（如 IN_QUEUE、IN_PROGRESS、DONE、FATAL）。\n5. 处理完成后用 **`get_feed_document.py`** 下载 **resultFeedDocumentId** 对应文档（再按返回 URL 自行下载结果文件）。\n\n---\n\n## Current Capabilities\n\n| 能力 | path | method | 脚本 |\n|------|------|--------|------|\n| createFeedDocument | `feeds/2021-06-30/documents` | POST | `create_feed_document.py` |\n| getFeedDocument | `feeds/2021-06-30/documents/{feedDocumentId}` | GET | `get_feed_document.py` |\n| createFeed | `feeds/2021-06-30/feeds` | POST | `create_feed.py` |\n| getFeed | `feeds/2021-06-30/feeds/{feedId}` | GET | `get_feed.py` |\n| getFeeds | `feeds/2021-06-30/feeds` | GET | `get_feeds.py` |\n| cancelFeed | `feeds/2021-06-30/feeds/{feedId}` | DELETE | `cancel_feed.py` |\n| 上传文档内容 | createFeedDocument 返回的 URL | PUT | `upload_feed_document.py` |\n\n共享模块：**`_spapi_feeds_common.py`**。\n\n---\n\n## Scripts 示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/create_feed_document.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\"}'\n\npython scripts/upload_feed_document.py '{\"uploadUrl\":\"<from createFeedDocument>\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\",\"filePath\":\"./inventory.tsv\"}'\n\npython scripts/create_feed.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"feedType\":\"POST_FLAT_FILE_INVLOADER_DATA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"inputFeedDocumentId\":\"<feedDocumentId>\"}'\n```\n\n---\n\n## Display Rules\n\n1. 先看 **`developerProxy.errcode` / `httpStatus`**；createFeedDocument 常为 **201**，createFeed 常为 **202**。\n2. **getFeeds** 分页：仅用上一页 **`nextToken`** 作为下一请求的 **`paginationToken` 参数名在 Amazon 侧为 `nextToken`**（脚本字段名 `nextToken`）。\n3. **upload** 失败与 SP-API 网关无关，检查 `uploadUrl` 是否过期、**Content-Type** 是否与 createFeedDocument 一致。\n4. 网关 path 白名单需包含 **`feeds/2021-06-30/`** 前缀。\n\n---\n\n## Important Limitations\n\n- 本 skill **不**代替 Amazon 侧 feed 文件 schema 校验；`feedType`、TSV/XML 格式以官方为准。\n- 下载 **getFeedDocument** 返回的 **url** 内容需另行 HTTP GET（与 upload 类似，不经 developerProxy）。\n- 详见 **`references/api.md`**。\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback：** `skillName`：`linkfox-amazon-store-feeds`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-feeds\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1786718732620\n}\n\nFile v1.0.7:references/api.md\n\n# linkfox-amazon-store-feeds — API 参考（Feeds v2021-06-30）\n\n## 1. 调用链\n\n| 步骤 | 端点 | 说明 |\n|------|------|------|\n| 1 | `POST {BASE}/spApi/storeTokens` | `{\"sellerId\",\"region\"}` → `accessToken` |\n| 2 | `POST {BASE}/spApi/developerProxy` | 转发 SP-API（除文档上传/下载 URL 外） |\n\n环境变量：`LINKFOX_AGENT_API_KEY`（或 `LINKFOXAGENT_API_KEY`，必填）（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）；`LINKFOX_TOOL_GATEWAY`（可选，默认 `https://tool-gateway.linkfox.com`，回退 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`）。\n\n### developerProxy Body\n\n| 字段 | 说明 |\n|------|------|\n| region | NA / EU / FE |\n| path | 如 `feeds/2021-06-30/feeds`，无前导 `/` |\n| method | GET / POST / DELETE |\n| amzAccessToken | storeTokens 返回值 |\n| queryString | 无 `?` 前缀 |\n| body | POST 时为 JSON 字符串 |\n| contentType | 一般 `application/json` |\n\n网关响应：`errcode`、`httpStatus`、`body`（字符串）。成功 HTTP 可能为 **200 / 201 / 202 / 204**。\n\n---\n\n## 2. 脚本入参摘要\n\n### 公共\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| sellerId | 是 | 卖家 ID |\n| region | 是 | 区域 |\n| skipDepCheck | 否 | 跳过本地 auth 探测 |\n\n### create_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| contentType | 是 | 与将要上传的文件 MIME 一致，如 `text/tab-separated-values; charset=UTF-8` |\n\n解析字段：**`feedDocument`**（含 `feedDocumentId`、`url` 等，以 Amazon 为准）。\n\n### upload_feed_document.py（不经 developerProxy）\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| uploadUrl | 是 | createFeedDocument 返回的 `url` |\n| contentType | 是 | 与 createFeedDocument 相同 |\n| filePath | 三选一 | 本地文件路径 |\n| content | 三选一 | UTF-8 字符串内容 |\n| contentBase64 | 三选一 | Base64 编码内容 |\n\n### create_feed.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedType | 是 | 如 `POST_FLAT_FILE_INVLOADER_DATA` |\n| marketplaceIds | 是 | 1～25 个站点 ID |\n| inputFeedDocumentId | 是 | 已上传内容的文档 ID |\n| feedOptions | 否 | 因 feedType 而异的对象 |\n\n### get_feed.py / cancel_feed.py\n\n| 字段 | 必填 |\n|------|------|\n| feedId | 是 |\n\n### get_feeds.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedTypes | 条件 | 与 nextToken 二选一；最多 10 个 |\n| nextToken | 条件 | 分页时**单独**传此参数 |\n| marketplaceIds | 否 | 最多 10 个 |\n| processingStatuses | 否 | CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE |\n| createdSince / createdUntil | 否 | ISO 8601 |\n| pageSize | 否 | 1～100，默认 10 |\n\n### get_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedDocumentId | 是 | |\n| enableContentEncodingUrlHeader | 否 | boolean；GZIP 时便于客户端自动解压 |\n\n---\n\n## 3. Feed 标准流程\n\n```text\ncreateFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url\n```\n\n---\n\n## 4. 常见 feedType（示例）\n\n以 [Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) 为准，例如：\n\n- `POST_PRODUCT_DATA` / `POST_INVENTORY_AVAILABILITY_DATA`\n- `POST_FLAT_FILE_INVLOADER_DATA`\n- `POST_ORDER_FULFILLMENT_DATA`\n\n---\n\n## 5. 错误与限制\n\n- **401**：HTTP 401 或 authorized error：按 SKILL.md 的 **## 解决认证和积分问题** 处理。\n- **402**：HTTP 402：按 SKILL.md 的 **## 解决认证和积分问题** 处理。\n- **403**：权限或 feedType 未授权。\n- **1005**（网关）：path 未在白名单，需放行 `feeds/2021-06-30/`。\n- **429**：降频；getFeeds 等有独立 usage plan。\n- 上传 URL 有时效，过期需重新 createFeedDocument。\n\n---\n\n## 6. Feedback\n\n上报问题时注明 **`skillName`: `linkfox-amazon-store-feeds`**，并附 `developerProxy` JSON（脱敏）。\n\nFile v1.0.7: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.7:skill-card.md\n\n## Description:\n\nHelps agents create, upload, submit, inspect, and cancel Amazon Selling Partner API Feeds for a selected LinkFox Amazon store.\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 sellers, operators, and developers use this skill to manage Amazon SP-API Feeds workflows, including feed document creation, content upload, feed submission, polling, result lookup, and cancellation.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles API keys and account onboarding data.\n\nMitigation: Treat generated API keys and payment QR data as secrets, and configure credentials only through trusted environment variables.\n\nRisk: The skill can upload local feed content to a provided URL.\n\nMitigation: Use only trusted upload URLs and confirm local file paths before running upload commands with real seller data.\n\nRisk: The skill can cancel Amazon feed processing.\n\nMitigation: Confirm the target feed ID and user intent before running cancellation commands.\n\nRisk: The skill persists full API responses to local session files.\n\nMitigation: Review saved response files for sensitive seller or feed data and store them according to the user's data handling requirements.\n\n## Reference(s):\n\n- [Skill API Reference](references/api.md)\n- [Authentication and Billing Onboarding](references/onboarding.md)\n- [Amazon createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument)\n- [Amazon getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument)\n- [Amazon createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed)\n- [Amazon getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed)\n- [Amazon getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds)\n- [Amazon cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed)\n- [Amazon Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance, JSON]\n\n**Output Format:** [Markdown guidance, shell command examples, and JSON API/script responses saved to local files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Responses are summarized in stdout when large and full responses are persisted under a linkfox session directory.]\n\n## Skill Version(s):\n\n1.0.7 (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.6: 15 files, 30701 bytes\n\nFiles: references/api.md (3989b), references/onboarding.md (2046b), scripts/_spapi_feeds_common.py (12282b), scripts/cancel_feed.py (1411b), scripts/check_auth_dependency.py (6074b), scripts/create_feed_document.py (1828b), scripts/create_feed.py (2626b), scripts/get_feed_document.py (1966b), scripts/get_feed.py (1460b), scripts/get_feeds.py (2811b), scripts/onboarding.py (24089b), scripts/upload_feed_document.py (3271b), skill-card.md (3059b), SKILL.md (6531b), _meta.json (145b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: linkfox-amazon-store-feeds\ndescription: 亚马逊店铺 Feeds（与 linkfox-amazon-store-auth / report / listings / pricing / orders 同系列），经 /spApi/developerProxy 调用 SP-API Feeds v2021-06-30：createFeedDocument、getFeedDocument、createFeed、getFeed、getFeeds、cancelFeed；另含 upload_feed_document 向预签名 URL 上传内容。当用户提到亚马逊 Feed、提交库存/Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、取消 Feed、查询 Feed 处理状态、Feeds API、SP-API 上传文件 时触发。\n---\n\n# Amazon 店铺 Feeds\n\n本 skill 与 **`linkfox-amazon-store-auth`** 等同属 **Amazon Store** 系列：依赖 **`linkfox-amazon-store-auth`** 选店（`sellerId`+`region`）；直接 **`POST /spApi/developerProxy`** 传入 `sellerId`+`region`，由服务端解析 token（勿传 `amzAccessToken`，除非兼容旧调用）。转发 **GET / POST / DELETE**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-feeds-<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\n| 能力 | 文档 |\n|------|------|\n| createFeedDocument | [createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) |\n| getFeedDocument | [getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) |\n| createFeed | [createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed) |\n| getFeed | [getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed) |\n| getFeeds | [getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds) |\n| cancelFeed | [cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) |\n\n---\n\n## Prerequisites\n\n1. 依赖 **`linkfox-amazon-store-auth`**；运行 `python scripts/check_auth_dependency.py`，exit **42** 时需先安装授权 skill。\n2. 应用需具备 **Feeds** 相关角色；`feedType` 须与上传文件格式匹配（见 Amazon Feed Type Values 文档）。\n\n---\n\n## 典型工作流\n\n1. **`create_feed_document.py`** → 得到 `feedDocumentId` 与 **`url`**（上传地址）。\n2. **`upload_feed_document.py`** → 对 `url` **PUT** 上传 feed 文件（**不经** developerProxy）。\n3. **`create_feed.py`** → 传入 `inputFeedDocumentId`、`feedType`、`marketplaceIds`。\n4. **`get_feed.py`** / **`get_feeds.py`** → 轮询 `processingStatus`（如 IN_QUEUE、IN_PROGRESS、DONE、FATAL）。\n5. 处理完成后用 **`get_feed_document.py`** 下载 **resultFeedDocumentId** 对应文档（再按返回 URL 自行下载结果文件）。\n\n---\n\n## Current Capabilities\n\n| 能力 | path | method | 脚本 |\n|------|------|--------|------|\n| createFeedDocument | `feeds/2021-06-30/documents` | POST | `create_feed_document.py` |\n| getFeedDocument | `feeds/2021-06-30/documents/{feedDocumentId}` | GET | `get_feed_document.py` |\n| createFeed | `feeds/2021-06-30/feeds` | POST | `create_feed.py` |\n| getFeed | `feeds/2021-06-30/feeds/{feedId}` | GET | `get_feed.py` |\n| getFeeds | `feeds/2021-06-30/feeds` | GET | `get_feeds.py` |\n| cancelFeed | `feeds/2021-06-30/feeds/{feedId}` | DELETE | `cancel_feed.py` |\n| 上传文档内容 | createFeedDocument 返回的 URL | PUT | `upload_feed_document.py` |\n\n共享模块：**`_spapi_feeds_common.py`**。\n\n---\n\n## Scripts 示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/create_feed_document.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\"}'\n\npython scripts/upload_feed_document.py '{\"uploadUrl\":\"<from createFeedDocument>\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\",\"filePath\":\"./inventory.tsv\"}'\n\npython scripts/create_feed.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"feedType\":\"POST_FLAT_FILE_INVLOADER_DATA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"inputFeedDocumentId\":\"<feedDocumentId>\"}'\n```\n\n---\n\n## Display Rules\n\n1. 先看 **`developerProxy.errcode` / `httpStatus`**；createFeedDocument 常为 **201**，createFeed 常为 **202**。\n2. **getFeeds** 分页：仅用上一页 **`nextToken`** 作为下一请求的 **`paginationToken` 参数名在 Amazon 侧为 `nextToken`**（脚本字段名 `nextToken`）。\n3. **upload** 失败与 SP-API 网关无关，检查 `uploadUrl` 是否过期、**Content-Type** 是否与 createFeedDocument 一致。\n4. 网关 path 白名单需包含 **`feeds/2021-06-30/`** 前缀。\n\n---\n\n## Important Limitations\n\n- 本 skill **不**代替 Amazon 侧 feed 文件 schema 校验；`feedType`、TSV/XML 格式以官方为准。\n- 下载 **getFeedDocument** 返回的 **url** 内容需另行 HTTP GET（与 upload 类似，不经 developerProxy）。\n- 详见 **`references/api.md`**。\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback：** `skillName`：`linkfox-amazon-store-feeds`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-feeds\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1786099323917\n}\n\nFile v1.0.6:references/api.md\n\n# linkfox-amazon-store-feeds — API 参考（Feeds v2021-06-30）\n\n## 1. 调用链\n\n| 步骤 | 端点 | 说明 |\n|------|------|------|\n| 1 | `POST {BASE}/spApi/storeTokens` | `{\"sellerId\",\"region\"}` → `accessToken` |\n| 2 | `POST {BASE}/spApi/developerProxy` | 转发 SP-API（除文档上传/下载 URL 外） |\n\n环境变量：`LINKFOX_AGENT_API_KEY`（或 `LINKFOXAGENT_API_KEY`，必填）（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）；`LINKFOX_TOOL_GATEWAY`（可选，默认 `https://tool-gateway.linkfox.com`，回退 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`）。\n\n### developerProxy Body\n\n| 字段 | 说明 |\n|------|------|\n| region | NA / EU / FE |\n| path | 如 `feeds/2021-06-30/feeds`，无前导 `/` |\n| method | GET / POST / DELETE |\n| amzAccessToken | storeTokens 返回值 |\n| queryString | 无 `?` 前缀 |\n| body | POST 时为 JSON 字符串 |\n| contentType | 一般 `application/json` |\n\n网关响应：`errcode`、`httpStatus`、`body`（字符串）。成功 HTTP 可能为 **200 / 201 / 202 / 204**。\n\n---\n\n## 2. 脚本入参摘要\n\n### 公共\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| sellerId | 是 | 卖家 ID |\n| region | 是 | 区域 |\n| skipDepCheck | 否 | 跳过本地 auth 探测 |\n\n### create_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| contentType | 是 | 与将要上传的文件 MIME 一致，如 `text/tab-separated-values; charset=UTF-8` |\n\n解析字段：**`feedDocument`**（含 `feedDocumentId`、`url` 等，以 Amazon 为准）。\n\n### upload_feed_document.py（不经 developerProxy）\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| uploadUrl | 是 | createFeedDocument 返回的 `url` |\n| contentType | 是 | 与 createFeedDocument 相同 |\n| filePath | 三选一 | 本地文件路径 |\n| content | 三选一 | UTF-8 字符串内容 |\n| contentBase64 | 三选一 | Base64 编码内容 |\n\n### create_feed.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedType | 是 | 如 `POST_FLAT_FILE_INVLOADER_DATA` |\n| marketplaceIds | 是 | 1～25 个站点 ID |\n| inputFeedDocumentId | 是 | 已上传内容的文档 ID |\n| feedOptions | 否 | 因 feedType 而异的对象 |\n\n### get_feed.py / cancel_feed.py\n\n| 字段 | 必填 |\n|------|------|\n| feedId | 是 |\n\n### get_feeds.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedTypes | 条件 | 与 nextToken 二选一；最多 10 个 |\n| nextToken | 条件 | 分页时**单独**传此参数 |\n| marketplaceIds | 否 | 最多 10 个 |\n| processingStatuses | 否 | CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE |\n| createdSince / createdUntil | 否 | ISO 8601 |\n| pageSize | 否 | 1～100，默认 10 |\n\n### get_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedDocumentId | 是 | |\n| enableContentEncodingUrlHeader | 否 | boolean；GZIP 时便于客户端自动解压 |\n\n---\n\n## 3. Feed 标准流程\n\n```text\ncreateFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url\n```\n\n---\n\n## 4. 常见 feedType（示例）\n\n以 [Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) 为准，例如：\n\n- `POST_PRODUCT_DATA` / `POST_INVENTORY_AVAILABILITY_DATA`\n- `POST_FLAT_FILE_INVLOADER_DATA`\n- `POST_ORDER_FULFILLMENT_DATA`\n\n---\n\n## 5. 错误与限制\n\n- **401**：HTTP 401 或 authorized error：按 SKILL.md 的 **## 解决认证和积分问题** 处理。\n- **402**：HTTP 402：按 SKILL.md 的 **## 解决认证和积分问题** 处理。\n- **403**：权限或 feedType 未授权。\n- **1005**（网关）：path 未在白名单，需放行 `feeds/2021-06-30/`。\n- **429**：降频；getFeeds 等有独立 usage plan。\n- 上传 URL 有时效，过期需重新 createFeedDocument。\n\n---\n\n## 6. Feedback\n\n上报问题时注明 **`skillName`: `linkfox-amazon-store-feeds`**，并附 `developerProxy` JSON（脱敏）。\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>`（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.6:skill-card.md\n\n## Description:\n\nHelps agents create, upload, submit, query, and cancel Amazon SP-API Feeds through LinkFox gateway scripts.\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 ecommerce operators use this skill to manage Amazon store feed documents and feed submissions, including creating feed documents, uploading feed content, submitting feeds, polling status, retrieving result-document metadata, and cancelling feeds.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill routes Amazon SP-API Feeds workflows through LinkFox gateway endpoints and uses LinkFox API keys.\n\nMitigation: Run it only with trusted LinkFox endpoint environment variables and credentials intended for this workflow.\n\nRisk: Full responses and payment QR artifacts can be saved locally under the linkfox session directory.\n\nMitigation: Review saved files for sensitive data and delete response or QR files when they are no longer needed.\n\nRisk: The onboarding flow can request phone/SMS codes and create payment orders.\n\nMitigation: Share phone or SMS codes and initiate payment only when intentionally creating or accessing a LinkFox account.\n\n## Reference(s):\n\n- [API reference](references/api.md)\n- [Onboarding and billing guidance](references/onboarding.md)\n- [Amazon SP-API createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument)\n- [Amazon SP-API getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument)\n- [Amazon SP-API createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed)\n- [Amazon SP-API getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed)\n- [Amazon SP-API getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds)\n- [Amazon SP-API cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed)\n- [Amazon SP-API Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values)\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-feeds)\n- [LinkFox Skills](https://skill.linkfox.com/)\n- [LinkFox agent portal](https://agent.linkfox.com/)\n\n## Skill Output:\n\n**Output Type(s):** [API Calls, Files, JSON, Shell commands, Configuration instructions, Guidance]\n\n**Output Format:** [JSON responses, saved JSON files, and Markdown guidance with shell commands]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Full API responses are saved locally under a linkfox session directory; small responses or --inline output print full JSON, while larger responses print summaries.]\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: 13 files, 22239 bytes\n\nFiles: references/api.md (3989b), scripts/_spapi_feeds_common.py (12294b), scripts/cancel_feed.py (1638b), scripts/check_auth_dependency.py (6074b), scripts/create_feed_document.py (2055b), scripts/create_feed.py (2853b), scripts/get_feed_document.py (2193b), scripts/get_feed.py (1687b), scripts/get_feeds.py (3038b), scripts/upload_feed_document.py (3271b), skill-card.md (3186b), SKILL.md (6999b), _meta.json (145b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: linkfox-amazon-store-feeds\ndescription: 亚马逊店铺 Feeds（与 linkfox-amazon-store-auth / report / listings / pricing / orders 同系列），经 /spApi/developerProxy 调用 SP-API Feeds v2021-06-30：createFeedDocument、getFeedDocument、createFeed、getFeed、getFeeds、cancelFeed；另含 upload_feed_document 向预签名 URL 上传内容。当用户提到亚马逊 Feed、提交库存/Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、取消 Feed、查询 Feed 处理状态、Feeds API、SP-API 上传文件 时触发。\n---\n\n# Amazon 店铺 Feeds\n\n本 skill 与 **`linkfox-amazon-store-auth`** 等同属 **Amazon Store** 系列：先 **`POST /spApi/storeTokens`**，再 **`POST /spApi/developerProxy`** 转发 **GET / POST / DELETE**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-feeds-<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\n| 能力 | 文档 |\n|------|------|\n| createFeedDocument | [createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) |\n| getFeedDocument | [getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) |\n| createFeed | [createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed) |\n| getFeed | [getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed) |\n| getFeeds | [getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds) |\n| cancelFeed | [cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) |\n\n---\n\n## Prerequisites\n\n1. 依赖 **`linkfox-amazon-store-auth`**；运行 `python scripts/check_auth_dependency.py`，exit **42** 时需先安装授权 skill。\n2. 应用需具备 **Feeds** 相关角色；`feedType` 须与上传文件格式匹配（见 Amazon Feed Type Values 文档）。\n\n---\n\n## 典型工作流\n\n1. **`create_feed_document.py`** → 得到 `feedDocumentId` 与 **`url`**（上传地址）。\n2. **`upload_feed_document.py`** → 对 `url` **PUT** 上传 feed 文件（**不经** developerProxy）。\n3. **`create_feed.py`** → 传入 `inputFeedDocumentId`、`feedType`、`marketplaceIds`。\n4. **`get_feed.py`** / **`get_feeds.py`** → 轮询 `processingStatus`（如 IN_QUEUE、IN_PROGRESS、DONE、FATAL）。\n5. 处理完成后用 **`get_feed_document.py`** 下载 **resultFeedDocumentId** 对应文档（再按返回 URL 自行下载结果文件）。\n\n---\n\n## Current Capabilities\n\n| 能力 | path | method | 脚本 |\n|------|------|--------|------|\n| createFeedDocument | `feeds/2021-06-30/documents` | POST | `create_feed_document.py` |\n| getFeedDocument | `feeds/2021-06-30/documents/{feedDocumentId}` | GET | `get_feed_document.py` |\n| createFeed | `feeds/2021-06-30/feeds` | POST | `create_feed.py` |\n| getFeed | `feeds/2021-06-30/feeds/{feedId}` | GET | `get_feed.py` |\n| getFeeds | `feeds/2021-06-30/feeds` | GET | `get_feeds.py` |\n| cancelFeed | `feeds/2021-06-30/feeds/{feedId}` | DELETE | `cancel_feed.py` |\n| 上传文档内容 | createFeedDocument 返回的 URL | PUT | `upload_feed_document.py` |\n\n共享模块：**`_spapi_feeds_common.py`**。\n\n---\n\n## Scripts 示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/create_feed_document.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\"}'\n\npython scripts/upload_feed_document.py '{\"uploadUrl\":\"<from createFeedDocument>\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\",\"filePath\":\"./inventory.tsv\"}'\n\npython scripts/create_feed.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"feedType\":\"POST_FLAT_FILE_INVLOADER_DATA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"inputFeedDocumentId\":\"<feedDocumentId>\"}'\n```\n\n---\n\n## Display Rules\n\n1. 先看 **`developerProxy.errcode` / `httpStatus`**；createFeedDocument 常为 **201**，createFeed 常为 **202**。\n2. **getFeeds** 分页：仅用上一页 **`nextToken`** 作为下一请求的 **`paginationToken` 参数名在 Amazon 侧为 `nextToken`**（脚本字段名 `nextToken`）。\n3. **upload** 失败与 SP-API 网关无关，检查 `uploadUrl` 是否过期、**Content-Type** 是否与 createFeedDocument 一致。\n4. 网关 path 白名单需包含 **`feeds/2021-06-30/`** 前缀。\n\n---\n\n## Important Limitations\n\n- 本 skill **不**代替 Amazon 侧 feed 文件 schema 校验；`feedType`、TSV/XML 格式以官方为准。\n- 下载 **getFeedDocument** 返回的 **url** 内容需另行 HTTP GET（与 upload 类似，不经 developerProxy）。\n- 详见 **`references/api.md`**。\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback：** `skillName`：`linkfox-amazon-store-feeds`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-feeds\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1783944291289\n}\n\nFile v1.0.5:references/api.md\n\n# linkfox-amazon-store-feeds — API 参考（Feeds v2021-06-30）\n\n## 1. 调用链\n\n| 步骤 | 端点 | 说明 |\n|------|------|------|\n| 1 | `POST {BASE}/spApi/storeTokens` | `{\"sellerId\",\"region\"}` → `accessToken` |\n| 2 | `POST {BASE}/spApi/developerProxy` | 转发 SP-API（除文档上传/下载 URL 外） |\n\n环境变量：`LINKFOX_AGENT_API_KEY`（或 `LINKFOXAGENT_API_KEY`，必填）（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）；`LINKFOX_TOOL_GATEWAY`（可选，默认 `https://tool-gateway.linkfox.com`，回退 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`）。\n\n### developerProxy Body\n\n| 字段 | 说明 |\n|------|------|\n| region | NA / EU / FE |\n| path | 如 `feeds/2021-06-30/feeds`，无前导 `/` |\n| method | GET / POST / DELETE |\n| amzAccessToken | storeTokens 返回值 |\n| queryString | 无 `?` 前缀 |\n| body | POST 时为 JSON 字符串 |\n| contentType | 一般 `application/json` |\n\n网关响应：`errcode`、`httpStatus`、`body`（字符串）。成功 HTTP 可能为 **200 / 201 / 202 / 204**。\n\n---\n\n## 2. 脚本入参摘要\n\n### 公共\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| sellerId | 是 | 卖家 ID |\n| region | 是 | 区域 |\n| skipDepCheck | 否 | 跳过本地 auth 探测 |\n\n### create_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| contentType | 是 | 与将要上传的文件 MIME 一致，如 `text/tab-separated-values; charset=UTF-8` |\n\n解析字段：**`feedDocument`**（含 `feedDocumentId`、`url` 等，以 Amazon 为准）。\n\n### upload_feed_document.py（不经 developerProxy）\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| uploadUrl | 是 | createFeedDocument 返回的 `url` |\n| contentType | 是 | 与 createFeedDocument 相同 |\n| filePath | 三选一 | 本地文件路径 |\n| content | 三选一 | UTF-8 字符串内容 |\n| contentBase64 | 三选一 | Base64 编码内容 |\n\n### create_feed.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedType | 是 | 如 `POST_FLAT_FILE_INVLOADER_DATA` |\n| marketplaceIds | 是 | 1～25 个站点 ID |\n| inputFeedDocumentId | 是 | 已上传内容的文档 ID |\n| feedOptions | 否 | 因 feedType 而异的对象 |\n\n### get_feed.py / cancel_feed.py\n\n| 字段 | 必填 |\n|------|------|\n| feedId | 是 |\n\n### get_feeds.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedTypes | 条件 | 与 nextToken 二选一；最多 10 个 |\n| nextToken | 条件 | 分页时**单独**传此参数 |\n| marketplaceIds | 否 | 最多 10 个 |\n| processingStatuses | 否 | CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE |\n| createdSince / createdUntil | 否 | ISO 8601 |\n| pageSize | 否 | 1～100，默认 10 |\n\n### get_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedDocumentId | 是 | |\n| enableContentEncodingUrlHeader | 否 | boolean；GZIP 时便于客户端自动解压 |\n\n---\n\n## 3. Feed 标准流程\n\n```text\ncreateFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url\n```\n\n---\n\n## 4. 常见 feedType（示例）\n\n以 [Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) 为准，例如：\n\n- `POST_PRODUCT_DATA` / `POST_INVENTORY_AVAILABILITY_DATA`\n- `POST_FLAT_FILE_INVLOADER_DATA`\n- `POST_ORDER_FULFILLMENT_DATA`\n\n---\n\n## 5. 错误与限制\n\n- **401**：HTTP 401 或 authorized error：按 SKILL.md 的 **## 解决认证和积分问题** 处理。\n- **402**：HTTP 402：按 SKILL.md 的 **## 解决认证和积分问题** 处理。\n- **403**：权限或 feedType 未授权。\n- **1005**（网关）：path 未在白名单，需放行 `feeds/2021-06-30/`。\n- **429**：降频；getFeeds 等有独立 usage plan。\n- 上传 URL 有时效，过期需重新 createFeedDocument。\n\n---\n\n## 6. Feedback\n\n上报问题时注明 **`skillName`: `linkfox-amazon-store-feeds`**，并附 `developerProxy` JSON（脱敏）。\n\nFile v1.0.5:skill-card.md\n\n## Description: <br>\nHelps agents create feed documents, upload feed content, submit Amazon SP-API Feeds, check processing status, retrieve feed documents, list feeds, and cancel feeds through LinkFox-provided 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>\nDevelopers and commerce operations agents use this skill to manage Amazon store feed submission workflows, including feed document creation, upload, submission, polling, cancellation, and result-document retrieval. It is intended for users who already have LinkFox API access and Amazon SP-API authorization. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Amazon feed data, feed document URLs, request bodies, and status responses may be saved locally. <br>\nMitigation: Run the skill only in workspaces approved for this data, review saved linkfox session files, and remove sensitive local outputs when they are no longer needed. <br>\nRisk: The upload workflow sends a local file or inline content to a provided pre-signed upload URL. <br>\nMitigation: Verify the file path, content type, and destination URL before running upload_feed_document. <br>\nRisk: The artifact contains conflicting cost guidance. <br>\nMitigation: Confirm LinkFox credit or cost behavior with the publisher before repeated feed operations. <br>\n\n\n## Reference(s): <br>\n- [Skill API Reference](artifact/references/api.md) <br>\n- [ClawHub Skill Page](https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-feeds) <br>\n- [Amazon createFeedDocument Reference](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) <br>\n- [Amazon getFeedDocument Reference](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) <br>\n- [Amazon createFeed Reference](https://developer-docs.amazon.com/sp-api/reference/createfeed) <br>\n- [Amazon getFeed Reference](https://developer-docs.amazon.com/sp-api/reference/getfeed) <br>\n- [Amazon getFeeds Reference](https://developer-docs.amazon.com/sp-api/reference/getfeeds) <br>\n- [Amazon cancelFeed Reference](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) <br>\n- [Amazon Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [guidance, shell commands, JSON, files, API calls] <br>\n**Output Format:** [Markdown guidance with shell command examples; scripts emit JSON to stdout and save full JSON responses to local files.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [The scripts may summarize large responses on stdout while saving complete responses under a local linkfox session data directory.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (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.4: 13 files, 21517 bytes\n\nFiles: references/api.md (3721b), scripts/_spapi_feeds_common.py (12211b), scripts/cancel_feed.py (1638b), scripts/check_auth_dependency.py (6074b), scripts/create_feed_document.py (2055b), scripts/create_feed.py (2853b), scripts/get_feed_document.py (2193b), scripts/get_feed.py (1687b), scripts/get_feeds.py (3038b), scripts/upload_feed_document.py (3271b), skill-card.md (3198b), SKILL.md (5968b), _meta.json (145b)\n\nFile v1.0.4:SKILL.md\n\n---\r\nname: linkfox-amazon-store-feeds\r\ndescription: 亚马逊店铺 Feeds（与 linkfox-amazon-store-auth / report / listings / pricing / orders 同系列），经 /spApi/developerProxy 调用 SP-API Feeds v2021-06-30：createFeedDocument、getFeedDocument、createFeed、getFeed、getFeeds、cancelFeed；另含 upload_feed_document 向预签名 URL 上传内容。当用户提到亚马逊 Feed、提交库存/Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、取消 Feed、查询 Feed 处理状态、Feeds API、SP-API 上传文件 时触发。\r\n---\r\n\r\n# Amazon 店铺 Feeds\r\n\r\n本 skill 与 **`linkfox-amazon-store-auth`** 等同属 **Amazon Store** 系列：先 **`POST /spApi/storeTokens`**，再 **`POST /spApi/developerProxy`** 转发 **GET / POST / DELETE**。\r\n\r\n## 调用方式\r\n\r\n- **API 端点**：`POST /spApi/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\r\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\r\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\r\n\r\n**输出策略（脚本默认行为）**：\r\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-feeds-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\r\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\r\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\r\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\r\n\r\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\r\n\r\n## 官方参考索引\r\n\r\n| 能力 | 文档 |\r\n|------|------|\r\n| createFeedDocument | [createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) |\r\n| getFeedDocument | [getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) |\r\n| createFeed | [createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed) |\r\n| getFeed | [getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed) |\r\n| getFeeds | [getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds) |\r\n| cancelFeed | [cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) |\r\n\r\n---\r\n\r\n## Prerequisites\r\n\r\n1. 依赖 **`linkfox-amazon-store-auth`**；运行 `python scripts/check_auth_dependency.py`，exit **42** 时需先安装授权 skill。\r\n2. 应用需具备 **Feeds** 相关角色；`feedType` 须与上传文件格式匹配（见 Amazon Feed Type Values 文档）。\r\n\r\n---\r\n\r\n## 典型工作流\r\n\r\n1. **`create_feed_document.py`** → 得到 `feedDocumentId` 与 **`url`**（上传地址）。\r\n2. **`upload_feed_document.py`** → 对 `url` **PUT** 上传 feed 文件（**不经** developerProxy）。\r\n3. **`create_feed.py`** → 传入 `inputFeedDocumentId`、`feedType`、`marketplaceIds`。\r\n4. **`get_feed.py`** / **`get_feeds.py`** → 轮询 `processingStatus`（如 IN_QUEUE、IN_PROGRESS、DONE、FATAL）。\r\n5. 处理完成后用 **`get_feed_document.py`** 下载 **resultFeedDocumentId** 对应文档（再按返回 URL 自行下载结果文件）。\r\n\r\n---\r\n\r\n## Current Capabilities\r\n\r\n| 能力 | path | method | 脚本 |\r\n|------|------|--------|------|\r\n| createFeedDocument | `feeds/2021-06-30/documents` | POST | `create_feed_document.py` |\r\n| getFeedDocument | `feeds/2021-06-30/documents/{feedDocumentId}` | GET | `get_feed_document.py` |\r\n| createFeed | `feeds/2021-06-30/feeds` | POST | `create_feed.py` |\r\n| getFeed | `feeds/2021-06-30/feeds/{feedId}` | GET | `get_feed.py` |\r\n| getFeeds | `feeds/2021-06-30/feeds` | GET | `get_feeds.py` |\r\n| cancelFeed | `feeds/2021-06-30/feeds/{feedId}` | DELETE | `cancel_feed.py` |\r\n| 上传文档内容 | createFeedDocument 返回的 URL | PUT | `upload_feed_document.py` |\r\n\r\n共享模块：**`_spapi_feeds_common.py`**。\r\n\r\n---\r\n\r\n## Scripts 示例\r\n\r\n```bash\r\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\r\n\r\npython scripts/create_feed_document.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\"}'\r\n\r\npython scripts/upload_feed_document.py '{\"uploadUrl\":\"<from createFeedDocument>\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\",\"filePath\":\"./inventory.tsv\"}'\r\n\r\npython scripts/create_feed.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"feedType\":\"POST_FLAT_FILE_INVLOADER_DATA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"inputFeedDocumentId\":\"<feedDocumentId>\"}'\r\n```\r\n\r\n---\r\n\r\n## Display Rules\r\n\r\n1. 先看 **`developerProxy.errcode` / `httpStatus`**；createFeedDocument 常为 **201**，createFeed 常为 **202**。\r\n2. **getFeeds** 分页：仅用上一页 **`nextToken`** 作为下一请求的 **`paginationToken` 参数名在 Amazon 侧为 `nextToken`**（脚本字段名 `nextToken`）。\r\n3. **upload** 失败与 SP-API 网关无关，检查 `uploadUrl` 是否过期、**Content-Type** 是否与 createFeedDocument 一致。\r\n4. 网关 path 白名单需包含 **`feeds/2021-06-30/`** 前缀。\r\n\r\n---\r\n\r\n## Important Limitations\r\n\r\n- 本 skill **不**代替 Amazon 侧 feed 文件 schema 校验；`feedType`、TSV/XML 格式以官方为准。\r\n- 下载 **getFeedDocument** 返回的 **url** 内容需另行 HTTP GET（与 upload 类似，不经 developerProxy）。\r\n- 详见 **`references/api.md`**。\r\n\r\n**Feedback：** `skillName`：`linkfox-amazon-store-feeds`。\r\n\r\n---\r\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-feeds\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783336342996\n}\n\nFile v1.0.4:references/api.md\n\n# linkfox-amazon-store-feeds — API 参考（Feeds v2021-06-30）\n\n## 1. 调用链\n\n| 步骤 | 端点 | 说明 |\n|------|------|------|\n| 1 | `POST {BASE}/spApi/storeTokens` | `{\"sellerId\",\"region\"}` → `accessToken` |\n| 2 | `POST {BASE}/spApi/developerProxy` | 转发 SP-API（除文档上传/下载 URL 外） |\n\n环境变量：`LINKFOX_AGENT_API_KEY`（或 `LINKFOXAGENT_API_KEY`，必填）；`LINKFOX_TOOL_GATEWAY`（可选，默认 `https://tool-gateway.linkfox.com`，回退 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`）。\n\n### developerProxy Body\n\n| 字段 | 说明 |\n|------|------|\n| region | NA / EU / FE |\n| path | 如 `feeds/2021-06-30/feeds`，无前导 `/` |\n| method | GET / POST / DELETE |\n| amzAccessToken | storeTokens 返回值 |\n| queryString | 无 `?` 前缀 |\n| body | POST 时为 JSON 字符串 |\n| contentType | 一般 `application/json` |\n\n网关响应：`errcode`、`httpStatus`、`body`（字符串）。成功 HTTP 可能为 **200 / 201 / 202 / 204**。\n\n---\n\n## 2. 脚本入参摘要\n\n### 公共\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| sellerId | 是 | 卖家 ID |\n| region | 是 | 区域 |\n| skipDepCheck | 否 | 跳过本地 auth 探测 |\n\n### create_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| contentType | 是 | 与将要上传的文件 MIME 一致，如 `text/tab-separated-values; charset=UTF-8` |\n\n解析字段：**`feedDocument`**（含 `feedDocumentId`、`url` 等，以 Amazon 为准）。\n\n### upload_feed_document.py（不经 developerProxy）\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| uploadUrl | 是 | createFeedDocument 返回的 `url` |\n| contentType | 是 | 与 createFeedDocument 相同 |\n| filePath | 三选一 | 本地文件路径 |\n| content | 三选一 | UTF-8 字符串内容 |\n| contentBase64 | 三选一 | Base64 编码内容 |\n\n### create_feed.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedType | 是 | 如 `POST_FLAT_FILE_INVLOADER_DATA` |\n| marketplaceIds | 是 | 1～25 个站点 ID |\n| inputFeedDocumentId | 是 | 已上传内容的文档 ID |\n| feedOptions | 否 | 因 feedType 而异的对象 |\n\n### get_feed.py / cancel_feed.py\n\n| 字段 | 必填 |\n|------|------|\n| feedId | 是 |\n\n### get_feeds.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedTypes | 条件 | 与 nextToken 二选一；最多 10 个 |\n| nextToken | 条件 | 分页时**单独**传此参数 |\n| marketplaceIds | 否 | 最多 10 个 |\n| processingStatuses | 否 | CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE |\n| createdSince / createdUntil | 否 | ISO 8601 |\n| pageSize | 否 | 1～100，默认 10 |\n\n### get_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedDocumentId | 是 | |\n| enableContentEncodingUrlHeader | 否 | boolean；GZIP 时便于客户端自动解压 |\n\n---\n\n## 3. Feed 标准流程\n\n```text\ncreateFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url\n```\n\n---\n\n## 4. 常见 feedType（示例）\n\n以 [Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) 为准，例如：\n\n- `POST_PRODUCT_DATA` / `POST_INVENTORY_AVAILABILITY_DATA`\n- `POST_FLAT_FILE_INVLOADER_DATA`\n- `POST_ORDER_FULFILLMENT_DATA`\n\n---\n\n## 5. 错误与限制\n\n- **403**：权限或 feedType 未授权。\n- **1005**（网关）：path 未在白名单，需放行 `feeds/2021-06-30/`。\n- **429**：降频；getFeeds 等有独立 usage plan。\n- 上传 URL 有时效，过期需重新 createFeedDocument。\n\n---\n\n## 6. Feedback\n\n上报问题时注明 **`skillName`: `linkfox-amazon-store-feeds`**，并附 `developerProxy` JSON（脱敏）。\n\nFile v1.0.4:skill-card.md\n\n## Description: <br>\nHelps agents run Amazon SP-API Feeds workflows for store data uploads, including feed document creation, upload, feed submission, status checks, cancellation, and result document lookup. <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>\nDevelopers, agents, and ecommerce operators managing Amazon seller feeds use this skill to create feed documents, upload feed payloads, submit feeds, monitor processing status, cancel feeds, and retrieve result document metadata. <br>\n\n### Deployment Geography for Use: <br>\nGlobal; operations depend on the Amazon SP-API regions supported by the connected seller account. <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can access SP-API credentials, seller/feed data, local feed files, and outbound upload URLs. <br>\nMitigation: Install only when that access is acceptable, provide only the intended feed payloads, and confirm uploads use Amazon presigned URLs returned for the feed document. <br>\nRisk: The skill persists response and session data locally, which may include seller or feed details. <br>\nMitigation: Review saved response files before sharing them and periodically delete saved session data that is no longer needed. <br>\nRisk: Server security evidence marks the release suspicious because broad file upload and persistent logging behavior require review before installation. <br>\nMitigation: Review the skill and its security guidance before deployment, and avoid passing secrets or unrelated local files as feed payloads. <br>\n\n\n## Reference(s): <br>\n- [linkfox-amazon-store-feeds API reference](references/api.md) <br>\n- [Amazon SP-API createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) <br>\n- [Amazon SP-API getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) <br>\n- [Amazon SP-API createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed) <br>\n- [Amazon SP-API getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed) <br>\n- [Amazon SP-API getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds) <br>\n- [Amazon SP-API cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) <br>\n- [Amazon SP-API Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Shell commands, API Calls, Files, Guidance] <br>\n**Output Format:** [Markdown guidance with inline shell commands and JSON response files] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Scripts save full JSON responses to a local LinkFox session directory and may print summaries for larger responses.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (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.3: 12 files, 20105 bytes\n\nFiles: references/api.md (3721b), scripts/_spapi_feeds_common.py (12211b), scripts/cancel_feed.py (1638b), scripts/check_auth_dependency.py (6074b), scripts/create_feed_document.py (2055b), scripts/create_feed.py (2853b), scripts/get_feed_document.py (2193b), scripts/get_feed.py (1687b), scripts/get_feeds.py (3038b), scripts/upload_feed_document.py (3271b), SKILL.md (5968b), _meta.json (145b)\n\nFile v1.0.3:SKILL.md\n\n---\r\nname: linkfox-amazon-store-feeds\r\ndescription: 亚马逊店铺 Feeds（与 linkfox-amazon-store-auth / report / listings / pricing / orders 同系列），经 /spApi/developerProxy 调用 SP-API Feeds v2021-06-30：createFeedDocument、getFeedDocument、createFeed、getFeed、getFeeds、cancelFeed；另含 upload_feed_document 向预签名 URL 上传内容。当用户提到亚马逊 Feed、提交库存/Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、取消 Feed、查询 Feed 处理状态、Feeds API、SP-API 上传文件 时触发。\r\n---\r\n\r\n# Amazon 店铺 Feeds\r\n\r\n本 skill 与 **`linkfox-amazon-store-auth`** 等同属 **Amazon Store** 系列：先 **`POST /spApi/storeTokens`**，再 **`POST /spApi/developerProxy`** 转发 **GET / POST / DELETE**。\r\n\r\n## 调用方式\r\n\r\n- **API 端点**：`POST /spApi/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\r\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\r\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\r\n\r\n**输出策略（脚本默认行为）**：\r\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-feeds-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\r\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\r\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\r\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\r\n\r\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\r\n\r\n## 官方参考索引\r\n\r\n| 能力 | 文档 |\r\n|------|------|\r\n| createFeedDocument | [createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) |\r\n| getFeedDocument | [getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) |\r\n| createFeed | [createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed) |\r\n| getFeed | [getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed) |\r\n| getFeeds | [getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds) |\r\n| cancelFeed | [cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) |\r\n\r\n---\r\n\r\n## Prerequisites\r\n\r\n1. 依赖 **`linkfox-amazon-store-auth`**；运行 `python scripts/check_auth_dependency.py`，exit **42** 时需先安装授权 skill。\r\n2. 应用需具备 **Feeds** 相关角色；`feedType` 须与上传文件格式匹配（见 Amazon Feed Type Values 文档）。\r\n\r\n---\r\n\r\n## 典型工作流\r\n\r\n1. **`create_feed_document.py`** → 得到 `feedDocumentId` 与 **`url`**（上传地址）。\r\n2. **`upload_feed_document.py`** → 对 `url` **PUT** 上传 feed 文件（**不经** developerProxy）。\r\n3. **`create_feed.py`** → 传入 `inputFeedDocumentId`、`feedType`、`marketplaceIds`。\r\n4. **`get_feed.py`** / **`get_feeds.py`** → 轮询 `processingStatus`（如 IN_QUEUE、IN_PROGRESS、DONE、FATAL）。\r\n5. 处理完成后用 **`get_feed_document.py`** 下载 **resultFeedDocumentId** 对应文档（再按返回 URL 自行下载结果文件）。\r\n\r\n---\r\n\r\n## Current Capabilities\r\n\r\n| 能力 | path | method | 脚本 |\r\n|------|------|--------|------|\r\n| createFeedDocument | `feeds/2021-06-30/documents` | POST | `create_feed_document.py` |\r\n| getFeedDocument | `feeds/2021-06-30/documents/{feedDocumentId}` | GET | `get_feed_document.py` |\r\n| createFeed | `feeds/2021-06-30/feeds` | POST | `create_feed.py` |\r\n| getFeed | `feeds/2021-06-30/feeds/{feedId}` | GET | `get_feed.py` |\r\n| getFeeds | `feeds/2021-06-30/feeds` | GET | `get_feeds.py` |\r\n| cancelFeed | `feeds/2021-06-30/feeds/{feedId}` | DELETE | `cancel_feed.py` |\r\n| 上传文档内容 | createFeedDocument 返回的 URL | PUT | `upload_feed_document.py` |\r\n\r\n共享模块：**`_spapi_feeds_common.py`**。\r\n\r\n---\r\n\r\n## Scripts 示例\r\n\r\n```bash\r\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\r\n\r\npython scripts/create_feed_document.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\"}'\r\n\r\npython scripts/upload_feed_document.py '{\"uploadUrl\":\"<from createFeedDocument>\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\",\"filePath\":\"./inventory.tsv\"}'\r\n\r\npython scripts/create_feed.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"feedType\":\"POST_FLAT_FILE_INVLOADER_DATA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"inputFeedDocumentId\":\"<feedDocumentId>\"}'\r\n```\r\n\r\n---\r\n\r\n## Display Rules\r\n\r\n1. 先看 **`developerProxy.errcode` / `httpStatus`**；createFeedDocument 常为 **201**，createFeed 常为 **202**。\r\n2. **getFeeds** 分页：仅用上一页 **`nextToken`** 作为下一请求的 **`paginationToken` 参数名在 Amazon 侧为 `nextToken`**（脚本字段名 `nextToken`）。\r\n3. **upload** 失败与 SP-API 网关无关，检查 `uploadUrl` 是否过期、**Content-Type** 是否与 createFeedDocument 一致。\r\n4. 网关 path 白名单需包含 **`feeds/2021-06-30/`** 前缀。\r\n\r\n---\r\n\r\n## Important Limitations\r\n\r\n- 本 skill **不**代替 Amazon 侧 feed 文件 schema 校验；`feedType`、TSV/XML 格式以官方为准。\r\n- 下载 **getFeedDocument** 返回的 **url** 内容需另行 HTTP GET（与 upload 类似，不经 developerProxy）。\r\n- 详见 **`references/api.md`**。\r\n\r\n**Feedback：** `skillName`：`linkfox-amazon-store-feeds`。\r\n\r\n---\r\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-feeds\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1783066305675\n}\n\nFile v1.0.3:references/api.md\n\n# linkfox-amazon-store-feeds — API 参考（Feeds v2021-06-30）\n\n## 1. 调用链\n\n| 步骤 | 端点 | 说明 |\n|------|------|------|\n| 1 | `POST {BASE}/spApi/storeTokens` | `{\"sellerId\",\"region\"}` → `accessToken` |\n| 2 | `POST {BASE}/spApi/developerProxy` | 转发 SP-API（除文档上传/下载 URL 外） |\n\n环境变量：`LINKFOX_AGENT_API_KEY`（或 `LINKFOXAGENT_API_KEY`，必填）；`LINKFOX_TOOL_GATEWAY`（可选，默认 `https://tool-gateway.linkfox.com`，回退 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`）。\n\n### developerProxy Body\n\n| 字段 | 说明 |\n|------|------|\n| region | NA / EU / FE |\n| path | 如 `feeds/2021-06-30/feeds`，无前导 `/` |\n| method | GET / POST / DELETE |\n| amzAccessToken | storeTokens 返回值 |\n| queryString | 无 `?` 前缀 |\n| body | POST 时为 JSON 字符串 |\n| contentType | 一般 `application/json` |\n\n网关响应：`errcode`、`httpStatus`、`body`（字符串）。成功 HTTP 可能为 **200 / 201 / 202 / 204**。\n\n---\n\n## 2. 脚本入参摘要\n\n### 公共\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| sellerId | 是 | 卖家 ID |\n| region | 是 | 区域 |\n| skipDepCheck | 否 | 跳过本地 auth 探测 |\n\n### create_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| contentType | 是 | 与将要上传的文件 MIME 一致，如 `text/tab-separated-values; charset=UTF-8` |\n\n解析字段：**`feedDocument`**（含 `feedDocumentId`、`url` 等，以 Amazon 为准）。\n\n### upload_feed_document.py（不经 developerProxy）\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| uploadUrl | 是 | createFeedDocument 返回的 `url` |\n| contentType | 是 | 与 createFeedDocument 相同 |\n| filePath | 三选一 | 本地文件路径 |\n| content | 三选一 | UTF-8 字符串内容 |\n| contentBase64 | 三选一 | Base64 编码内容 |\n\n### create_feed.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedType | 是 | 如 `POST_FLAT_FILE_INVLOADER_DATA` |\n| marketplaceIds | 是 | 1～25 个站点 ID |\n| inputFeedDocumentId | 是 | 已上传内容的文档 ID |\n| feedOptions | 否 | 因 feedType 而异的对象 |\n\n### get_feed.py / cancel_feed.py\n\n| 字段 | 必填 |\n|------|------|\n| feedId | 是 |\n\n### get_feeds.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedTypes | 条件 | 与 nextToken 二选一；最多 10 个 |\n| nextToken | 条件 | 分页时**单独**传此参数 |\n| marketplaceIds | 否 | 最多 10 个 |\n| processingStatuses | 否 | CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE |\n| createdSince / createdUntil | 否 | ISO 8601 |\n| pageSize | 否 | 1～100，默认 10 |\n\n### get_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedDocumentId | 是 | |\n| enableContentEncodingUrlHeader | 否 | boolean；GZIP 时便于客户端自动解压 |\n\n---\n\n## 3. Feed 标准流程\n\n```text\ncreateFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url\n```\n\n---\n\n## 4. 常见 feedType（示例）\n\n以 [Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) 为准，例如：\n\n- `POST_PRODUCT_DATA` / `POST_INVENTORY_AVAILABILITY_DATA`\n- `POST_FLAT_FILE_INVLOADER_DATA`\n- `POST_ORDER_FULFILLMENT_DATA`\n\n---\n\n## 5. 错误与限制\n\n- **403**：权限或 feedType 未授权。\n- **1005**（网关）：path 未在白名单，需放行 `feeds/2021-06-30/`。\n- **429**：降频；getFeeds 等有独立 usage plan。\n- 上传 URL 有时效，过期需重新 createFeedDocument。\n\n---\n\n## 6. Feedback\n\n上报问题时注明 **`skillName`: `linkfox-amazon-store-feeds`**，并附 `developerProxy` JSON（脱敏）。\n\nArchive v1.0.2: 12 files, 20130 bytes\n\nFiles: references/api.md (3722b), scripts/_spapi_feeds_common.py (12389b), scripts/cancel_feed.py (1638b), scripts/check_auth_dependency.py (6074b), scripts/create_feed_document.py (2055b), scripts/create_feed.py (2853b), scripts/get_feed_document.py (2193b), scripts/get_feed.py (1687b), scripts/get_feeds.py (3038b), scripts/upload_feed_document.py (3271b), SKILL.md (5968b), _meta.json (145b)\n\nFile v1.0.2:SKILL.md\n\n---\r\nname: linkfox-amazon-store-feeds\r\ndescription: 亚马逊店铺 Feeds（与 linkfox-amazon-store-auth / report / listings / pricing / orders 同系列），经 /spApi/developerProxy 调用 SP-API Feeds v2021-06-30：createFeedDocument、getFeedDocument、createFeed、getFeed、getFeeds、cancelFeed；另含 upload_feed_document 向预签名 URL 上传内容。当用户提到亚马逊 Feed、提交库存/Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、取消 Feed、查询 Feed 处理状态、Feeds API、SP-API 上传文件 时触发。\r\n---\r\n\r\n# Amazon 店铺 Feeds\r\n\r\n本 skill 与 **`linkfox-amazon-store-auth`** 等同属 **Amazon Store** 系列：先 **`POST /spApi/storeTokens`**，再 **`POST /spApi/developerProxy`** 转发 **GET / POST / DELETE**。\r\n\r\n## 调用方式\r\n\r\n- **API 端点**：`POST /spApi/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\r\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\r\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\r\n\r\n**输出策略（脚本默认行为）**：\r\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-feeds-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\r\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\r\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\r\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\r\n\r\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\r\n\r\n## 官方参考索引\r\n\r\n| 能力 | 文档 |\r\n|------|------|\r\n| createFeedDocument | [createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) |\r\n| getFeedDocument | [getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) |\r\n| createFeed | [createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed) |\r\n| getFeed | [getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed) |\r\n| getFeeds | [getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds) |\r\n| cancelFeed | [cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) |\r\n\r\n---\r\n\r\n## Prerequisites\r\n\r\n1. 依赖 **`linkfox-amazon-store-auth`**；运行 `python scripts/check_auth_dependency.py`，exit **42** 时需先安装授权 skill。\r\n2. 应用需具备 **Feeds** 相关角色；`feedType` 须与上传文件格式匹配（见 Amazon Feed Type Values 文档）。\r\n\r\n---\r\n\r\n## 典型工作流\r\n\r\n1. **`create_feed_document.py`** → 得到 `feedDocumentId` 与 **`url`**（上传地址）。\r\n2. **`upload_feed_document.py`** → 对 `url` **PUT** 上传 feed 文件（**不经** developerProxy）。\r\n3. **`create_feed.py`** → 传入 `inputFeedDocumentId`、`feedType`、`marketplaceIds`。\r\n4. **`get_feed.py`** / **`get_feeds.py`** → 轮询 `processingStatus`（如 IN_QUEUE、IN_PROGRESS、DONE、FATAL）。\r\n5. 处理完成后用 **`get_feed_document.py`** 下载 **resultFeedDocumentId** 对应文档（再按返回 URL 自行下载结果文件）。\r\n\r\n---\r\n\r\n## Current Capabilities\r\n\r\n| 能力 | path | method | 脚本 |\r\n|------|------|--------|------|\r\n| createFeedDocument | `feeds/2021-06-30/documents` | POST | `create_feed_document.py` |\r\n| getFeedDocument | `feeds/2021-06-30/documents/{feedDocumentId}` | GET | `get_feed_document.py` |\r\n| createFeed | `feeds/2021-06-30/feeds` | POST | `create_feed.py` |\r\n| getFeed | `feeds/2021-06-30/feeds/{feedId}` | GET | `get_feed.py` |\r\n| getFeeds | `feeds/2021-06-30/feeds` | GET | `get_feeds.py` |\r\n| cancelFeed | `feeds/2021-06-30/feeds/{feedId}` | DELETE | `cancel_feed.py` |\r\n| 上传文档内容 | createFeedDocument 返回的 URL | PUT | `upload_feed_document.py` |\r\n\r\n共享模块：**`_spapi_feeds_common.py`**。\r\n\r\n---\r\n\r\n## Scripts 示例\r\n\r\n```bash\r\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\r\n\r\npython scripts/create_feed_document.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\"}'\r\n\r\npython scripts/upload_feed_document.py '{\"uploadUrl\":\"<from createFeedDocument>\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\",\"filePath\":\"./inventory.tsv\"}'\r\n\r\npython scripts/create_feed.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"feedType\":\"POST_FLAT_FILE_INVLOADER_DATA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"inputFeedDocumentId\":\"<feedDocumentId>\"}'\r\n```\r\n\r\n---\r\n\r\n## Display Rules\r\n\r\n1. 先看 **`developerProxy.errcode` / `httpStatus`**；createFeedDocument 常为 **201**，createFeed 常为 **202**。\r\n2. **getFeeds** 分页：仅用上一页 **`nextToken`** 作为下一请求的 **`paginationToken` 参数名在 Amazon 侧为 `nextToken`**（脚本字段名 `nextToken`）。\r\n3. **upload** 失败与 SP-API 网关无关，检查 `uploadUrl` 是否过期、**Content-Type** 是否与 createFeedDocument 一致。\r\n4. 网关 path 白名单需包含 **`feeds/2021-06-30/`** 前缀。\r\n\r\n---\r\n\r\n## Important Limitations\r\n\r\n- 本 skill **不**代替 Amazon 侧 feed 文件 schema 校验；`feedType`、TSV/XML 格式以官方为准。\r\n- 下载 **getFeedDocument** 返回的 **url** 内容需另行 HTTP GET（与 upload 类似，不经 developerProxy）。\r\n- 详见 **`references/api.md`**。\r\n\r\n**Feedback：** `skillName`：`linkfox-amazon-store-feeds`。\r\n\r\n---\r\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-feeds\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1783053415410\n}\n\nFile v1.0.2:references/api.md\n\n# linkfox-amazon-store-feeds — API 参考（Feeds v2021-06-30）\n\n## 1. 调用链\n\n| 步骤 | 端点 | 说明 |\n|------|------|------|\n| 1 | `POST {BASE}/spApi/storeTokens` | `{\"sellerId\",\"region\"}` → `accessToken` |\n| 2 | `POST {BASE}/spApi/developerProxy` | 转发 SP-API（除文档上传/下载 URL 外） |\n\n环境变量：`LINKFOX_AGENT_API_KEY`（或 `LINKFOXAGENT_API_KEY`，必填）；`LINKFOX_AGENT_API_URL`（可选，默认 `https://tool-gateway.linkfox.com`，回退 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`）。\n\n### developerProxy Body\n\n| 字段 | 说明 |\n|------|------|\n| region | NA / EU / FE |\n| path | 如 `feeds/2021-06-30/feeds`，无前导 `/` |\n| method | GET / POST / DELETE |\n| amzAccessToken | storeTokens 返回值 |\n| queryString | 无 `?` 前缀 |\n| body | POST 时为 JSON 字符串 |\n| contentType | 一般 `application/json` |\n\n网关响应：`errcode`、`httpStatus`、`body`（字符串）。成功 HTTP 可能为 **200 / 201 / 202 / 204**。\n\n---\n\n## 2. 脚本入参摘要\n\n### 公共\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| sellerId | 是 | 卖家 ID |\n| region | 是 | 区域 |\n| skipDepCheck | 否 | 跳过本地 auth 探测 |\n\n### create_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| contentType | 是 | 与将要上传的文件 MIME 一致，如 `text/tab-separated-values; charset=UTF-8` |\n\n解析字段：**`feedDocument`**（含 `feedDocumentId`、`url` 等，以 Amazon 为准）。\n\n### upload_feed_document.py（不经 developerProxy）\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| uploadUrl | 是 | createFeedDocument 返回的 `url` |\n| contentType | 是 | 与 createFeedDocument 相同 |\n| filePath | 三选一 | 本地文件路径 |\n| content | 三选一 | UTF-8 字符串内容 |\n| contentBase64 | 三选一 | Base64 编码内容 |\n\n### create_feed.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedType | 是 | 如 `POST_FLAT_FILE_INVLOADER_DATA` |\n| marketplaceIds | 是 | 1～25 个站点 ID |\n| inputFeedDocumentId | 是 | 已上传内容的文档 ID |\n| feedOptions | 否 | 因 feedType 而异的对象 |\n\n### get_feed.py / cancel_feed.py\n\n| 字段 | 必填 |\n|------|------|\n| feedId | 是 |\n\n### get_feeds.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedTypes | 条件 | 与 nextToken 二选一；最多 10 个 |\n| nextToken | 条件 | 分页时**单独**传此参数 |\n| marketplaceIds | 否 | 最多 10 个 |\n| processingStatuses | 否 | CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE |\n| createdSince / createdUntil | 否 | ISO 8601 |\n| pageSize | 否 | 1～100，默认 10 |\n\n### get_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedDocumentId | 是 | |\n| enableContentEncodingUrlHeader | 否 | boolean；GZIP 时便于客户端自动解压 |\n\n---\n\n## 3. Feed 标准流程\n\n```text\ncreateFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url\n```\n\n---\n\n## 4. 常见 feedType（示例）\n\n以 [Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) 为准，例如：\n\n- `POST_PRODUCT_DATA` / `POST_INVENTORY_AVAILABILITY_DATA`\n- `POST_FLAT_FILE_INVLOADER_DATA`\n- `POST_ORDER_FULFILLMENT_DATA`\n\n---\n\n## 5. 错误与限制\n\n- **403**：权限或 feedType 未授权。\n- **1005**（网关）：path 未在白名单，需放行 `feeds/2021-06-30/`。\n- **429**：降频；getFeeds 等有独立 usage plan。\n- 上传 URL 有时效，过期需重新 createFeedDocument。\n\n---\n\n## 6. Feedback\n\n上报问题时注明 **`skillName`: `linkfox-amazon-store-feeds`**，并附 `developerProxy` JSON（脱敏）。\n\nArchive v1.0.1: 14 files, 25481 bytes\n\nFiles: references/api.md (3659b), scripts/_spapi_feeds_common.py (5712b), scripts/cancel_feed.py (1539b), scripts/check_auth_dependency.py (6074b), scripts/create_feed_document.py (1944b), scripts/create_feed.py (2719b), scripts/get_feed_document.py (2081b), scripts/get_feed.py (1586b), scripts/get_feeds.py (2903b), scripts/response_io.py (18387b), scripts/upload_feed_document.py (3208b), skill-card.md (3195b), SKILL.md (6231b), _meta.json (145b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: linkfox-amazon-store-feeds\ndescription: 亚马逊店铺 Feeds（与 linkfox-amazon-store-auth / report / listings / pricing / orders 同系列），经 /spApi/developerProxy 调用 SP-API Feeds v2021-06-30：createFeedDocument、getFeedDocument、createFeed、getFeed、getFeeds、cancelFeed；另含 upload_feed_document 向预签名 URL 上传内容。当用户提到亚马逊 Feed、提交库存/Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、取消 Feed、查询 Feed 处理状态、Feeds API、SP-API 上传文件 时触发。\n---\n\n# Amazon 店铺 Feeds\n\n本 skill 与 **`linkfox-amazon-store-auth`** 等同属 **Amazon Store** 系列：先 **`POST /spApi/storeTokens`**，再 **`POST /spApi/developerProxy`** 转发 **GET / POST / DELETE**。\n\n## 官方参考索引\n\n| 能力 | 文档 |\n|------|------|\n| createFeedDocument | [createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) |\n| getFeedDocument | [getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) |\n| createFeed | [createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed) |\n| getFeed | [getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed) |\n| getFeeds | [getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds) |\n| cancelFeed | [cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) |\n\n---\n\n## Prerequisites\n\n1. 依赖 **`linkfox-amazon-store-auth`**；运行 `python scripts/check_auth_dependency.py`，exit **42** 时需先安装授权 skill。\n2. 应用需具备 **Feeds** 相关角色；`feedType` 须与上传文件格式匹配（见 Amazon Feed Type Values 文档）。\n\n---\n\n## 典型工作流\n\n1. **`create_feed_document.py`** → 得到 `feedDocumentId` 与 **`url`**（上传地址）。\n2. **`upload_feed_document.py`** → 对 `url` **PUT** 上传 feed 文件（**不经** developerProxy）。\n3. **`create_feed.py`** → 传入 `inputFeedDocumentId`、`feedType`、`marketplaceIds`。\n4. **`get_feed.py`** / **`get_feeds.py`** → 轮询 `processingStatus`（如 IN_QUEUE、IN_PROGRESS、DONE、FATAL）。\n5. 处理完成后用 **`get_feed_document.py`** 下载 **resultFeedDocumentId** 对应文档（再按返回 URL 自行下载结果文件）。\n\n---\n\n## Current Capabilities\n\n| 能力 | path | method | 脚本 |\n|------|------|--------|------|\n| createFeedDocument | `feeds/2021-06-30/documents` | POST | `create_feed_document.py` |\n| getFeedDocument | `feeds/2021-06-30/documents/{feedDocumentId}` | GET | `get_feed_document.py` |\n| createFeed | `feeds/2021-06-30/feeds` | POST | `create_feed.py` |\n| getFeed | `feeds/2021-06-30/feeds/{feedId}` | GET | `get_feed.py` |\n| getFeeds | `feeds/2021-06-30/feeds` | GET | `get_feeds.py` |\n| cancelFeed | `feeds/2021-06-30/feeds/{feedId}` | DELETE | `cancel_feed.py` |\n| 上传文档内容 | createFeedDocument 返回的 URL | PUT | `upload_feed_document.py` |\n\n共享模块：**`_spapi_feeds_common.py`**。\n\n---\n\n## Scripts 示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/create_feed_document.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\"}'\n\npython scripts/upload_feed_document.py '{\"uploadUrl\":\"<from createFeedDocument>\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\",\"filePath\":\"./inventory.tsv\"}'\n\npython scripts/create_feed.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"feedType\":\"POST_FLAT_FILE_INVLOADER_DATA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"inputFeedDocumentId\":\"<feedDocumentId>\"}'\n```\n\n---\n\n## Display Rules\n\n1. 先看 **`developerProxy.errcode` / `httpStatus`**；createFeedDocument 常为 **201**，createFeed 常为 **202**。\n2. **getFeeds** 分页：仅用上一页 **`nextToken`** 作为下一请求的 **`paginationToken` 参数名在 Amazon 侧为 `nextToken`**（脚本字段名 `nextToken`）。\n3. **upload** 失败与 SP-API 网关无关，检查 `uploadUrl` 是否过期、**Content-Type** 是否与 createFeedDocument 一致。\n4. 网关 path 白名单需包含 **`feeds/2021-06-30/`** 前缀。\n\n---\n\n## Important Limitations\n\n- 本 skill **不**代替 Amazon 侧 feed 文件 schema 校验；`feedType`、TSV/XML 格式以官方为准。\n- 下载 **getFeedDocument** 返回的 **url** 内容需另行 HTTP GET（与 upload 类似，不经 developerProxy）。\n- 详见 **`references/api.md`**。\n\n**Feedback：** `skillName`：`linkfox-amazon-store-feeds`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\n<!-- LF_LARGE_RESPONSE_BLOCK -->\n## Handling Large Responses\n\nTo avoid overflowing the agent context, persist the response to disk and extract only the fields you need:\n\n```\npython scripts/response_io.py run --script scripts/cancel_feed.py --out-dir <DIR> '<params>'\npython scripts/response_io.py read <file> --fields \"<paths>\"   # or --path \"<JMESPath>\"\n```\n\n> Pick `--out-dir` outside any git working tree (e.g. `/tmp/...` on Unix, `%TEMP%/...` on Windows). Persisted responses may contain PII, pricing, or auth-sensitive data — do not commit them. Files are not auto-deleted; clean up when the task is done.\n\n> This skill exposes multiple entry scripts: `cancel_feed.py`, `check_auth_dependency.py`, `create_feed.py`, `create_feed_document.py`, `get_feed.py`, `get_feed_document.py`, `get_feeds.py`, `upload_feed_document.py`. Pass `--script scripts/<name>.py` to choose the one you need.\n\n`run` writes the full response to a file and emits only a schema preview + file path. `read` projects specific fields, with `--limit/--offset` for slicing and `--format json|jsonl|csv|table` for output.\n\n**When to prefer this pattern** — apply your judgment based on the response characteristics, e.g.:\n- High field count per record, or fields you don't need\n- Batch/paginated results (multiple items per call)\n- Long-text fields (descriptions, reviews, HTML, time series)\n- Output reused across later steps rather than consumed immediately\n\nFor small, single-use responses, calling the main script directly is fine.\n\n⚠️ The preview is a truncated schema + sample, not the full data. Any field-level decision must read from the persisted file via `read`.\n<!-- /LF_LARGE_RESPONSE_BLOCK -->\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-feeds\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1782726301883\n}\n\nFile v1.0.1:references/api.md\n\n# linkfox-amazon-store-feeds — API 参考（Feeds v2021-06-30）\n\n## 1. 调用链\n\n| 步骤 | 端点 | 说明 |\n|------|------|------|\n| 1 | `POST {BASE}/spApi/storeTokens` | `{\"sellerId\",\"region\"}` → `accessToken` |\n| 2 | `POST {BASE}/spApi/developerProxy` | 转发 SP-API（除文档上传/下载 URL 外） |\n\n环境变量：`LINKFOXAGENT_API_KEY`（必填）；`STORE_API_BASE_URL` / `SPAPI_BASE_URL`（可选，默认 `https://tool-gateway.linkfox.com`）。\n\n### developerProxy Body\n\n| 字段 | 说明 |\n|------|------|\n| region | NA / EU / FE |\n| path | 如 `feeds/2021-06-30/feeds`，无前导 `/` |\n| method | GET / POST / DELETE |\n| amzAccessToken | storeTokens 返回值 |\n| queryString | 无 `?` 前缀 |\n| body | POST 时为 JSON 字符串 |\n| contentType | 一般 `application/json` |\n\n网关响应：`errcode`、`httpStatus`、`body`（字符串）。成功 HTTP 可能为 **200 / 201 / 202 / 204**。\n\n---\n\n## 2. 脚本入参摘要\n\n### 公共\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| sellerId | 是 | 卖家 ID |\n| region | 是 | 区域 |\n| skipDepCheck | 否 | 跳过本地 auth 探测 |\n\n### create_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| contentType | 是 | 与将要上传的文件 MIME 一致，如 `text/tab-separated-values; charset=UTF-8` |\n\n解析字段：**`feedDocument`**（含 `feedDocumentId`、`url` 等，以 Amazon 为准）。\n\n### upload_feed_document.py（不经 developerProxy）\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| uploadUrl | 是 | createFeedDocument 返回的 `url` |\n| contentType | 是 | 与 createFeedDocument 相同 |\n| filePath | 三选一 | 本地文件路径 |\n| content | 三选一 | UTF-8 字符串内容 |\n| contentBase64 | 三选一 | Base64 编码内容 |\n\n### create_feed.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedType | 是 | 如 `POST_FLAT_FILE_INVLOADER_DATA` |\n| marketplaceIds | 是 | 1～25 个站点 ID |\n| inputFeedDocumentId | 是 | 已上传内容的文档 ID |\n| feedOptions | 否 | 因 feedType 而异的对象 |\n\n### get_feed.py / cancel_feed.py\n\n| 字段 | 必填 |\n|------|------|\n| feedId | 是 |\n\n### get_feeds.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedTypes | 条件 | 与 nextToken 二选一；最多 10 个 |\n| nextToken | 条件 | 分页时**单独**传此参数 |\n| marketplaceIds | 否 | 最多 10 个 |\n| processingStatuses | 否 | CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE |\n| createdSince / createdUntil | 否 | ISO 8601 |\n| pageSize | 否 | 1～100，默认 10 |\n\n### get_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedDocumentId | 是 | |\n| enableContentEncodingUrlHeader | 否 | boolean；GZIP 时便于客户端自动解压 |\n\n---\n\n## 3. Feed 标准流程\n\n```text\ncreateFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url\n```\n\n---\n\n## 4. 常见 feedType（示例）\n\n以 [Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) 为准，例如：\n\n- `POST_PRODUCT_DATA` / `POST_INVENTORY_AVAILABILITY_DATA`\n- `POST_FLAT_FILE_INVLOADER_DATA`\n- `POST_ORDER_FULFILLMENT_DATA`\n\n---\n\n## 5. 错误与限制\n\n- **403**：权限或 feedType 未授权。\n- **1005**（网关）：path 未在白名单，需放行 `feeds/2021-06-30/`。\n- **429**：降频；getFeeds 等有独立 usage plan。\n- 上传 URL 有时效，过期需重新 createFeedDocument。\n\n---\n\n## 6. Feedback\n\n上报问题时注明 **`skillName`: `linkfox-amazon-store-feeds`**，并附 `developerProxy` JSON（脱敏）。\n\nFile v1.0.1:skill-card.md\n\n## Description: <br>\nHelps agents manage Amazon SP-API Feeds through LinkFox workflows, including creating feed documents, uploading feed content, creating feeds, checking status, listing feeds, retrieving feed documents, and canceling feeds. <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>\nDevelopers and operators managing Amazon seller integrations use this skill to submit inventory or listing feed files, monitor SP-API feed jobs, retrieve feed documents, and cancel feeds through LinkFox-authenticated scripts. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can create and cancel Amazon seller feed operations. <br>\nMitigation: Use explicit seller, marketplace, feed, and file parameters, and confirm before creating or canceling feeds. <br>\nRisk: The upload helper can send local file content to a supplied URL. <br>\nMitigation: Upload only files intended for the feed, only to the presigned URL returned by createFeedDocument, and keep the Content-Type consistent with the feed document request. <br>\nRisk: The skill depends on LINKFOXAGENT_API_KEY and may handle sensitive Amazon seller feed data. <br>\nMitigation: Install only if you trust LinkFox with the API key and seller feed operations, and avoid exposing credentials or response files. <br>\nRisk: Persisted response files may contain sensitive business or account data. <br>\nMitigation: Write response files outside git working trees and delete them from the chosen output directory when finished. <br>\n\n\n## Reference(s): <br>\n- [Skill API reference](references/api.md) <br>\n- [Amazon createFeedDocument reference](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) <br>\n- [Amazon getFeedDocument reference](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) <br>\n- [Amazon createFeed reference](https://developer-docs.amazon.com/sp-api/reference/createfeed) <br>\n- [Amazon getFeed reference](https://developer-docs.amazon.com/sp-api/reference/getfeed) <br>\n- [Amazon getFeeds reference](https://developer-docs.amazon.com/sp-api/reference/getfeeds) <br>\n- [Amazon cancelFeed reference](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) <br>\n- [Amazon Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [shell commands, json, guidance, files] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON API responses.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Large responses can be persisted to a caller-chosen output directory and read back by field or JMESPath projection.] <br>\n\n## Skill Version(s): <br>\n1.0.1 (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 v0.0.1: 13 files, 18337 bytes\n\nFiles: references/api.md (3659b), scripts/_spapi_feeds_common.py (5712b), scripts/cancel_feed.py (1539b), scripts/check_auth_dependency.py (6074b), scripts/create_feed_document.py (1944b), scripts/create_feed.py (2719b), scripts/get_feed_document.py (2081b), scripts/get_feed.py (1586b), scripts/get_feeds.py (2903b), scripts/upload_feed_document.py (3208b), skill-card.md (3430b), SKILL.md (4582b), _meta.json (145b)\n\nFile v0.0.1:SKILL.md\n\n---\nname: linkfox-amazon-store-feeds\nversion: 0.0.1\ncategory: product-sourcing\ndescription: 亚马逊店铺 Feeds（与 linkfox-amazon-store-auth / report / listings / pricing / orders 同系列），经 /spApi/developerProxy 调用 SP-API Feeds v2021-06-30：createFeedDocument、getFeedDocument、createFeed、getFeed、getFeeds、cancelFeed；另含 upload_feed_document 向预签名 URL 上传内容。当用户提到亚马逊 Feed、提交库存/Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、取消 Feed、查询 Feed 处理状态、Feeds API、SP-API 上传文件 时触发。\n---\n\n# Amazon 店铺 Feeds\n\n本 skill 与 **`linkfox-amazon-store-auth`** 等同属 **Amazon Store** 系列：先 **`POST /spApi/storeTokens`**，再 **`POST /spApi/developerProxy`** 转发 **GET / POST / DELETE**。\n\n## 官方参考索引\n\n| 能力 | 文档 |\n|------|------|\n| createFeedDocument | [createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) |\n| getFeedDocument | [getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) |\n| createFeed | [createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed) |\n| getFeed | [getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed) |\n| getFeeds | [getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds) |\n| cancelFeed | [cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) |\n\n---\n\n## Prerequisites\n\n1. 依赖 **`linkfox-amazon-store-auth`**；运行 `python scripts/check_auth_dependency.py`，exit **42** 时需先安装授权 skill。\n2. 应用需具备 **Feeds** 相关角色；`feedType` 须与上传文件格式匹配（见 Amazon Feed Type Values 文档）。\n\n---\n\n## 典型工作流\n\n1. **`create_feed_document.py`** → 得到 `feedDocumentId` 与 **`url`**（上传地址）。\n2. **`upload_feed_document.py`** → 对 `url` **PUT** 上传 feed 文件（**不经** developerProxy）。\n3. **`create_feed.py`** → 传入 `inputFeedDocumentId`、`feedType`、`marketplaceIds`。\n4. **`get_feed.py`** / **`get_feeds.py`** → 轮询 `processingStatus`（如 IN_QUEUE、IN_PROGRESS、DONE、FATAL）。\n5. 处理完成后用 **`get_feed_document.py`** 下载 **resultFeedDocumentId** 对应文档（再按返回 URL 自行下载结果文件）。\n\n---\n\n## Current Capabilities\n\n| 能力 | path | method | 脚本 |\n|------|------|--------|------|\n| createFeedDocument | `feeds/2021-06-30/documents` | POST | `create_feed_document.py` |\n| getFeedDocument | `feeds/2021-06-30/documents/{feedDocumentId}` | GET | `get_feed_document.py` |\n| createFeed | `feeds/2021-06-30/feeds` | POST | `create_feed.py` |\n| getFeed | `feeds/2021-06-30/feeds/{feedId}` | GET | `get_feed.py` |\n| getFeeds | `feeds/2021-06-30/feeds` | GET | `get_feeds.py` |\n| cancelFeed | `feeds/2021-06-30/feeds/{feedId}` | DELETE | `cancel_feed.py` |\n| 上传文档内容 | createFeedDocument 返回的 URL | PUT | `upload_feed_document.py` |\n\n共享模块：**`_spapi_feeds_common.py`**。\n\n---\n\n## Scripts 示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/create_feed_document.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\"}'\n\npython scripts/upload_feed_document.py '{\"uploadUrl\":\"<from createFeedDocument>\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\",\"filePath\":\"./inventory.tsv\"}'\n\npython scripts/create_feed.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"feedType\":\"POST_FLAT_FILE_INVLOADER_DATA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"inputFeedDocumentId\":\"<feedDocumentId>\"}'\n```\n\n---\n\n## Display Rules\n\n1. 先看 **`developerProxy.errcode` / `httpStatus`**；createFeedDocument 常为 **201**，createFeed 常为 **202**。\n2. **getFeeds** 分页：仅用上一页 **`nextToken`** 作为下一请求的 **`paginationToken` 参数名在 Amazon 侧为 `nextToken`**（脚本字段名 `nextToken`）。\n3. **upload** 失败与 SP-API 网关无关，检查 `uploadUrl` 是否过期、**Content-Type** 是否与 createFeedDocument 一致。\n4. 网关 path 白名单需包含 **`feeds/2021-06-30/`** 前缀。\n\n---\n\n## Important Limitations\n\n- 本 skill **不**代替 Amazon 侧 feed 文件 schema 校验；`feedType`、TSV/XML 格式以官方为准。\n- 下载 **getFeedDocument** 返回的 **url** 内容需另行 HTTP GET（与 upload 类似，不经 developerProxy）。\n- 详见 **`references/api.md`**。\n\n**Feedback：** `skillName`：`linkfox-amazon-store-feeds`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v0.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-feeds\",\n  \"version\": \"0.0.1\",\n  \"publishedAt\": 1779260613339\n}\n\nFile v0.0.1:references/api.md\n\n# linkfox-amazon-store-feeds — API 参考（Feeds v2021-06-30）\n\n## 1. 调用链\n\n| 步骤 | 端点 | 说明 |\n|------|------|------|\n| 1 | `POST {BASE}/spApi/storeTokens` | `{\"sellerId\",\"region\"}` → `accessToken` |\n| 2 | `POST {BASE}/spApi/developerProxy` | 转发 SP-API（除文档上传/下载 URL 外） |\n\n环境变量：`LINKFOXAGENT_API_KEY`（必填）；`STORE_API_BASE_URL` / `SPAPI_BASE_URL`（可选，默认 `https://tool-gateway.linkfox.com`）。\n\n### developerProxy Body\n\n| 字段 | 说明 |\n|------|------|\n| region | NA / EU / FE |\n| path | 如 `feeds/2021-06-30/feeds`，无前导 `/` |\n| method | GET / POST / DELETE |\n| amzAccessToken | storeTokens 返回值 |\n| queryString | 无 `?` 前缀 |\n| body | POST 时为 JSON 字符串 |\n| contentType | 一般 `application/json` |\n\n网关响应：`errcode`、`httpStatus`、`body`（字符串）。成功 HTTP 可能为 **200 / 201 / 202 / 204**。\n\n---\n\n## 2. 脚本入参摘要\n\n### 公共\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| sellerId | 是 | 卖家 ID |\n| region | 是 | 区域 |\n| skipDepCheck | 否 | 跳过本地 auth 探测 |\n\n### create_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| contentType | 是 | 与将要上传的文件 MIME 一致，如 `text/tab-separated-values; charset=UTF-8` |\n\n解析字段：**`feedDocument`**（含 `feedDocumentId`、`url` 等，以 Amazon 为准）。\n\n### upload_feed_document.py（不经 developerProxy）\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| uploadUrl | 是 | createFeedDocument 返回的 `url` |\n| contentType | 是 | 与 createFeedDocument 相同 |\n| filePath | 三选一 | 本地文件路径 |\n| content | 三选一 | UTF-8 字符串内容 |\n| contentBase64 | 三选一 | Base64 编码内容 |\n\n### create_feed.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedType | 是 | 如 `POST_FLAT_FILE_INVLOADER_DATA` |\n| marketplaceIds | 是 | 1～25 个站点 ID |\n| inputFeedDocumentId | 是 | 已上传内容的文档 ID |\n| feedOptions | 否 | 因 feedType 而异的对象 |\n\n### get_feed.py / cancel_feed.py\n\n| 字段 | 必填 |\n|------|------|\n| feedId | 是 |\n\n### get_feeds.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedTypes | 条件 | 与 nextToken 二选一；最多 10 个 |\n| nextToken | 条件 | 分页时**单独**传此参数 |\n| marketplaceIds | 否 | 最多 10 个 |\n| processingStatuses | 否 | CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE |\n| createdSince / createdUntil | 否 | ISO 8601 |\n| pageSize | 否 | 1～100，默认 10 |\n\n### get_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedDocumentId | 是 | |\n| enableContentEncodingUrlHeader | 否 | boolean；GZIP 时便于客户端自动解压 |\n\n---\n\n## 3. Feed 标准流程\n\n```text\ncreateFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url\n```\n\n---\n\n## 4. 常见 feedType（示例）\n\n以 [Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) 为准，例如：\n\n- `POST_PRODUCT_DATA` / `POST_INVENTORY_AVAILABILITY_DATA`\n- `POST_FLAT_FILE_INVLOADER_DATA`\n- `POST_ORDER_FULFILLMENT_DATA`\n\n---\n\n## 5. 错误与限制\n\n- **403**：权限或 feedType 未授权。\n- **1005**（网关）：path 未在白名单，需放行 `feeds/2021-06-30/`。\n- **429**：降频；getFeeds 等有独立 usage plan。\n- 上传 URL 有时效，过期需重新 createFeedDocument。\n\n---\n\n## 6. Feedback\n\n上报问题时注明 **`skillName`: `linkfox-amazon-store-feeds`**，并附 `developerProxy` JSON（脱敏）。\n\nFile v0.0.1:skill-card.md\n\n## Description: <br>\nHelps agents manage Amazon SP-API Feeds v2021-06-30 through LinkFox store-token and developer-proxy calls, including creating feed documents, uploading feed content, creating feeds, checking feed status, listing feeds, retrieving feed documents, and canceling feeds. <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 operators use this skill to prepare, submit, monitor, and cancel Amazon seller feed workflows from an agent environment. It is intended for workflows that already have LinkFox API credentials, Amazon seller authorization, and the required Amazon Feeds roles. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill requires sensitive credentials and may process seller IDs, feed files, feed results, API keys, and access tokens. <br>\nMitigation: Install only when the publisher is trusted, keep LINKFOXAGENT_API_KEY and Amazon tokens protected, and treat feed input and output files as sensitive business data. <br>\nRisk: The scripts make network calls to configured LinkFox gateway endpoints and to Amazon presigned upload URLs. <br>\nMitigation: Verify STORE_API_BASE_URL, SPAPI_BASE_URL, and uploadUrl values before execution, and confirm that the upload URL came from the expected createFeedDocument response. <br>\nRisk: Creating or canceling feeds can affect Amazon seller listings, inventory, fulfillment, or other store operations. <br>\nMitigation: Review feedType, contentType, marketplaceIds, inputFeedDocumentId, and cancellation targets before running the scripts. <br>\n\n\n## Reference(s): <br>\n- [ClawHub release page](https://clawhub.ai/linkfox-ai/linkfox-amazon-store-feeds) <br>\n- [Local API reference](references/api.md) <br>\n- [Amazon SP-API createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) <br>\n- [Amazon SP-API getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) <br>\n- [Amazon SP-API createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed) <br>\n- [Amazon SP-API getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed) <br>\n- [Amazon SP-API getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds) <br>\n- [Amazon SP-API cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) <br>\n- [Amazon SP-API Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with shell commands, JSON command inputs, and JSON script outputs] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Scripts require LINKFOXAGENT_API_KEY and Amazon seller/feed identifiers; feed file contents and returned feed documents may contain sensitive business data.] <br>\n\n## Skill Version(s): <br>\n0.0.1 (source: frontmatter and 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>","readmeExcerpt":"Skill: 亚马逊-店铺数据上传 Owner: linkfox-ai Summary: 亚马逊店铺 Feed 批量数据提交与处理状态管理。用于创建 Feed 文档、向预签名地址上传 Feed 内容、提交库存或 Listing 等批量文件、查询或列出 Feed、获取结果文档以及取消 Feed。用户提到亚马逊 Feed、批量更新库存或商品、提交 Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、Feed 处理状态、Feed 结果、取消 Feed、Feeds API 时触发。即使未明确说“Feed”，只要希望通过亚马逊 SP-API 批量提交结构化商品或库存数据，也应触发此技能；单个 Listing 的增删改查使用 linkfox-amazon-store-listings。 Tags: latest:1.0.8 Version history: v1.0.8 | ","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/create_feed_document.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\"}'\n\npython scripts/upload_feed_document.py '{\"uploadUrl\":\"<from createFeedDocument>\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\",\"filePath\":\"./inventory.tsv\"}'\n\npython scripts/create_feed.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"feedType\":\"POST_FLAT_FILE_INVLOADER_DATA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"inputFeedDocumentId\":\"<feedDocumentId>\"}'"},{"language":"text","snippet":"createFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url"},{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/create_feed_document.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\"}'\n\npython scripts/upload_feed_document.py '{\"uploadUrl\":\"<from createFeedDocument>\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\",\"filePath\":\"./inventory.tsv\"}'\n\npython scripts/create_feed.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"feedType\":\"POST_FLAT_FILE_INVLOADER_DATA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"inputFeedDocumentId\":\"<feedDocumentId>\"}'"},{"language":"text","snippet":"createFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url"},{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/create_feed_document.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\"}'\n\npython scripts/upload_feed_document.py '{\"uploadUrl\":\"<from createFeedDocument>\",\"contentType\":\"text/tab-separated-values; charset=UTF-8\",\"filePath\":\"./inventory.tsv\"}'\n\npython scripts/create_feed.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"feedType\":\"POST_FLAT_FILE_INVLOADER_DATA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"inputFeedDocumentId\":\"<feedDocumentId>\"}'"},{"language":"text","snippet":"createFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: linkfox-amazon-store-feeds\ndescription: 亚马逊店铺 Feed 批量数据提交与处理状态管理。用于创建 Feed 文档、向预签名地址上传 Feed 内容、提交库存或 Listing 等批量文件、查询或列出 Feed、获取结果文档以及取消 Feed。用户提到亚马逊 Feed、批量更新库存或商品、提交 Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、Feed 处理状态、Feed 结果、取消 Feed、Feeds API 时触发。即使未明确说“Feed”，只要希望通过亚马逊 SP-API 批量提交结构化商品或库存数据，也应触发此技能；单个 Listing 的增删改查使用 linkfox-amazon-store-listings。\n---\n\n# Amazon 店铺 Feeds\n\n本 skill 与 **`linkfox-amazon-store-auth`** 等同属 **Amazon Store** 系列：依赖 **`linkfox-amazon-store-auth`** 选店（`sellerId`+`region`）；直接 **`POST /spApi/developerProxy`** 传入 `sellerId`+`region`，由服务端解析 token（勿传 `amzAccessToken`，除非兼容旧调用）。转发 **GET / POST / DELETE**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗算力；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-feeds-<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\n| 能力 | 文档 |\n|------|------|\n| createFeedDocument | [createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument) |\n| getFeedDocument | [getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument) |\n| createFeed | [createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed) |\n| getFeed | [getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed) |\n| getFeeds | [getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds) |\n| cancelFeed | [cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed) |\n\n---\n\n## Prerequisites\n\n1. 依赖 **`linkfox-amazon-store-auth`**；运行 `python scripts/check_auth_dependency.py`，exit **42** 时需先安装授权 skill。\n2. 应用需具备 **Feeds** 相关角色；`feedType` 须与上传文件格式匹配（见 Amazon Feed Type Values 文档）。\n\n---\n\n## 典型工作流\n\n1. **`create_feed_document.py`** → 得到 `feedDocumentId` 与 **`url`**（上传地址）。\n2. **`upload_feed_document.py`** → 对 `url` **PUT** 上传 feed 文件（**不经** developerProxy）。\n3. **`create_feed.py`** → 传入 `inputFeedDocumentId`、`feedType`、`marketplaceIds`。\n4. **`get_feed.py`** / **`get_feeds.py`** → 轮询 `processingStatus`（如 IN_QUEUE、IN_PROGRESS、DONE、FATAL）。\n5. 处理完成后用 **`get_feed_document.py`** 下载 **resultFeedDocumentId** 对应文档（再按返回 URL 自行下载结果文件）。\n\n---\n\n## Current Capabilities\n\n| 能力 | path | method | 脚本 |\n|------|------|-"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-feeds\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1789361821950\n}"},{"path":"references/api.md","content":"# linkfox-amazon-store-feeds — API 参考（Feeds v2021-06-30）\n\n## 1. 调用链\n\n| 步骤 | 端点 | 说明 |\n|------|------|------|\n| 1 | `POST {BASE}/spApi/storeTokens` | `{\"sellerId\",\"region\"}` → `accessToken` |\n| 2 | `POST {BASE}/spApi/developerProxy` | 转发 SP-API（除文档上传/下载 URL 外） |\n\n环境变量：`LINKFOX_AGENT_API_KEY`（或 `LINKFOXAGENT_API_KEY`，必填）（如未配置 按 SKILL.md 的 **## 解决认证和算力问题** 处理）；`LINKFOX_TOOL_GATEWAY`（可选，默认 `https://tool-gateway.linkfox.com`，回退 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`）。\n\n### developerProxy Body\n\n| 字段 | 说明 |\n|------|------|\n| region | NA / EU / FE |\n| path | 如 `feeds/2021-06-30/feeds`，无前导 `/` |\n| method | GET / POST / DELETE |\n| amzAccessToken | storeTokens 返回值 |\n| queryString | 无 `?` 前缀 |\n| body | POST 时为 JSON 字符串 |\n| contentType | 一般 `application/json` |\n\n网关响应：`errcode`、`httpStatus`、`body`（字符串）。成功 HTTP 可能为 **200 / 201 / 202 / 204**。\n\n---\n\n## 2. 脚本入参摘要\n\n### 公共\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| sellerId | 是 | 卖家 ID |\n| region | 是 | 区域 |\n| skipDepCheck | 否 | 跳过本地 auth 探测 |\n\n### create_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| contentType | 是 | 与将要上传的文件 MIME 一致，如 `text/tab-separated-values; charset=UTF-8` |\n\n解析字段：**`feedDocument`**（含 `feedDocumentId`、`url` 等，以 Amazon 为准）。\n\n### upload_feed_document.py（不经 developerProxy）\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| uploadUrl | 是 | createFeedDocument 返回的 `url` |\n| contentType | 是 | 与 createFeedDocument 相同 |\n| filePath | 三选一 | 本地文件路径 |\n| content | 三选一 | UTF-8 字符串内容 |\n| contentBase64 | 三选一 | Base64 编码内容 |\n\n### create_feed.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedType | 是 | 如 `POST_FLAT_FILE_INVLOADER_DATA` |\n| marketplaceIds | 是 | 1～25 个站点 ID |\n| inputFeedDocumentId | 是 | 已上传内容的文档 ID |\n| feedOptions | 否 | 因 feedType 而异的对象 |\n\n### get_feed.py / cancel_feed.py\n\n| 字段 | 必填 |\n|------|------|\n| feedId | 是 |\n\n### get_feeds.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedTypes | 条件 | 与 nextToken 二选一；最多 10 个 |\n| nextToken | 条件 | 分页时**单独**传此参数 |\n| marketplaceIds | 否 | 最多 10 个 |\n| processingStatuses | 否 | CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE |\n| createdSince / createdUntil | 否 | ISO 8601 |\n| pageSize | 否 | 1～100，默认 10 |\n\n### get_feed_document.py\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| feedDocumentId | 是 | |\n| enableContentEncodingUrlHeader | 否 | boolean；GZIP 时便于客户端自动解压 |\n\n---\n\n## 3. Feed 标准流程\n\n```text\ncreateFeedDocument → PUT uploadUrl (upload_feed_document.py)\n    → createFeed → poll getFeed until DONE/FATAL\n    → getFeedDocument(resultFeedDocumentId) → GET 结果 url\n```\n\n---\n\n## 4. 常见 feedType（示例）\n\n以 [Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values) 为准，例如：\n\n- `POST_PRODUCT_DATA` / `POST_INVENTORY_AVAILABILITY_DATA`\n- `POST_FLAT_FILE_INVLOADER_DATA`\n- `POST_ORDER_FULFILLMENT_DATA`\n\n---\n\n## 5. 错误与限制\n\n- **401**：HTTP 401 或 authorized error：按 SKILL.md 的 **## 解决认证和算力问题** 处理。\n- **402**：HTTP 402：按 SKILL.md 的 **## 解决认证和算力问题** 处理。\n- **403**：权限或 feedType 未授权。\n- **1005**（网关）：path 未在白名单，需放行 `feeds/2021-06-30/`。\n- **429**：降频；getFeeds 等有独立 usage plan。\n- 上传 U"},{"path":"references/onboarding.md","content":"# 解决认证和算力问题\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`。"},{"path":"skill-card.md","content":"## Description:\n\nHelps agents manage Amazon store Feed workflows for bulk inventory or listing data, including creating feed documents, uploading feed content to presigned URLs, submitting feeds, checking status, retrieving result documents, and cancelling feeds.\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 users and developers use this skill to automate Amazon SP-API Feeds tasks for bulk store data updates, including feed document creation, upload, submission, polling, result retrieval, and cancellation. It is intended for workflows that already have LinkFox authorization and the required Amazon Feeds permissions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles login, API keys, billing flows, feed uploads, and saved response files that may contain seller data or presigned URLs.\n\nMitigation: Use a least-privilege LinkFox key, upload only explicit feed files to fresh Amazon presigned URLs, avoid endpoint override environment variables unless you control them, and clean up saved linkfox response files after use.\n\nRisk: Repeated bad requests, authorization failures, missing resources, or high-frequency polling can trigger Amazon SP-API store-protection cooldown behavior.\n\nMitigation: Stop automatic retries, fix parameters or authorization before retrying, follow retryAfter or blockedUntil when present, and reduce polling or pagination frequency.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-feeds)\n- [API reference](references/api.md)\n- [Onboarding and authentication guidance](references/onboarding.md)\n- [Amazon SP-API createFeedDocument](https://developer-docs.amazon.com/sp-api/reference/createfeeddocument)\n- [Amazon SP-API getFeedDocument](https://developer-docs.amazon.com/sp-api/reference/getfeeddocument)\n- [Amazon SP-API createFeed](https://developer-docs.amazon.com/sp-api/reference/createfeed)\n- [Amazon SP-API getFeed](https://developer-docs.amazon.com/sp-api/reference/getfeed)\n- [Amazon SP-API getFeeds](https://developer-docs.amazon.com/sp-api/reference/getfeeds)\n- [Amazon SP-API cancelFeed](https://developer-docs.amazon.com/sp-api/reference/cancelfeed)\n- [Amazon Feed Type Values](https://developer-docs.amazon.com/sp-api/docs/feed-type-values)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with Python shell commands and JSON response summaries]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Scripts persist full JSON responses under a local linkfox session directory and print full or summarized JSON to stdout.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generate"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"亚马逊店铺 Feed 批量数据提交与处理状态管理。用于创建 Feed 文档、向预签名地址上传 Feed 内容、提交库存或 Listing 等批量文件、查询或列出 Feed、获取结果文档以及取消 Feed。用户提到亚马逊 Feed、批量更新库存或商品、提交 Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、Feed 处理状态、Feed 结果、取消 Feed、Feeds API 时触发。即使未明确说“Feed”，只要希望通过亚马逊 SP-API 批量提交结构化商品或库存数据，也应触发此技能；单个 Listing 的增删改查使用 linkfox-amazon-store-listings。 Skill: 亚马逊-店铺数据上传 Owner: linkfox-ai Summary: 亚马逊店铺 Feed 批量数据提交与处理状态管理。用于创建 Feed 文档、向预签名地址上传 Feed 内容、提交库存或 Listing 等批量文件、查询或列出 Feed、获取结果文档以及取消 Feed。用户提到亚马逊 Feed、批量更新库存或商品、提交 Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、Feed 处理状态、Feed 结果、取消 Feed、Feeds API 时触发。即使未明确说“Feed”，只要希望通过亚马逊 SP-API 批量提交结构化商品或库存数据，也应触发此技能；单个 Listing 的增删改查使用 linkfox-amazon-store-listings。 Tags: latest:1.0.8 Version history: v1.0.8 |","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1254,"uniquenessScore":48,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T09:03:46.175Z","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-10T09:03:46.175Z","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-10T11:51:27.839Z","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"}]}}}