Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计通过

document-design文件设计

Agent Skill

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

总安装

26,683

周安装

801

GitHub Stars

176

下载量

9,558
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jamditis/claude-skills-journalism --skill 'Document design'

简介

该技能创建可导出为 PDF 的专业 HTML 文档,支持品牌定制与打印优化。

  • 适用于年报、提案或内部简报等需兼顾屏幕阅读与印刷输出的场景。
  • 读取 .claude/pdf-playground.local.md 中的品牌配置,自动生成配色与字体。
  • 安装前请确认品牌规范文件存在,并通过浏览器预览检查响应式表现。
  • document-design 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Document design

Create professional, print-ready HTML documents that export to PDF with customizable branding.

Brand configuration

Before creating documents, check for brand configuration in .claude/pdf-playground.local.md. If found, use those settings. If not, use sensible defaults or ask the user for their brand colors.

Reading brand config

Look for .claude/pdf-playground.local.md in the project root. Parse the YAML frontmatter:

---
brand:
  name: "Organization Name"
  tagline: "Tagline"
  website: "https://example.com"
  email: "contact@example.com"

colors:
  primary: "#CA3553"
  secondary: "#000000"
  background: "#FFFFFF"
  text: "#2d2a28"
  muted: "#666666"

fonts:
  heading: "Playfair Display"
  body: "Source Sans 3"

style:
  headingCase: "sentence"
  useOxfordComma: true
---

Default brand values

If no config exists, use these defaults:

  • Primary color: #CA3553 (red)
  • Secondary color: #000000 (black)
  • Heading font: Playfair Display
  • Body font: Source Sans 3
  • Heading case: sentence case

Core principles

  1. Print-first design: All documents target 8.5" × 11" letter size with proper margins
  2. Brand compliance: Use colors and fonts from brand configuration
  3. Sentence case by default: Unless brand config specifies "title" case
  4. Clean exports: Documents must render correctly when printed to PDF

CSS variables

Generate CSS variables from brand config:

:root {
    --primary: [colors.primary];
    --secondary: [colors.secondary];
    --background: [colors.background];
    --text: [colors.text];
    --muted: [colors.muted];

    /* Derived colors */
    --primary-dark: [darken primary by 15%];
    --gray-100: #f5f4f2;
    --gray-200: #e8e6e3;
}

Print CSS fundamentals

Page setup

@page {
    size: 8.5in 11in;
    margin: 0;
}

@media print {
    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .page {
        page-break-after: always;
        page-break-inside: avoid;
    }
}

Fixed page dimensions

.page {
    width: 8.5in;
    height: 11in;
    padding: 0.5in 0.75in;
    padding-bottom: 1in; /* Space for footer */
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

Fixed footers

.page-footer {
    position: absolute;
    bottom: 0.4in;
    left: 0.75in;
    right: 0.75in;
    font-size: 9pt;
    border-top: 1px solid var(--gray-200);
    padding-top: 0.1in;
    background: var(--background);
}

Footer clearance (critical)

Content overlapping or touching the footer is a recurring issue.

Preferred layout — grid rows auto 1fr auto:

.page {
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
}

This makes the header and footer take their natural height, and the content fills the remaining space. No magic-number calc() needed — the footer clearance is structural.

Required safeguards:

  1. Use grid-template-rows: auto 1fr auto on the page so content automatically gets the space between header and footer
  2. Set overflow: hidden on the content container to prevent text bleeding past its bounds
  3. Include padding-bottom: 0.3in (minimum) inside the content area as a buffer
  4. Never use hardcoded height: calc(...) with magic numbers for header/footer heights — they drift when padding or font sizes change
  5. After rendering, always screenshot and visually verify the bottom of the page before delivering
  6. If content overflows, reduce content — never shrink the footer gap. Tighten the header first if you need more room.

Typography patterns

Font loading

@import url('https://fonts.googleapis.com/css2?family=[heading-font]:wght@400;600;700&family=[body-font]:wght@400;500;600;700&display=swap');

body {
    font-family: '[body-font]', Arial, sans-serif;
    font-size: 11pt;
    line-height: 1.6;
    color: var(--text);
}

h1, h2, h3 {
    font-family: '[heading-font]', Georgia, serif;
    font-weight: 700;
}

Heading styles

.section-title {
    font-size: 26pt;
    color: var(--secondary);
    margin-bottom: 0.25in;
}

.section-title::after {
    content: '';
    display: block;
    width: 0.5in;
    height: 3px;
    background: var(--primary);
    margin-top: 0.12in;
}

Common components

Cover page header

<header class="cover-header">
    <div class="logo-bar">
        <div class="logo-primary">[brand.name]</div>
    </div>
    <div class="cover-title-block">
        <div class="cover-eyebrow">[Document type] • [Date]</div>
        <h1 class="cover-title">[Title in configured case]</h1>
    </div>
</header>

Budget table

.budget-table thead {
    background: var(--secondary);
    color: white;
}

.budget-table tbody tr:last-child {
    background: var(--primary);
    color: white;
    font-weight: 700;
}

Highlight box

.highlight-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.3in;
}

Document creation workflow

  1. Check for brand config in .claude/pdf-playground.local.md
  2. Load template from ${CLAUDE_PLUGIN_ROOT}/templates/
  3. Apply brand settings to CSS variables and content
  4. Customize content based on user requirements
  5. Save HTML file in current working directory
  6. Offer preview with Playwright browser tools

PDF export instructions

  1. Open the HTML file in Chrome
  2. Press Ctrl+P (or Cmd+P on Mac)
  3. Set "Destination" to "Save as PDF"
  4. Set "Margins" to "None"
  5. Enable "Background graphics"
  6. Save the file

Additional resources

Templates

Pre-built templates in ${CLAUDE_PLUGIN_ROOT}/templates/:

  • proposal-template.html
  • report-template.html
  • onepager-template.html
  • newsletter-template.html
  • slides-template.html
  • event-template.html

Brand examples

Example brand configurations in ${CLAUDE_PLUGIN_ROOT}/brands/:

  • default.yaml - Default brand settings
  • ccm.yaml - Center for Cooperative Media
  • example-newsroom.yaml - Sample newsroom config

Reference files

For detailed CSS patterns: references/css-patterns.md

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

38.23%
按下载量换算3,654

Claude

32.47%
按下载量换算3,103

Cursor

16.87%
按下载量换算1,612

Gemini CLI

8.45%
按下载量换算808

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills