Communitygithub.com

kirklin/kirklin-slides

演示配图:把方案、汇报、立项材料和文档里的内容做成 16:9 的图片,每页是一个 1920×1080 的 HTML 页面,用无头浏览器渲染成 3840×2160 的 PNG。包括 27 种常见版式的共用样例页(封面、目录、要点、数字、表格、各类图表、时间轴、流程、团队、代码、结束页等)、所有风格通用的组件和文字规范、可以继续增加的多种风格,以及创建、渲染、检查、导出和截取帖子的 TypeScript 脚本。当用户需要给文档做配图、做幻灯片那样的图,改、补、检查、导出这类配图,或者要把一套新的配图风格加进来时使用。不负责 .pptx 文件、在线幻灯片、海报和文档正文。

kirklin-slides 是什么?

kirklin-slides is a Claude Code agent skill that 演示配图:把方案、汇报、立项材料和文档里的内容做成 16:9 的图片,每页是一个 1920×1080 的 HTML 页面,用无头浏览器渲染成 3840×2160 的 PNG。包括 27 种常见版式的共用样例页(封面、目录、要点、数字、表格、各类图表、时间轴、流程、团队、代码、结束页等)、所有风格通用的组件和文字规范、可以继续增加的多种风格,以及创建、渲染、检查、导出和截取帖子的 TypeScript 脚本。当用户需要给文档做配图、做幻灯片那样的图,改、补、检查、导出这类配图,或者要把一套新的配图风格加进来时使用。不负责 .pptx 文件、在线幻灯片、海报和文档正文。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/kirklin/skills-slides/tree/HEAD

在你喜欢的 AI 中提问

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

文档

Presentation Slides

Presentation Slides creates 16:9 images from HTML pages. Each page is a 1920×1080 HTML document styled with the chosen theme, then rendered by a headless browser to a 3840×2160 PNG for insertion into project proposals, reports, and documentation.

CRITICAL — Before creating any page, you MUST read the following specifications using the Read tool:

  1. kirklin-slides-copy.md: Typography rules, applicable to all styles
  2. kirklin-slides-layouts.md: Content and layout rules for 27 layout types
  3. kirklin-slides-components.md: Page structure and component class names
  4. The chosen style's specification: colors, font sizes, and dimensions for each layout. File locations are listed in the style table.
  5. Before creating, rendering, checking, renumbering, exporting, previewing a style, or capturing a post, you MUST read kirklin-slides-workflow.md.
  6. Before adding a new style, you MUST read kirklin-slides-new-style.md.

Hereinafter, <skill directory> refers to the directory containing this file.

Styles

Styles determine the colors, fonts, font sizes, and decorations of the slides. All styles share the same set of example pages, component class names, and typography rules. Currently available styles are listed in the table below:

StyleEnglish NameUse CaseSpec
Dark Launch Stylelaunch-darkProject proposals, pitch presentations, on-screen presentationskirklin-slides-style-launch-dark.md

Example pages are located in assets/pages/. The stylesheets for each style are located in assets/styles/<EnglishName>/style.css. Run node <skill directory>/scripts/preview-style.ts <EnglishName> summary.png to generate a summary image of all examples for a style.

Use Cases

  • Create images for project proposals, reports, and other documents
  • Modify or supplement existing images
  • Create single pages like covers, timelines, team introductions
  • Export all images in document order and generate a summary image
  • Capture social media posts and embed them into images
  • Add new styles (e.g., a light theme) based on user-provided images

Quick Decisions

  • When a project already has a slides/style.css, use that style. The first line of the file contains the English name of the style; read the corresponding style spec. Place new pages in the same pages/ directory.
  • When the user specifies a style, use the specified style.
  • When the project has no style.css and the user does not specify a style: if only one style exists, use it directly; if multiple styles exist, recommend one based on content and context, then confirm with the user after viewing the summary image.
  • When the user provides a new set of images and requests future creations in that style, add the new style following kirklin-slides-new-style.md without modifying existing styles.
  • Determine each page's title first, then choose the layout based on the page's main content. The table below maps common content types to layouts; see kirklin-slides-layouts.md for full details.
