breadcrumb-generator by kostja94/marketing-skills
npx skills add https://github.com/kostja94/marketing-skills --skill breadcrumb-generator指导面包屑导航的实现,以优化 SEO、用户体验和地理定位。面包屑向用户展示其在网站层级结构中的位置,并帮助搜索引擎理解内容分类。良好实现的面包屑导航可将点击率提高 20–30%,将跳出率降低多达 30%,并增强内部链接。
调用时机:在首次使用时,如果适用,用 1–2 句话说明此技能涵盖的内容及其重要性,然后提供主要输出。在后续使用或用要求跳过时,直接提供主要输出。
| 类型 | 使用场景 | 建议 |
|---|---|---|
| 基于位置 | 反映网站层级结构(首页 > 博客 > SEO > 页面) | 推荐 — 最利于 SEO;结构清晰 |
| 基于属性 | 显示产品属性(首页 > 电子产品 > 手机 > iPhone 15) | 电子商务;产品分类 |
| 基于路径 | 显示用户的浏览路径 | 避免 — 不同用户路径不同;可能导致混淆 |
:大多数网站使用基于位置的面包屑。电子商务产品页面使用基于属性的面包屑。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
首先检查项目上下文: 如果存在 .claude/project-context.md 或 .cursor/project-context.md,请阅读以了解网站结构和关键页面。
识别:
| 实践 | 指导原则 |
|---|---|
| 深度 | 3–5 层为佳;避免过长的路径 |
| 锚文本 | 富含关键词、易于阅读;描述性强 |
| 一致性 | 所有页面(博客、分类、产品)使用相同模式 |
| 规范路径 | 对于属于多个分类的项目,定义一个规范面包屑路径,以避免链接权重稀释 |
参见 schema-markup 了解 BreadcrumbList 的要求、JSON-LD 示例和多路径处理。结构化数据必须与可见的面包屑完全匹配。
| 实践 | 指导原则 |
|---|---|
| 位置 | 导航栏下方或页面标题上方;内容区域顶部 |
| 视觉 | 较小字体,较浅颜色;避免与主要内容竞争 |
| 分隔符 | 清晰的分隔符(>、/、›);全站保持一致 |
| 命名 | 与页面标题或导航菜单匹配;简洁、描述性强 |
| 实践 | 指导原则 |
|---|---|
| 移动端 | 可点击;简短、易读的文本;高对比度 |
| 长路径 | 使用水平滚动容器,而非截断 |
| 当前页面 | 最后一项不链接;使用 aria-current="page" |
| 屏幕阅读器 | 使用 nav 并设置 aria-label="Breadcrumb";正确的地标 |
<nav aria-label="Breadcrumb">
<ol itemscope itemtype="https://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="https://example.com/"><span itemprop="name">Home</span></a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="https://example.com/category/"><span itemprop="name">Category</span></a>
<meta itemprop="position" content="2" />
</li>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem" aria-current="page">
<span itemprop="name">Current Page</span>
<meta itemprop="position" content="3" />
</li>
</ol>
</nav>
实现:根据路由片段或页面元数据生成 BreadcrumbList。确保 item 的 URL 是绝对地址。使用 next-seo 的 BreadcrumbJsonLd 或自定义组件。参见 schema-markup 了解 JSON-LD 结构。
| 网站类型 | 使用场景 |
|---|---|
| 电子商务 | 分类 > 子分类 > 产品 |
| 博客 | 首页 > 博客 > 分类 > 文章(参见 article-page-generator 了解文章页面结构) |
| 文档 | 首页 > 文档 > 章节 > 页面 |
| 大型网站 | 任何具有 3 层以上层级结构的网站 |
跳过:对于扁平化网站(例如,单页网站、1–2 层深度)。
深层页面:对于 6 层以上的页面,考虑省略中间层级;仅显示最重要的分类以避免杂乱。
| 平台 | 选项 |
|---|---|
| WordPress | Yoast SEO, Rank Math, Breadcrumb NavXT |
| Next.js | next-seo BreadcrumbJsonLd,根据路由片段自定义 |
| Shopify, Drupal, Joomla | 内置或插件支持 |
| 错误 | 修复方法 |
|---|---|
| 结构化数据中使用相对 URL | 使用绝对 URL(https://) |
| 结构化数据与可见路径不匹配 | 保持结构化数据和用户界面同步 |
| 缺少位置信息 | 包含顺序位置(1, 2, 3…) |
| 最后一项被链接 | 当前页面通常不应是链接 |
| 层级过多 | 限制在 5–7 层;对于深层路径,省略中间层级 |
| 路径不准确 | 面包屑必须反映实际的网站结构 |
| 缺少结构化数据 | 根据 schema-markup 添加 BreadcrumbList;否则搜索结果中不会显示面包屑;参见 serp-features |
每周安装量
188
代码仓库
GitHub 星标数
237
首次出现
2026 年 3 月 1 日
安全审计
安装于
kimi-cli173
cursor173
gemini-cli172
amp172
cline172
github-copilot172
Guides breadcrumb implementation for SEO, UX, and GEO. Breadcrumbs show users their location in the site hierarchy and help search engines understand content taxonomy. Well-implemented breadcrumbs can increase CTR by 20–30%, reduce bounce rates by up to 30%, and strengthen internal linking.
When invoking : On first use , if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On subsequent use or when the user asks to skip, go directly to the main output.
| Type | Use case | Recommendation |
|---|---|---|
| Location-based | Reflects site hierarchy (Home > Blog > SEO > Page) | Recommended — most SEO-friendly; clear structure |
| Attribute-based | Shows product attributes (Home > Electronics > Phone > iPhone 15) | E-commerce; product classification |
| Path-based | Shows user's browsing path | Avoid — different users, different paths; can cause confusion |
Default : Use location-based for most sites. Use attribute-based for e-commerce product pages.
Check for project context first: If .claude/project-context.md or .cursor/project-context.md exists, read it for site structure and key pages.
Identify:
| Practice | Guideline |
|---|---|
| Depth | 3–5 levels optimal; avoid very long trails |
| Anchor text | Keyword-rich, human-readable; descriptive |
| Consistency | Same pattern across all pages (blog, category, product) |
| Canonical path | For items in multiple categories, define one canonical breadcrumb to avoid diluted link equity |
See schema-markup for BreadcrumbList requirements, JSON-LD example, and multiple paths. Schema must match visible breadcrumbs exactly.
| Practice | Guideline |
|---|---|
| Position | Below nav bar or above page title; top of content area |
| Visual | Smaller font, lighter color; avoid competing with main content |
| Separator | Clear separator (>, /, ›); consistent across site |
| Naming | Match page title or nav menu; concise, descriptive |
| Practice | Guideline |
|---|---|
| Mobile | Tappable; short, readable text; high contrast |
| Long trails | Horizontal scroll container rather than truncating |
| Current page | Last item non-linked; use aria-current="page" |
| Screen readers | nav with aria-label="Breadcrumb"; proper landmark |
<nav aria-label="Breadcrumb">
<ol itemscope itemtype="https://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="https://example.com/"><span itemprop="name">Home</span></a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="https://example.com/category/"><span itemprop="name">Category</span></a>
<meta itemprop="position" content="2" />
</li>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem" aria-current="page">
<span itemprop="name">Current Page</span>
<meta itemprop="position" content="3" />
</li>
</ol>
</nav>
Implementation : Generate BreadcrumbList from route segments or page metadata. Ensure item URLs are absolute. Use next-seo BreadcrumbJsonLd or custom component. See schema-markup for JSON-LD structure.
| Site type | Use case |
|---|---|
| E-commerce | Category > Subcategory > Product |
| Blog | Home > Blog > Category > Post (see article-page-generator for article page structure) |
| Docs | Home > Docs > Section > Page |
| Large sites | Any site with 3+ level hierarchy |
Skip on flat sites (e.g., single-page, 1–2 level depth).
Deep pages : For 6+ levels, consider omitting middle levels; show only the most important categories to avoid clutter.
| Platform | Options |
|---|---|
| WordPress | Yoast SEO, Rank Math, Breadcrumb NavXT |
| Next.js | next-seo BreadcrumbJsonLd, custom from route segments |
| Shopify, Drupal, Joomla | Built-in or plugin support |
| Error | Fix |
|---|---|
| Relative URLs in schema | Use absolute URLs (https://) |
| Schema doesn't match visible trail | Keep schema and UI in sync |
| Missing position | Include sequential position (1, 2, 3…) |
| Last item linked | Current page typically not a link |
| Too many levels | Limit to 5–7; omit middle levels for deep paths |
| Inaccurate path | Breadcrumb must reflect actual site structure |
| No schema | Add BreadcrumbList per schema-markup ; otherwise no SERP breadcrumbs; see serp-features |
Weekly Installs
188
Repository
GitHub Stars
237
First Seen
Mar 1, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
kimi-cli173
cursor173
gemini-cli172
amp172
cline172
github-copilot172
程序化SEO实战指南:大规模创建优质页面,避免内容单薄惩罚
39,700 周安装