Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问clear审计通过

page-structure-design页面结构设计

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

329

周安装

14

GitHub Stars

61

下载量

115
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:page-structure-design(页面结构设计)
来源仓库:https://github.com/melodic-software/claude-code-plugins
仓库路径:skills/page-structure-design
安装命令:
npx skills add https://github.com/melodic-software/claude-code-plugins --skill page-structure-design
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/melodic-software/claude-code-plugins --skill page-structure-design

简介

page-structure-design 用于辅助界面设计、

  • 视觉规范、排版、配色、布局和交互体验优化。
  • 它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。
  • 使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;
  • 涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

SKILL.md

Page Structure Design

Guidance for designing page hierarchies, templates, and modular page composition systems for headless CMS.

When to Use This Skill

  • Designing page tree structures
  • Creating page templates with zones
  • Implementing page builder functionality
  • Planning sitemap generation
  • Building modular page composition

Page Hierarchy Patterns

Basic Page Tree

public class Page
{
    public Guid Id { get; set; }
    public string Title { get; set; } = string.Empty;
    public string Slug { get; set; } = string.Empty;

    // Hierarchy
    public Guid? ParentId { get; set; }
    public Page? Parent { get; set; }
    public List<Page> Children { get; set; } = new();

    // Computed path
    public string Path { get; set; } = string.Empty; // /about/team/leadership
    public int Depth { get; set; }
    public int Order { get; set; }

    // Template and content
    public string Template { get; set; } = string.Empty;
    public PageContent Content { get; set; } = new();
}

Page Sets (Collections)

// Page set for grouping related pages
public class PageSet
{
    public Guid Id { get; set; }
    public string Name { get; set; } = string.Empty;
    public string Slug { get; set; } = string.Empty;
    public PageSetType Type { get; set; }

    // Configuration
    public string ItemTemplate { get; set; } = string.Empty;
    public string ListTemplate { get; set; } = string.Empty;
    public int ItemsPerPage { get; set; } = 10;

    // URL pattern
    public string UrlPattern { get; set; } = string.Empty; // /blog/{slug}
}

public enum PageSetType
{
    Blog,       // Chronological posts
    Portfolio,  // Project showcase
    Team,       // Team members
    Products,   // Product catalog
    FAQ,        // Q&A collection
    Custom      // User-defined
}

Template System

Template Definition

public class PageTemplate
{
    public string Name { get; set; } = string.Empty;
    public string DisplayName { get; set; } = string.Empty;
    public string Description { get; set; } = string.Empty;

    // Template hierarchy
    public string? ParentTemplate { get; set; }

    // Available zones for content
    public List<TemplateZone> Zones { get; set; } = new();

    // Required fields
    public List<TemplateField> Fields { get; set; } = new();

    // Applicable page types
    public List<string> ApplicablePageTypes { get; set; } = new();
}

public class TemplateZone
{
    public string Name { get; set; } = string.Empty;
    public string DisplayName { get; set; } = string.Empty;
    public ZoneType Type { get; set; }
    public List<string> AllowedWidgets { get; set; } = new();
    public int? MaxWidgets { get; set; }
}

public enum ZoneType
{
    Single,     // One widget only
    Multiple,   // Multiple widgets stacked
    Grid        // Grid layout
}

Template Inheritance

BaseTemplate
├── Zones: Header, Footer, Sidebar
└── Fields: MetaTitle, MetaDescription

    ├── HomeTemplate (extends Base)
    │   └── Zones: Hero, Features, CTA
    │
    ├── ContentTemplate (extends Base)
    │   └── Zones: MainContent, RelatedContent
    │
    └── LandingTemplate (extends Base)
        └── Zones: Hero, Sections (multiple)

Page Builder Components

Widget System

public abstract class Widget
{
    public Guid Id { get; set; }
    public string Type { get; set; } = string.Empty;
    public int Order { get; set; }
    public Dictionary<string, object?> Settings { get; set; } = new();
}

public class TextWidget : Widget
{
    public string Content { get; set; } = string.Empty;
}

public class ImageWidget : Widget
{
    public Guid MediaItemId { get; set; }
    public string? Alt { get; set; }
    public string? Caption { get; set; }
}

public class CallToActionWidget : Widget
{
    public string Heading { get; set; } = string.Empty;
    public string? Subheading { get; set; }
    public string ButtonText { get; set; } = string.Empty;
    public string ButtonUrl { get; set; } = string.Empty;
    public string? BackgroundImageId { get; set; }
}

public class CardGridWidget : Widget
{
    public List<Card> Cards { get; set; } = new();
    public int Columns { get; set; } = 3;
}

Page Content Structure

public class PageContent
{
    // Zone-based content storage
    public Dictionary<string, List<Widget>> Zones { get; set; } = new();

    // Page-level fields
    public string? HeroTitle { get; set; }
    public string? HeroSubtitle { get; set; }
    public Guid? HeroImageId { get; set; }

    // SEO
    public string? MetaTitle { get; set; }
    public string? MetaDescription { get; set; }
    public bool NoIndex { get; set; }
}

Sitemap Generation

Sitemap Data Model

public class SitemapEntry
{
    public string Url { get; set; } = string.Empty;
    public DateTime LastModified { get; set; }
    public ChangeFrequency ChangeFrequency { get; set; }
    public decimal Priority { get; set; }
    public List<SitemapAlternate>? Alternates { get; set; }
}

public class SitemapAlternate
{
    public string Hreflang { get; set; } = string.Empty;
    public string Url { get; set; } = string.Empty;
}

public enum ChangeFrequency
{
    Always,
    Hourly,
    Daily,
    Weekly,
    Monthly,
    Yearly,
    Never
}

Sitemap Generation Service

public class SitemapService
{
    public async Task<List<SitemapEntry>> GenerateSitemapAsync()
    {
        var entries = new List<SitemapEntry>();

        // Add pages
        var pages = await _pageRepository.GetPublishedPagesAsync();
        foreach (var page in pages)
        {
            entries.Add(new SitemapEntry
            {
                Url = $"{_baseUrl}{page.Path}",
                LastModified = page.ModifiedUtc,
                ChangeFrequency = GetChangeFrequency(page),
                Priority = CalculatePriority(page)
            });
        }

        // Add page set items (blog posts, products, etc.)
        var pageSets = await _pageSetRepository.GetAllAsync();
        foreach (var pageSet in pageSets)
        {
            var items = await _pageSetRepository.GetItemsAsync(pageSet.Id);
            foreach (var item in items)
            {
                var url = GenerateUrl(pageSet.UrlPattern, item);
                entries.Add(new SitemapEntry
                {
                    Url = url,
                    LastModified = item.ModifiedUtc,
                    ChangeFrequency = ChangeFrequency.Weekly,
                    Priority = 0.6m
                });
            }
        }

        return entries;
    }

    private decimal CalculatePriority(Page page)
    {
        // Home page highest priority
        if (page.Depth == 0) return 1.0m;

        // Decrease by depth
        return Math.Max(0.5m, 1.0m - (page.Depth * 0.1m));
    }
}

Page Tree API

REST Endpoints

GET    /api/pages                    # Root pages
GET    /api/pages/{id}               # Single page
GET    /api/pages/{id}/children      # Child pages
GET    /api/pages/path/{*path}       # Page by URL path
GET    /api/pages/tree               # Full page tree
GET    /api/sitemap.xml              # XML sitemap
GET    /api/sitemap.json             # JSON sitemap

Page Tree Response

{
  "data": {
    "id": "page-123",
    "title": "About Us",
    "slug": "about",
    "path": "/about",
    "template": "ContentTemplate",
    "depth": 1,
    "order": 2,
    "children": [
      {
        "id": "page-456",
        "title": "Our Team",
        "slug": "team",
        "path": "/about/team",
        "template": "TeamTemplate",
        "children": []
      },
      {
        "id": "page-789",
        "title": "Careers",
        "slug": "careers",
        "path": "/about/careers",
        "template": "ContentTemplate",
        "children": []
      }
    ]
  },
  "breadcrumbs": [
    { "title": "Home", "path": "/" },
    { "title": "About Us", "path": "/about" }
  ]
}

Best Practices

Page Structure

PatternWhen to Use
Flat structureSimple sites, few pages
2-level hierarchyMost corporate sites
Deep hierarchyDocumentation, large catalogs
Page setsBlog, portfolio, team pages

Template Design

DO:
- Keep zones semantic (Header, MainContent, Sidebar)
- Allow flexible widget placement
- Inherit common zones from base template
- Provide sensible defaults

DON'T:
- Create overly specific templates
- Hard-code layout in templates
- Mix content and presentation concerns
- Create deep template inheritance chains

Related Skills

  • navigation-architecture - Menu and breadcrumb design
  • url-routing-patterns - URL structure and routing
  • content-type-modeling - Page as content type

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Antigravity

27.94%
按下载量换算32

trae

21.46%
按下载量换算25

windsurf

18.92%
按下载量换算22

Claude Code

12.57%
按下载量换算14

Codex

8.03%
按下载量换算9

Gemini CLI

3.45%
按下载量换算4

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills