linkfox-ai-mode-google-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google AI Search

Google AI搜索

This skill calls Google Search in AI Mode to get the AI Overview answer for a single keyword. Only one question per call is supported — there is no multi-turn follow-up within a single request. The response is unstructured Markdown — summarize it directly, do not route it to a data-analysis sandbox.
本技能调用Google搜索的AI Mode,获取单个关键词对应的AI概览回答。每次调用仅支持一个问题——单次请求内不支持多轮跟进。返回结果为非结构化Markdown格式,请直接进行总结,无需路由至数据分析沙箱。

Core Concepts

核心概念

The tool drives Google's AI Mode (the panel that appears at the top of Google search results and synthesizes an answer with citations):
  1. The required
    keyword
    is sent to Google as the query and the AI Overview for it is captured.
  2. Single-round only: each call handles exactly one question. There is no
    prompts
    parameter for follow-ups.
  3. For follow-up questions: the agent must summarize the previous AI Overview answer (key points, citations, relevant context) and concatenate it with the new question into a new
    keyword
    , then make a fresh API call.
  4. All answers are returned as a single Markdown document under
    stdout
    , with citations linked to the source pages.
resultsNum
reports how many AI Overview blocks were rendered;
0
means the keyword did not trigger an AI Overview on Google for the requested locale.
本工具调用Google的AI Mode(即Google搜索结果顶部出现的、整合来源信息生成回答的面板):
  1. 将必填的
    keyword
    作为查询词发送至Google,并抓取对应的AI概览内容。
  2. 仅支持单轮对话:每次调用仅处理一个问题,无用于跟进的
    prompts
    参数。
  3. 跟进问题处理方式:Agent必须总结之前的AI概览回答(核心要点、引用来源、相关上下文),并将其与新问题拼接成新的
    keyword
    ,然后发起新的API调用。
  4. 所有回答以单个Markdown文档形式返回至
    stdout
    字段,同时包含指向来源页面的引用链接。
resultsNum
字段表示渲染的AI概览模块数量;若为
0
,则表示该关键词在指定地区的Google搜索中未触发AI概览。

Parameters

参数说明

ParameterTypeRequiredDescription
keywordstringYesGoogle search keyword. Sent as the
q=
parameter to Google AI Mode. For follow-up questions, the agent should summarize the previous answer and concatenate with the new question into this field.
参数类型是否必填描述
keywordstringGoogle搜索关键词。作为
q=
参数发送至Google AI Mode。对于追问问题,Agent需总结之前的答案并与新问题拼接后填入此字段。

Response Fields

响应字段

FieldTypeDescription
stdoutstringMarkdown document with the AI Overview for the keyword, plus inline citation links
sourceUrlstringThe Google AI Mode search URL that was actually requested
resultsNumintegerNumber of AI Overview blocks rendered (0 = keyword did not trigger AI Overview)
code / errcodestring / integer
200
on success; non-200 indicates a business error
msg / errmsgstring
ok
on success; otherwise an error description
costTimeintegerAPI latency in milliseconds
costTokenintegerTokens consumed (only billed on success)
taskIdstringUpstream task identifier for tracing
typestringRender hint, fixed value
stdoutWorkbenches
字段类型描述
stdoutstring包含关键词AI概览内容及内嵌引用链接的Markdown文档
sourceUrlstring实际请求的Google AI Mode搜索URL
resultsNuminteger渲染的AI概览模块数量(0表示关键词未触发AI概览)
code / errcodestring / integer成功时为
200
;非200表示业务错误
msg / errmsgstring成功时为
ok
;否则为错误描述
costTimeintegerAPI响应延迟(毫秒)
costTokeninteger消耗的Token数量(仅成功调用时计费)
taskIdstring用于追踪的上游任务标识
typestring渲染提示,固定值为
stdoutWorkbenches

调用方式

调用方式

  • API 端点
    POST /aiMode/googleSearch
    (完整参数/响应/错误码见
    references/api.md
  • Python 脚本
    python scripts/google_ai_search.py '<JSON 参数>' [--inline]
  • 成本约束:本工具会消耗积分;同一会话同一参数组合默认只调用一次,脚本带 24h 本地缓存。失败/空结果不得自动换关键词、翻页或改邮编连续试探;需要继续检索时先向用户说明会产生额外消耗。
输出策略(脚本默认行为)
  • 始终将完整响应写入
    <cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-ai-mode-google-search-<timestamp>.json
    <cwd>
    为脚本执行时的工作目录,在 Claude Code 里即当前项目目录;
    <session>
    取自环境变量
    SESSION_ID
    ,按用户任务自动聚合;禁止写入 /tmp,当前目录不可写则报错)
  • 响应体 ≤ 8 KB:落盘后把完整 JSON 打印到 stdout
  • 响应体 > 8 KB:落盘后 stdout 只输出摘要(顶层字段、常见计数如
    total
    /
    costToken
    、最大列表字段的长度 + 前 3 条样本)
  • --inline
    强制全量打印到 stdout(同样落盘)