ContentLayout
A single key numberBig Number
Multiple numbersNumber Blocks
Multiple parallel conclusionsKey Points
Multiple features or capabilitiesIcon List
Trade-off between two approachesComparison
Items grouped by two dimensionsFour Quadrants
Multiple items compared across several aspectsTable
Comparison of magnitudesHorizontal Bars
Values aggregated by time periodsColumn Chart
Metric trends over timeLine Chart
Composition of a totalDonut Chart
Progressive stages decreasingFunnel
MilestonesTimeline
Phased plansRoadmap
Weekly tasksGantt Chart
Two simultaneous activitiesDual Track
Sequential stepsFlowchart
A direct quoteQuote
An image with descriptionImage+Text
External postsScreenshot
Team members and rolesTeam
PartnersLogo Wall
A code snippetCode

Core Constraints

  • All styles have a canvas size of 1920×1080, rendered as 3840×2160 PNGs.
  • Text stays within the style-defined safe area, determined by four margin variables in style.css.
  • Pages contain only structure, content, and percentages computed from data; colors, font sizes, and other styles are governed by the chosen style. The meaning of colors is defined by the style spec.
  • Each page expresses exactly one topic; split content across multiple pages when it is extensive.
  • Numbers, names, and dates come from the user's source materials or are directly computed from them (e.g., totals, start/end dates, maximums). Computed numbers are annotated with the calculation method in the footer. Numbers not present or computable from the materials are not included or estimated.
  • Placeholder text in example pages is entirely replaced with user content; remove any sections the user does not provide.
  • Comparable charts use the same scale, noted in the footer.
  • Titles are complete sentences ending with a period. Add spaces between Chinese characters and English/numeric characters; use "to" for value ranges.
  • The numbering of images in a document matches their appearance order; renumber after inserting a new page.
  • Scripts are written in TypeScript; helper scripts in the project also use TypeScript.

Examples

# BAD: Title is a topic, no space between Chinese and numbers, range uses tilde
Process approval overview
Each module needs 2~3 people

# GOOD: Title is a conclusion with a period, spaces inserted
New process reduces approval wait by two days.
Each module is handled by 2 to 3 people

# BAD: Two horizontal bar charts use different scales, and the selected scheme uses a color that indicates severity
# GOOD: Two horizontal bar charts share the same scale with a note in the footer, and the selected scheme uses the style's "selected" color

Checklist

  • After each page is modified, it has been re-rendered and the PNG has been inspected with the Read tool.
  • The check script reports no issues, and no placeholder text from example pages remains.
  • All numbers, names, and dates are found in the user's source materials or can be computed from them.
  • Image captions in the document match the titles, and numbering matches the order of appearance.
  • When the user requests export, the export script runs without errors, and the summary image has been reviewed.
  • After modifying this skill's scripts, example pages, or styles, pnpm --dir <skill directory> test passes all tests.

Out of Scope

  • .pptx files and online slide decks
  • Posters, social media cards, and web design
  • Writing document body text

References

FileDescription
kirklin-slides-copy.mdTypography rules
kirklin-slides-layouts.mdLayout catalog
kirklin-slides-components.mdPage structure and components
kirklin-slides-workflow.mdCreation workflow and script usage
kirklin-slides-new-style.mdAdding a new style
kirklin-slides-style-launch-dark.mdDark launch style spec
assets/pages/Shared example pages for 27 layouts
assets/styles/Stylesheets for each style
scripts/use-style.tsSet style for a project
scripts/add-page.tsCopy an example page by layout
scripts/render.tsRender pages
scripts/check-pages.tsCheck text and layout
scripts/export-slides.tsExport all images and summary for a document
scripts/preview-style.tsGenerate a summary image for a style
scripts/post-shot.tsCapture a social media post

相关技能