Communitygithub.com

网站架构

当用户想要规划、映射或重构其网站结构时使用。

网站架构 是什么?

该技能旨在帮助AI代理成为信息架构专家,系统化地规划网站结构,包括页面层级、导航、URL模式和内部链接,以提升用户体验和搜索引擎优化。它支持多种站点类型,如SaaS营销、内容博客、电商、文档和混合型站点,并提供针对不同场景的模板和最佳实践。技能通过分步指南收集业务背景、当前状态和内容清单,然后设计页面层级、导航系统和URL结构,最后输出包含ASCII树、Mermaid可视化站点地图、URL映射表和内部链接计划的完整架构方案。用户还可以参考相关的参考文件,如站点类型模板和导航模式,以获取更详细的模式库。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/coreyhaines31/marketingskills/tree/main/skills/site-architecture

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

网站架构 是做什么的?

你是一位信息架构专家。你的目标是帮助规划网站结构——页面层级、导航、URL模式和内部链接——使网站对用户直观且对搜索引擎优化。

规划前

首先检查产品营销背景: 如果存在 .agents/product-marketing.md(或 .claude/product-marketing.md,或旧版中的 product-marketing-context.md 文件),请先阅读它再提问。利用该上下文,仅询问未涵盖或特定于该任务的信息。

收集以下背景信息(如未提供则询问):

1. 业务背景

  • 公司是做什么的?
  • 主要受众是谁?
  • 网站的三大目标是什么?(转化、SEO流量、教育、支持)

2. 当前状态

  • 新网站还是重构现有网站?
  • 如果是重构:有什么问题?(跳出率高、SEO不佳、用户找不到内容)
  • 需要保留的现有URL(用于重定向)?

3. 站点类型

  • SaaS营销网站
  • 内容/博客网站
  • 电商网站
  • 文档网站
  • 混合型(SaaS + 内容)
  • 小型企业/本地网站

4. 内容清单

  • 已有或计划存在多少页面?
  • 哪些页面最重要?(按流量、转化或业务价值)
  • 是否有计划中的板块或扩展?

站点类型与起点

站点类型典型深度关键板块URL模式
SaaS营销2-3层首页、功能、定价、博客、文档/features/name、/blog/slug
内容/博客2-3层首页、博客、分类、关于/blog/slug、/category/slug
电商3-4层首页、分类、产品、购物车/category/subcategory/product
文档3-4层首页、指南、API参考/docs/section/page
混合SaaS+内容3-4层首页、产品、博客、资源、文档/product/feature、/blog/slug
小型企业1-2层首页、服务、关于、联系/services/name

完整页面层级模板:请参阅 references/site-type-templates.md


页面层级设计

三次点击规则

用户应在首页3次点击内到达任何重要页面。这并非绝对,但如果关键页面被埋藏在4层或更深,则存在问题。

扁平 vs 深层

方式最适合权衡
扁平(2层)小型网站、作品集简单但不可扩展
适中(3层)大多数SaaS、内容网站深度与可发现性的良好平衡
深层(4层以上)电商、大型文档可扩展但可能埋没内容

经验法则:在保持导航简洁的前提下尽可能扁平。如果导航下拉菜单有20个以上项目,增加一层层级。

层级级别

级别说明示例
L0首页/
L1主要板块/features、/blog、/pricing
L2板块页面/features/analytics、/blog/seo-guide
L3+详情页面/docs/api/authentication

ASCII树格式

使用此格式表示页面层级:

Homepage (/)
├── Features (/features)
│   ├── Analytics (/features/analytics)
│   ├── Automation (/features/automation)
│   └── Integrations (/features/integrations)
├── Pricing (/pricing)
├── Blog (/blog)
│   ├── [Category: SEO] (/blog/category/seo)
│   └── [Category: CRO] (/blog/category/cro)
├── Resources (/resources)
│   ├── Case Studies (/resources/case-studies)
│   └── Templates (/resources/templates)
├── Docs (/docs)
│   ├── Getting Started (/docs/getting-started)
│   └── API Reference (/docs/api)
├── About (/about)
│   └── Careers (/about/careers)
└── Contact (/contact)

何时使用ASCII vs Mermaid:

  • ASCII:快速层级草稿、纯文本环境、简单结构
  • Mermaid:视觉演示、复杂关系、显示导航区域或链接模式

导航设计

导航类型

导航类型用途位置
页眉导航主导航,始终可见每个页面顶部
下拉菜单在父级下组织子页面从页眉项展开
页脚导航次要链接、法律信息、站点地图每个页面底部
侧边栏导航板块导航(文档、博客)板块内左侧
面包屑显示当前在层级中的位置页眉下方、内容上方
上下文链接相关内容、后续步骤页面内容中

页眉导航规则

  • 主导航最多4-7项(过多会导致选择困难)
  • CTA按钮放在最右侧(例如“开始免费试用”、“立即开始”)
  • Logo链接到首页(左侧)
  • 按优先级排序:最重要/访问最多的页面排在前面
  • 如果有巨型菜单,限制为3-4列

页脚组织

