跳到正文
Skillpedia
技术文档101k · #873

docs-page

它能做什么

这个工具可以在一个 HTML 文件中创建完整的文档页面。它把内容分成三栏:左侧是导航菜单,中间是正文,右侧是目录。

适用场景

  • ✓当你需要指南或教程页面时。
  • ✓需要生成 API 参考文档时。
  • ✓想创建详细的技术文档时。

技能链接

https://github.com/nexu-io/open-design/blob/main/design-templates/docs-page/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/nexu-io/open-design/blob/main/design-templates/docs-page/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“创建一个用户登录功能的文档页面,包含代码示例和注意事项提示。”

每周 5 个新技能,1 分钟读完。

工作原理

工具会读取设计说明,选择相关主题,并使用 CSS Grid 把内容排成三栏。它会确保文字易读,代码格式正确。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Docs Page Skill

Produce a single, three-column documentation page in one HTML file.

Workflow

  1. Read the active DESIGN.md (injected above). Use the body type token for prose; the mono token for code; respect line-height and max-width rules.
  2. Pick a topic from the brief — the page should look like real docs, not a generic wireframe. Concrete API names, command examples, plausible parameters.
  3. Lay out three regions, expressed on the inline axis so the layout flips correctly under dir="rtl":
    • Inline-start nav (240–280px, sticky): grouped link list, current page bolded with an inline-start-edge accent stripe. 3–5 groups of 4–8 links.
    • Article body (max-width ~720px, centered in the middle column): H1, lede paragraph, H2 sections, code blocks, callout boxes (note / warning), inline links, lists.
    • Inline-end TOC (200–240px, sticky): "On this page" with the H2/H3 anchors, current section highlighted as the user scrolls.
  4. Write a single HTML document:
    • <!doctype html> through </html>, all CSS inline.
    • CSS Grid for the three columns; sticky positioning for the rails.
    • Code blocks: monospace token, soft surface fill, copy-button affordance (visual only — no JS needed).
    • Anchor IDs on every H2/H3 so the TOC links work.
    • data-od-id on the nav, article, and TOC.
  5. Prose: write at least 350 words of believable docs. Include at least one shell command, one code snippet (5–15 lines), one callout, one table.
  6. Self-check:
    • Body text wraps at the DS line-length sweet spot (60–75 chars).
    • Code uses the DS mono token, not generic monospace.
    • Accent is restrained — used for active nav item, links, one callout border. Not on body text.
    • Page is readable at 1280w and collapses gracefully below 900w (TOC drops out, nav becomes a top drawer).
    • Use logical CSS (margin-inline-start, border-inline-start, inset-inline-end, text-align: start) on the rails and accent stripe so the layout flips correctly under dir="rtl".

Output contract

Emit between <artifact> tags:

<artifact identifier="docs-slug" type="text/html" title="Docs — Page Title">
<!doctype html>
<html>...</html>
</artifact>

One sentence before the artifact, nothing after.

常见问题

什么是 “tokens”?

Tokens 可以理解为预先定义好的基础样式单元,工具用它们来统一文字和代码的格式。

“layout flips correctly under dir="rtl"” 是什么意思?

意思是设置 dir="rtl" 后,页面会自动适配从右到左阅读的语言(比如阿拉伯语),把栏目顺序左右对调。

生成的页面需要 JavaScript 吗?

不需要。代码复制按钮只是视觉效果,页面主体结构由 HTML 和 CSS 构建。

详情

作者的原始描述

A documentation page — inline-start nav, scrollable article body, inline-end table of contents. Use when the brief mentions "docs", "documentation", "guide", "API reference", or "tutorial".

repo: nexu-io/open-design

热度

GitHub 星标
101k
排名
#873
许可证
Apache-2.0
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能