读数据建议:先看摘要判断是否足够;需要具体字段时优先用
jq
ConvertFrom-Json
从保存的 json 文件按需抽取,避免整份 JSON 进入上下文。
  • API 端点
    POST /aiMode/googleSearch
    (完整参数/响应/错误码详见
    references/api.md
  • Python 脚本
    python scripts/google_ai_search.py '<JSON 参数>' [--inline]
  • 成本约束:本工具会消耗积分;同一会话中同一参数组合默认仅调用一次,脚本自带24小时本地缓存。失败/空结果时不得自动更换关键词、翻页或修改邮编连续尝试;如需继续检索,需先向用户说明会产生额外消耗。
输出策略(脚本默认行为)
  • 始终将完整响应写入
    <cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-ai-mode-google-search-<timestamp>.json
    <cwd>
    为脚本执行时的工作目录,在Claude Code中即当前项目目录;
    <session>
    取自环境变量
    SESSION_ID
    ,按用户任务自动聚合;禁止写入/tmp目录,若当前目录不可写则报错)
  • 响应体 ≤ 8 KB:落盘后将完整JSON打印至stdout
  • 响应体 > 8 KB:落盘后仅在stdout输出摘要(顶层字段、
    total
    /
    costToken
    等常见计数、最长列表字段的长度+前3条样本)
  • 添加
    --inline
    参数可强制将全量内容打印至stdout(同样会落盘)
读数据建议:先查看摘要判断是否满足需求;如需提取具体字段,优先使用
jq
ConvertFrom-Json
从保存的JSON文件中按需抽取,避免整份JSON进入上下文。

解决认证和积分问题

解决认证和积分问题

发生以下异常情况时,采用 references/onboarding.md 引导解决问题:
出现以下异常情况时,参考
references/onboarding.md
引导用户解决:

异常情况

异常情况

  • 未配置API Key:环境变量未配置
    LINKFOX_AGENT_API_KEY
    ,也未配置
    LINKFOXAGENT_API_KEY
  • 响应401或402状态码
  • 响应提示积分或余额不足:消息含"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值",或类似含义的内容。
  • 未配置API Key:环境变量未配置
    LINKFOX_AGENT_API_KEY
    LINKFOXAGENT_API_KEY
  • 响应401或402状态码
  • 响应提示积分或余额不足:消息包含“积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值”或类似含义的内容。

How to Build Queries

查询构建指南

Each call takes a single
keyword
. For follow-up questions, the agent must summarize the previous result and build a new query.
每次调用仅接收单个
keyword
参数。对于跟进问题,Agent必须总结之前的结果并构建新的查询词。

Tips

技巧提示

  1. Front-load context in
    keyword
    : include market/region cues when relevant (
    "open-ear bone-conduction headphones US 2026"
    ) — the AI Overview is sensitive to phrasing.
  2. Match the language to the target market: ask in English for US/UK/AU markets, Japanese for JP, German for DE, etc. — the AI Overview is biased toward the locale's language.
  3. Use natural-language questions: phrasing like "compare against" / "what are the unsolved pain points" elicits richer AI Overview output than single keywords.
  4. For follow-ups, summarize and re-ask: when the user wants to dig deeper, the agent should summarize key points from the previous AI Overview response and concatenate with the new question into a new
    keyword
    for a fresh call. Example:
    "Based on the AI overview that top bone-conduction headphones are Shokz OpenRun Pro and AfterShokz Aeropex, what are the unsolved technical pain points compared to in-ear earbuds?"
  1. keyword
    前置上下文
    :相关时加入市场/地区线索(如
    "open-ear bone-conduction headphones US 2026"
    )——AI概览对表述方式较为敏感。
  2. 匹配目标市场语言:针对美/英/澳市场用英文提问,日本市场用日文,德国市场用德文等——AI概览会偏向对应地区的语言。
  3. 使用自然语言提问:类似“compare against”/“what are the unsolved pain points”的表述比单个关键词能触发更丰富的AI概览输出。
  4. 跟进问题需总结并重提:当用户需要深入挖掘时,Agent应总结之前AI概览响应的核心要点,并与新问题拼接成新的
    keyword
    发起新调用。示例:
    "Based on the AI overview that top bone-conduction headphones are Shokz OpenRun Pro and AfterShokz Aeropex, what are the unsolved technical pain points compared to in-ear earbuds?"