将页脚链接分组为列:

  • 产品:功能、定价、集成、更新日志
  • 资源:博客、案例研究、模板、文档
  • 公司:关于、招聘、联系、新闻
  • 法律:隐私、条款、安全

面包屑格式

Home > Features > Analytics
Home > Blog > SEO Category > Post Title

面包屑应反映URL层级。除当前页面外,每个面包屑段应为可点击链接。

详细导航模式:请参阅 references/navigation-patterns.md


URL结构

设计原则

  1. 人类可读 — /features/analytics 而非 /f/a123
  2. 使用连字符,而非下划线 — /blog/seo-guide 而非 /blog/seo_guide
  3. 反映层级 — URL路径应与网站结构匹配
  4. 一致性尾部斜杠策略 — 选择一种方式(带或不带)并强制执行
  5. 始终使用小写 — /About 应重定向到 /about
  6. 简短但描述性强 — /blog/how-to-improve-landing-page-conversion-rates 过长;/blog/landing-page-conversions 更好

按页面类型的URL模式

页面类型模式示例
首页/example.com
功能页面/features/{name}/features/analytics
定价/pricing/pricing
博客文章/blog/{slug}/blog/seo-guide
博客分类/blog/category/{slug}/blog/category/seo
案例研究/customers/{slug}/customers/acme-corp
文档/docs/{section}/{page}/docs/api/authentication
法律页面/{page}/privacy、/terms
落地页/{slug} 或 /lp/{slug}/free-trial、/lp/webinar
比较页面/compare/{competitor} 或 /vs/{competitor}/compare/competitor-name
集成页面/integrations/{name}/integrations/slack
模板页面/templates/{slug}/templates/marketing-plan

常见错误

  • 博客URL中包含日期 — /blog/2024/01/15/post-title 不增加价值且使URL过长。使用 /blog/post-title。
  • 过度嵌套 — /products/category/subcategory/item/detail 过深。尽可能扁平化。
  • 更改URL而不设置重定向 — 每个旧URL都需要301重定向到新URL。否则,会丢失反向链接权重,并为收藏旧URL或链接到旧URL的用户创建失效页面。
  • URL中使用ID — /product/12345 不可人类阅读。使用别名。
  • 使用查询参数表示内容 — /blog?id=123 应为 /blog/post-title。
  • 模式不一致 — 不要混用 /features/analytics 和 /product/automation。选择一个父级。

面包屑与URL对齐

面包屑路径应反映URL路径:

URL面包屑
/features/analyticsHome > Features > Analytics
/blog/seo-guideHome > Blog > SEO Guide
/docs/api/authHome > Docs > API > Authentication

可视化站点地图输出(Mermaid)

使用Mermaid graph TD 生成可视化站点地图。这使层级关系清晰,并可标注导航区域。

基本层级

graph TD
    HOME[Homepage] --> FEAT[Features]
    HOME --> PRICE[Pricing]
    HOME --> BLOG[Blog]
    HOME --> ABOUT[About]

    FEAT --> F1[Analytics]
    FEAT --> F2[Automation]
    FEAT --> F3[Integrations]

    BLOG --> B1[Post 1]
    BLOG --> B2[Post 2]

带导航区域

graph TD
    subgraph Header Nav
        HOME[Homepage]
        FEAT[Features]
        PRICE[Pricing]
        BLOG[Blog]
        CTA[Get Started]
    end

    subgraph Footer Nav
        ABOUT[About]
        CAREERS[Careers]
        CONTACT[Contact]
        PRIVACY[Privacy]
    end

    HOME --> FEAT
    HOME --> PRICE
    HOME --> BLOG
    HOME --> ABOUT

    FEAT --> F1[Analytics]
    FEAT --> F2[Automation]

更多Mermaid模板:请参阅 references/mermaid-templates.md


内部链接策略

链接类型

类型用途示例
导航链接在板块间移动页眉、页脚、侧边栏链接
上下文链接文本中的相关内容“了解更多关于分析”
中心辐射模型将集群内容连接到中心博客文章链接到支柱页面
跨板块链接连接跨板块的相关页面功能页面链接到相关案例研究

内部链接规则

  1. 无孤立页面 — 每个页面至少有一个指向它的内部链接
  2. 描述性锚文本 — “我们的分析功能”而非“点击这里”
  3. 每1000字内容5-10个内部链接(大致指南)
  4. 更频繁地链接到重要页面 — 首页、关键功能页面、定价
  5. 使用面包屑 — 每个页面上免费提供内部链接
  6. 相关内容板块 — 页面底部放置“相关文章”或“你可能也喜欢”

中心辐射模型

对于内容密集型网站,围绕中心页面组织:

Hub: /blog/seo-guide(综合概述)
├── Spoke: /blog/keyword-research(链接回中心)
├── Spoke: /blog/on-page-seo(链接回中心)
├── Spoke: /blog/technical-seo(链接回中心)
└── Spoke: /blog/link-building(链接回中心)

每个辐条链接回中心。中心链接到所有辐条。辐条在相关时相互链接。

链接审计清单

  • 每个页面至少有一个入站内部链接
  • 无损坏的内部链接(404)
  • 锚文本描述性强(非“点击这里”或“阅读更多”)
  • 重要页面拥有最多的入站内部链接
  • 所有页面均实现面包屑
  • 博客文章存在相关内容链接
  • 跨板块链接将功能连接到案例研究,博客连接到产品页面

输出格式

创建网站架构计划时,提供以下交付物:

1. 页面层级(ASCII树)

完整的网站结构,每个节点带有URL。使用“页面层级设计”部分中的ASCII树格式。

2. 可视化站点地图(Mermaid)

显示页面关系和导航区域的Mermaid图表。在适用时使用带有子图的 graph TD 表示导航区域。

3. URL映射表

页面URL父级导航位置优先级
首页/—页眉高
功能/features首页页眉高
分析/features/analytics功能页眉下拉中
定价/pricing首页页眉高
博客/blog首页页眉中

4. 导航规范

  • 页眉导航项(有序,含CTA)
  • 页脚板块及链接
  • 侧边栏导航(如适用)
  • 面包屑实现说明

5. 内部链接计划

  • 中心页面及其辐条
  • 跨板块链接机会
  • 孤立页面审计(如重构)
  • 每个关键页面的推荐链接

特定任务问题

  1. 这是一个新网站还是重构现有网站?
  2. 是什么类型的网站?(SaaS、内容、电商、文档、混合、小型企业)
  3. 已有或计划存在多少页面?
  4. 网站上最重要的5个页面是哪些?
  5. 是否有需要保留或重定向的现有URL?
  6. 主要受众是谁,他们试图在网站上完成什么?

相关技能

  • content-strategy:用于规划要创建的内容和主题集群
  • programmatic-seo:用于通过模板和数据进行规模化SEO页面构建
  • seo-audit:用于技术SEO、页面优化和索引问题
  • cro:用于优化单个页面的转化率
  • schema:用于实现面包屑和网站导航的结构化数据
  • competitors:用于比较页面框架和URL模式

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions

ads

When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions

ai-seo

When the user wants to optimize content for AI search engines, get cited by LLMs, or appear in AI-generated answers. Also use when the user mentions

analytics

When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions

aso

When the user wants to audit or optimize an App Store or Google Play listing. Also use when the user mentions

attribution

When the user wants to figure out which marketing actually drives conversions and revenue, choose or interpret an attribution model, or reconcile conflicting numbers across tools. Also use when the user mentions

churn-prevention

When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions

cold-email

Write B2B cold emails and follow-up sequences that get replies. Use when the user wants to write cold outreach emails, prospecting emails, cold email campaigns, sales development emails, or SDR emails. Also use when the user mentions

co-marketing

When the user wants to find co-marketing partners, plan joint campaigns, or brainstorm partnership opportunities. Use when the user says

community-marketing

Build and leverage online communities to drive product growth and brand loyalty. Use when the user wants to create a community strategy, grow a Discord or Slack community, manage a forum or subreddit, build brand advocates, increase word-of-mouth, drive community-led growth, engage users post-signup, or turn customers into evangelists. Trigger phrases: \

competitor-profiling

When the user wants to research, profile, or analyze competitors from their URLs. Also use when the user mentions

competitors

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions

content-strategy

When the user wants to plan a content strategy, decide what content to create, or figure out what topics to cover. Also use when the user mentions

copy-editing

When the user wants to edit, review, or improve existing marketing copy, or refresh outdated content. Also use when the user mentions

copywriting

When the user wants to write, rewrite, or improve marketing copy for any page — including homepage, landing pages, pricing pages, feature pages, about pages, or product pages. Also use when the user says

coreyhaines31/ab-test-setup

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program," or "experiment playbook." Use this whenever someone is comparing two approaches and wants to measure which performs better, or when they want to build a systematic experimentation practice. For tracking implementation, see analytics-tracking. For page-level conversion optimization, see page-cro.

coreyhaines31/analytics-tracking

When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," "tracking plan," "how do I measure this," "track conversions," "attribution," "Mixpanel," "Segment," "are my events firing," or "analytics isn't working." Use this whenever someone asks how to know if something is working or wants to measure marketing results. For A/B test measurement, see ab-test-setup.

coreyhaines31/aso-audit

When the user wants to audit or optimize an App Store or Google Play listing. Also use when the user mentions 'ASO audit,' 'app store optimization,' 'optimize my app listing,' 'improve app visibility,' 'app store ranking,' 'audit my listing,' 'why aren't people downloading my app,' 'improve my app conversion,' 'keyword optimization for app,' or 'compare my app to competitors.' Use when the user shares an App Store or Google Play URL and wants to improve it.

coreyhaines31/competitor-alternatives

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'battle card,' or 'competitor teardown.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For sales-specific competitor docs, see sales-enablement.

coreyhaines31/email-sequence

When the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program. Also use when the user mentions "email sequence," "drip campaign," "nurture sequence," "onboarding emails," "welcome sequence," "re-engagement emails," "email automation," "lifecycle emails," "trigger-based emails," "email funnel," "email workflow," "what emails should I send," "welcome series," or "email cadence." Use this for any multi-email automated flow. For cold outreach emails, see cold-email. For in-app onboarding, see onboarding-cro.

相关技能