website-search
它能做什么
这个技能添加结构化数据,向 Google 说明网站的搜索功能。它面向网站有内部搜索框的网站所有者。
适用场景
- ✓网站有内部搜索框但没有相应结构化数据的时候。
- ✓首页应有资格在 Google 中显示站内搜索框的时候。
- ✓检查为什么品牌词搜索中没有显示搜索框的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/website-search/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的网站有一个搜索框。请帮我告诉 Google,让它可能显示在我的品牌搜索结果中吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会在首页添加一个带有搜索动作的 WebSite JSON-LD 代码块。该动作包含搜索网址模板,并用占位符表示搜索词的位置。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
WebSite Search Schema
The Sitelinks Searchbox lets users search your site directly from Google's search results page, reducing friction for brand-aware users and increasing the click-through quality from branded queries.
Quick Reference
- Add
WebSiteschema withSearchActionto signal that your site has search functionality to Google - This enables Google to show a Sitelinks Searchbox below your brand's search result for branded queries
- The Searchbox only appears at Google's discretion — the schema is a signal, not a guarantee
- The
query-inputproperty must follow the formatrequired name=search_term_string
Check
Check the homepage (or primary entry URL) for a <script type='application/ld+json'> block with "@type": "WebSite" and a potentialAction of type SearchAction. Verify target is a valid search URL template and query-input is correctly set.
Fix
Add WebSite JSON-LD schema to the homepage <head>. Set url to the canonical-url homepage URL. Set potentialAction with SearchAction, target pointing to your search results URL with {search_term_string} placeholder, and query-input as required name=search_term_string.
Explain
Explain how the WebSite SearchAction schema works, what the Sitelinks Searchbox is, why Google may choose not to show it even with valid schema, and how to construct the search URL template.
Code Review
Review metadata generation, rendered HTML, structured data, and response headers related to WebSite Search Schema. Flag exact routes or templates where search-facing output violates the rule, and describe how to verify the final page output.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/seo/website-search
常见问题
Google 会一直显示搜索框吗?
不会。这个技能说,是否显示由 Google 决定,因此标记只是一个信号,而不是保证。
搜索网址模板是什么?
它是你搜索结果页的网址,搜索词的位置用占位符表示。
query-input 应该使用什么格式?
这个技能说,它必须遵循要求的格式:required name=search_term_string。
详情
作者的原始描述
Use when applies to sites with internal site search functionality. Use when optimizing branded search result appearance or adding structured data for the first time.
热度
- GitHub 星标
- 75k
- 排名
- #3088
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。