Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add linkfox-ai/linkfox-skills --skill linkfox-amazon-ads-authgit clone --depth 1 https://github.com/linkfox-ai/linkfox-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/linkfox-ai/linkfox-skills/linkfox-amazon-ads-auth)<a href="https://agentmods.dev/skills/linkfox-ai/linkfox-skills/linkfox-amazon-ads-auth"><img src="https://agentmods.dev/badge/skills/linkfox-ai/linkfox-skills/linkfox-amazon-ads-auth/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/linkfox-ai/linkfox-skills/linkfox-amazon-ads-auth"><img src="https://agentmods.dev/badge/skills/linkfox-ai/linkfox-skills/linkfox-amazon-ads-auth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00185 | $0.02159 |
| Opus 5 | $0.00093 | $0.01079 |
| Sonnet 5 | $0.00037 | $0.00432 |
| Haiku 4.5 | $0.00018 | $0.00216 |
Grade A, and why
linkfox-amazon-ads-auth scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Amazon Ads 授权与广告账户管理
Amazon Ads 的授权(LWA OAuth)、profile 发现、访问令牌管理。下游 skill 的前置依赖。
下游:linkfox-amazon-ads-manager(广告管理)、linkfox-amazon-ads-report(报告)。
Core Concepts
- 授权流程:生成 URL → 用户浏览器授权 → 系统存 token + 同步 profile
- 一次授权多 profile:每个 marketplace(US/UK/JP…)一个 profileId;下游调用必须带 profileId
- accountName 必填:调
authorize_url.py前必须问用户要一个非空账号名 - 下游选店:业务 skill 经
developerProxy传profileId(+region),服务端注入 token;勿先storeTokens取 raw token - accessToken 1 小时有效;过期后下游返回 HTTP 401,可用
refresh_token.py续签(刷新后重试 proxy,仍只需profileId)
可用脚本
| 脚本 | 作用 |
|---|---|
authorize_url.py |
为新账号生成授权 URL(accountName 必填) |
authorized_stores.py |
列出已授权的账号 × 站点(按 profileId 聚合) |
profiles.py |
列 profile 列表(refresh=true 穿透上游刷新) |
refresh_token.py |
刷新 accessToken |
store_tokens.py |
查授权/令牌状态(非下游 token 来源) |
入参、响应字段、错误码见 references/api.md。
调用方式
- API 端点:
POST /amazonAds/{authorizeUrl|storeTokens|authorizedStores|refreshToken}(完整参数/响应/错误码见references/api.md) - Python 脚本:
python scripts/<脚本名>.py '<JSON 参数>' [--inline](可用脚本见上文) - 成本约束:本工具会消耗积分;失败/空结果不得自动连续试探;需要继续检索时先向用户说明会产生额外消耗。
输出策略(脚本默认行为):
- 始终将完整响应写入
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<timestamp>.json(<cwd>为脚本执行时的工作目录,在 Claude Code 里即当前项目目录;<session>取自环境变量SESSION_ID,按用户任务自动聚合;禁止写入 /tmp,当前目录不可写则报错) - 响应体 ≤ 8 KB:落盘后把完整 JSON 打印到 stdout
- 响应体 > 8 KB:落盘后 stdout 只输出摘要(顶层字段、常见计数、最大列表字段的长度 + 前 3 条样本)
- 加
--inline强制全量打印到 stdout(同样落盘)
读数据建议:先看摘要判断是否足够;需要具体字段时优先用 jq或ConvertFrom-Json 从保存的 json 文件按需抽取,避免整份 JSON 进入上下文。
解决认证和积分问题
发生以下异常情况时,采用 references/onboarding.md 引导解决问题:
异常情况
- 未配置API Key:环境变量未配置
LINKFOX_AGENT_API_KEY,也未配置LINKFOXAGENT_API_KEY。 - 响应401或402状态码
- 响应提示积分或余额不足:消息含"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值",或类似含义的内容。
支持区域
NA(美加墨巴) / EU(英德法意西荷印度中东等) / FE(日澳新)。默认 NA。
Usage Scenarios
1. 新授权账号
- 问用户要
accountName(非空字符串,用于识别) - 调
authorize_url.py拿 URL → 给用户在浏览器打开(安全警告:为保障店铺安全,请务必在日常运营该店铺的安全网络环境中打开此链接。强烈建议使用紫鸟浏览器等专业的防关联浏览器进行授权,切勿在陌生或公共网络下操作。) - 授权完成后系统自动存 token + 同步 profile
- 可选:调
authorized_stores.py确认
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/api.md 5.7 KB
- references/onboarding.md 2.0 KB
- scripts/_lf_output.py 6.3 KB runs code
- scripts/_token_status_output.py 1.0 KB runs code
- scripts/authorize_url.py 6.7 KB runs code
- scripts/authorized_stores.py 2.3 KB runs code
- scripts/onboarding.py 24 KB runs code
- scripts/profiles.py 2.8 KB runs code
- scripts/refresh_token.py 2.6 KB runs code
- scripts/store_tokens.py 2.6 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 135 lines · 185 tokens per session scan A 911fcd4ba7ec
linkfox-amazon-ads-auth is a skill published in the GitHub repository linkfox-ai/linkfox-skills (101 stars, last pushed 21d ago), licensed MIT. It adds 185 tokens to every session and 2,159 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…