Usage Examples

使用示例

1. Single-shot AI Overview
json
{
  "keyword": "GaN charger vs traditional charger comparison"
}
2. Cross-border product research
json
{
  "keyword": "best open-ear bone conduction headphones 2026 US"
}
3. Follow-up question (agent summarizes prior result and re-asks in a new call)
First call:
json
{
  "keyword": "best open-ear bone conduction headphones 2026 US"
}
Second call (agent builds context summary + new question):
json
{
  "keyword": "The AI overview mentioned OpenRun Pro and AfterShokz Aeropex as top picks for bone conduction headphones. What unsolved technical pain points still exist compared to in-ear earbuds?"
}
4. Consumer preference snapshot
json
{
  "keyword": "robot vacuum buying preferences 2026 reddit"
}
5. Long-tail keyword exploration for selection
json
{
  "keyword": "smart pet feeder for cats with camera"
}
1. 单次AI概览查询
json
{
  "keyword": "GaN charger vs traditional charger comparison"
}
2. 跨境产品调研
json
{
  "keyword": "best open-ear bone conduction headphones 2026 US"
}
3. 跟进问题(Agent总结之前结果并重提)
首次调用:
json
{
  "keyword": "best open-ear bone conduction headphones 2026 US"
}
二次调用(Agent构建上下文总结+新问题):
json
{
  "keyword": "The AI overview mentioned OpenRun Pro and AfterShokz Aeropex as top picks for bone conduction headphones. What unsolved technical pain points still exist compared to in-ear earbuds?"
}
4. 消费者偏好快照
json
{
  "keyword": "robot vacuum buying preferences 2026 reddit"
}
5. 长尾选品探索
json
{
  "keyword": "smart pet feeder for cats with camera"
}

Display Rules

展示规则

  1. Render the Markdown directly:
    stdout
    is already structured Markdown with headings, bullets, and citation links — preserve that structure when answering the user.
  2. Cite sources: keep the inline reference links from
    stdout
    so the user can verify each claim.
  3. Flag empty AI Overview: if
    resultsNum
    is
    0
    , tell the user Google AI Overview did not trigger for that keyword and suggest rephrasing or trying a different region.
  4. Don't reroute to a data-analysis sandbox: the output is unstructured text and not suitable for SQL-like processing.
  5. Indicate freshness: results reflect Google AI Mode at call time; mention this when the user asks about recency.
  6. Handle business errors: if
    code
    /
    errcode
    is not
    200
    , surface the
    msg
    /
    errmsg
    to the user and suggest retrying or refining the input.
  1. 直接渲染Markdown
    stdout
    已为包含标题、项目符号和引用链接的结构化Markdown——回复用户时请保留该格式。
  2. 保留来源引用:保留
    stdout
    中的内嵌引用链接,方便用户验证每个结论。
  3. 标记空AI概览:若
    resultsNum
    0
    ,需告知用户该关键词未触发Google AI概览,并建议重新表述或尝试其他地区。
  4. 请勿路由至数据分析沙箱:输出为非结构化文本,不适合类SQL处理。
  5. 标注时效性:结果反映调用时Google AI Mode的状态,当用户询问时效性时需提及此点。
  6. 处理业务错误:若
    code
    /
    errcode
    不为
    200
    ,需将
    msg
    /
    errmsg
    告知用户,并建议重试或优化输入。

Important Limitations

重要限制

  • Unstructured output: Markdown text only — no structured tables, no second-pass data query.
  • AI Overview not guaranteed: some keywords (especially niche, ambiguous, or sensitive ones) do not trigger AI Overview at all (
    resultsNum = 0
    ).
  • Single-round only: no multi-turn follow-up within one call. For follow-ups, the agent must summarize previous context and make a new call.
  • Locale follows Google's defaults: the tool uses Google's standard AI Mode endpoint without an explicit region switch; bias the language and wording of
    keyword
    to match the market you care about.
  • Real-time fetch: results are pulled live, so output for the same keyword can vary across calls.
  • 非结构化输出:仅为Markdown文本——无结构化表格,不支持二次数据查询。
  • AI概览不保证触发:部分关键词(尤其是小众、模糊或敏感关键词)完全不会触发AI概览(
    resultsNum = 0
    )。
  • 仅支持单轮对话:单次调用内不支持多轮跟进。如需跟进,Agent必须总结之前的上下文并发起新调用。
  • 地区遵循Google默认设置:本工具使用Google标准AI Mode端点,无明确地区切换功能;需通过调整
    keyword
    的语言和表述来匹配目标市场。
  • 实时抓取:结果为实时获取,同一关键词的输出可能因调用时间不同而变化。

