doc-smith-build

doc-smith-build is a skill for Claude Code from AIGNE-io/doc-smith-skills. It costs 35 tokens per session (1,153 once invoked), scanned A, original, Apache-2.0.

An internal build tool that converts Doc-Smith Markdown documents into static HTML pages, meaning web pages made from files rather than generated by a server at each visit.

In plain words
What is it for?
Use it to build a full documentation site or convert one Markdown file into an HTML page at a chosen path.
Why use it?
It automates the creation of navigation, styles, language redirects, and individual document pages from a documentation workspace.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the doc-smith plugin — 6 skills shipped together

Good fit Use it to build a full documentation site or convert one Markdown file into an HTML page at a chosen path.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aigne-io/doc-smith-skills/doc-smith-build
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AIGNE-io/doc-smith-skills --skill doc-smith-build
Clone the repo
git clone --depth 1 https://github.com/AIGNE-io/doc-smith-skills

Made for: Claude Code.

Or install doc-smith, the plugin that ships this one along with the rest of its 6 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doc-smith-build

README.md
[![agentmods](https://agentmods.dev/badge/skills/aigne-io/doc-smith-skills/doc-smith-build/github.svg)](https://agentmods.dev/skills/aigne-io/doc-smith-skills/doc-smith-build)
Your own site
<a href="https://agentmods.dev/skills/aigne-io/doc-smith-skills/doc-smith-build"><img src="https://agentmods.dev/badge/skills/aigne-io/doc-smith-skills/doc-smith-build/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for doc-smith-build

Your own site · 80×15
<a href="https://agentmods.dev/skills/aigne-io/doc-smith-skills/doc-smith-build"><img src="https://agentmods.dev/badge/skills/aigne-io/doc-smith-skills/doc-smith-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,153 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01153
Opus 5.5 $0.00014 $0.00461
Sonnet 5.5 $0.00007 $0.00231
Haiku 4.5 $0.00003 $0.00115

Measured 2mo ago against content hash 56e2be14e6d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

doc-smith-build scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/build.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/doc-smith-build/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Doc-Smith HTML 构建

双模式构建:--nav 生成导航和静态资源,--doc 构建单篇文档。

用法

# 生成 nav.js + 复制资源 + 创建重定向
node skills/doc-smith-build/scripts/build.mjs \
  --nav --workspace .aigne/doc-smith --output .aigne/doc-smith/dist

# 构建单篇文档
node skills/doc-smith-build/scripts/build.mjs \
  --doc .aigne/doc-smith/docs/overview/zh.md --path /overview \
  --workspace .aigne/doc-smith --output .aigne/doc-smith/dist

选项

Option Alias Description
--nav 生成 nav.js、复制 CSS、创建重定向页面
--doc <file> 构建单篇 MD 文件为 HTML
--path <path> 文档路径(如 /overview),--doc 模式必需
--workspace <path> -w Doc-Smith workspace(默认 .aigne/doc-smith)
--output <path> -o 输出目录(默认 <workspace>/dist)

模式说明

--nav 模式

从 document-structure.yaml + config.yaml 生成导航数据和静态资源。

输出:

  • assets/nav.js — 导航数据(window.__DS_NAV__ = {...}),侧边栏和语言切换由此驱动
  • assets/docsmith.css — 内置基础样式
  • assets/theme.css — 用户主题(不存在时创建空文件)
  • index.html — 根重定向
  • {lang}/index.html — 语言重定向

调用时机: 初始化时、文档结构变更后。

--doc 模式

构建单篇 MD 文件为完整 HTML 页面。

输入: MD 文件路径 + 文档 path 输出: dist/{lang}/docs/{path}.html

职责:

  • Markdown → HTML 转换(markdown-it)
  • 套 HTML 骨架(data-ds 锚点)
  • 生成 TOC(页面内联)
  • 处理图片占位符(<!-- afs:image ... -->)
  • /assets/ 路径转换为相对路径(见下方路径契约)
  • 拼接静态资源引用(CSS + nav.js)

不负责: 导航渲染(nav.js 客户端完成)、MD 清理(调用方负责)。

路径契约

MD 文件中使用 /assets/ 绝对路径引用资源,build.mjs 自动转换为相对路径:

MD 中写法 HTML 输出(depth=1) HTML 输出(depth=2)
![img](/assets/logo.png) ../../assets/logo.png ../../../assets/logo.png
  • 路径包含 .. 的视为非法,不转换(防遍历攻击)
  • 旧格式 ../../assets/ 仍由已有逻辑处理(向后兼容)
  • 外部 URL 不受影响

导航架构

侧边栏和语言切换由 nav.js 在客户端渲染:

  • 使用 <script src> 加载(兼容 file:// 和 http:// 协议)
  • 更新文档结构只需重新生成 nav.js,无需重建所有 HTML 页面
  • TOC 仍在构建时内联生成(页面特有内容)

错误处理

错误类型 处理方式
workspace 不存在 报告明确错误
document-structure.yaml 缺失 报告明确错误
MD 文件不存在 报告明确错误
--doc 缺少 --path 报告明确错误
依赖未安装 在 scripts 目录执行 npm install

Read the full file on GitHub · 123 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 123 lines · 35 tokens per session scan A 56e2be14e6d6

Subscribe to this mod's changes

doc-smith-build is a skill published in the GitHub repository AIGNE-io/doc-smith-skills (9 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 35 tokens to every session and 1,153 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

doc-smith-build compared with skills from other repositories

doc-smith-build next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
doc-smith-buildAIGNE-io/doc-smith-skillsSkill97mo agoApache-2.0A35Claude Code
orbit-notionnexu-io/open-designSkill106kyesterdayApache-2.0A117Claude Code, Codex
instrument-data-to-allotropeanthropics/knowledge-work-pluginsSkill35k2d agoApache-2.0A123Claude Code
apify-youtube-transcript-scrapersickn33/agentic-awesome-skillsSkill49kyesterdayMITA48Claude Code
legal-holdanthropics/claude-for-legalSkill9.9k3d agoApache-2.0A68Claude Code
ppt-reviewOrkas-AI/OrkasSkill9.0kyesterdayMITA2Claude Code, Codex
feishuHmbown/CodeWhaleSkill41k5d agoMITA33Claude Code, Codex