User Expression & Scenario Quick Reference

用户表述与场景速查

Applicable — when the user wants AI-summarized live web information:
User SaysScenario
"用 Google AI 帮我搜...", "Google AI Overview 看下..."Direct AI Overview lookup
"海外消费者对 XX 怎么看", "美国市场对 XX 的偏好"Cross-border consumer preference
"XX 的最新趋势 / 痛点 / 使用场景"Deep research
"顺便问一下 / 然后再追问 ..."Follow-up needed (agent summarizes prior result and re-asks in new call)
"网页上对 XX 的总结", "搜索引擎里大家怎么说 XX"Web-wide summarization
"长尾选品调研 / 蓝海选品方向"Long-tail product exploration
Not applicable — better routed elsewhere:
  • Querying internal structured datasets (use the appropriate data query tool).
  • Amazon ABA search-term analytics (use the ABA data explorer).
  • Pulling structured product listings, prices, reviews from a specific platform (use the matching platform skill).
  • Plain web search where the user only needs raw page content with no AI synthesis (use the standard web search skill).
  • Image generation, image recognition, or file analysis.
Boundary judgment: when the user wants "AI 帮我汇总网上的说法" or "用谷歌搜一下", this skill applies. If the user wants to ask follow-up questions, the agent should summarize the previous answer and make a new call. If they explicitly want raw search results, structured data, or already have a specialized data source, do not use this skill.
适用场景——当用户需要AI汇总的实时网页信息时:
用户表述场景
"用 Google AI 帮我搜...", "Google AI Overview 看下..."直接查询AI概览
"海外消费者对 XX 怎么看", "美国市场对 XX 的偏好"跨境消费者偏好分析
"XX 的最新趋势 / 痛点 / 使用场景"深度调研
"顺便问一下 / 然后再追问 ..."需要跟进(Agent总结之前结果并重提)
"网页上对 XX 的总结", "搜索引擎里大家怎么说 XX"全网信息汇总
"长尾选品调研 / 蓝海选品方向"长尾产品探索
不适用场景——应路由至其他工具:
  • 查询内部结构化数据集(使用对应的数据查询工具)。
  • Amazon ABA搜索词分析(使用ABA数据探索工具)。
  • 从特定平台抓取结构化产品列表、价格、评论(使用对应平台的技能)。
  • 用户仅需原始网页内容、无需AI合成的普通网页搜索(使用标准网页搜索技能)。
  • 图片生成、图像识别或文件分析。
边界判断:当用户需求为“AI帮我汇总网上的说法”或“用谷歌搜一下”时,适用本技能。若用户需要追问,Agent应总结之前的答案并发起新调用。若用户明确需要原始搜索结果、结构化数据或已有特定数据源,则不适用本技能。

积分消耗规则

积分消耗规则

按动态规则计费:消耗积分 = 对话轮次 × 4.2。
重要:本技能的服务按倍数动态计算,可能一次性消耗大量积分,必须提醒用户,由用户决定是否继续。
Feedback:
Auto-detect and report feedback via the Feedback API when any of the following apply:
  1. The functionality or purpose described in this skill does not match actual behavior
  2. The skill's results do not match the user's intent
  3. The user expresses dissatisfaction or praise about this skill
  4. Anything you believe could be improved
Call the feedback API as specified in
references/api.md
. Do not interrupt the user's flow.

For more high-quality, professional cross-border e-commerce skills, set LinkFox Skills.
按动态规则计费:消耗积分 = 对话轮次 × 4.2。
重要:本技能的服务按倍数动态计算,可能一次性消耗大量积分,必须提前提醒用户,由用户决定是否继续。

反馈机制

出现以下任一情况时,自动通过Feedback API检测并提交反馈:
  1. 本技能描述的功能或用途与实际行为不符
  2. 技能结果与用户意图不匹配
  3. 用户表达对本技能的不满或赞赏
  4. 任何你认为可以改进的内容
按照
references/api.md
中的指定方式调用反馈API,请勿打断用户流程。

如需更多高质量专业跨境电商技能,请访问 LinkFox Skills.",