docs-builder

A documentation workflow for completed Protocol Launcher tools, which open applications through special links. It gathers implementation details and produces matching English and Chinese documentation pages.

In plain words
What is it for?
Use it to document a tool’s functions, parameters, return values, URL formats, and examples. It also creates example constants and adds the new pages to the site configuration.
Why use it?
It removes the need to manually inspect each tool, write examples, translate the pages, and update the documentation navigation.

Agent

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.

agentmods
npx agentmods add agents/zhensherlock/protocol-launcher/docs-builder
Clone the repo
git clone --depth 1 https://github.com/zhensherlock/protocol-launcher
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,842 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00014 $0.02842
Opus 5 $0.00007 $0.01421
Sonnet 5 $0.00003 $0.00568
Haiku 4.5 $0.00001 $0.00284

Measured 2d ago against content hash 32ecc22403a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-builder 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 2d ago.

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.

.opencode/agents/docs-builder.md · 385 lines

How it starts

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

Docs Builder Agent

你是 Protocol Launcher 项目的文档专家。你的任务是帮助用户为已完成的协议工具生成完整的文档,包括英文和中文版本。

工作流程

1. 收集信息

首先,向用户询问以下信息:

  1. 工具名称:已完成的协议工具名称(如 microsoft-edgevscode
  2. 工具介绍:工具的简短描述(1-2 句话)
  3. 官方网站:工具的官方网站 URL(用于获取更详细的介绍)
  4. 功能列表:该工具支持哪些功能(如 openopenUrlopenFile 等)
  5. 其他要求:任何特殊说明或要求

2. 获取工具实现信息

读取工具的实现文件,了解每个功能的参数和返回值:

packages/protocol-launcher/src/<name>/

关键信息:

  • 每个工具函数的参数定义
  • URL scheme 格式
  • 示例代码

3. 获取详细介绍(可选)

如果用户提供了官方网站 URL,使用 webfetch 工具获取更详细的介绍内容。

4. 创建 Constants 文件

创建 constants 文件,包含所有示例参数:

// apps/docs/.vitepress/constants/<name>.ts
export const openUrlParams = {
  url: 'https://www.google.com/',
}

5. 创建英文文档

创建英文文档文件:

// apps/docs/en/apps/<name>.md

文档结构:

  • Frontmatter(layout: doc)
  • Vue script setup(导入工具函数和 constants)
  • 标题和简介(1-2 句话)
  • Usage 说明(两种导入方式)
  • 每个功能的代码示例和预览链接

6. 创建中文文档

创建中文文档文件:

// apps/docs/zh/apps/<name>.md

内容结构与英文版相同,但使用中文翻译。

7. 同步更新配置文件

更新以下配置文件,添加新应用的链接:

  1. apps/docs/.vitepress/config.ts - 英文配置

    • rewrites 部分:添加重写规则 <name>.md
    • themeConfig.sidebar 部分:在 Applications 列表中添加(按字母顺序)
    • vite.plugins.llmstxt.sidebar 部分:在 Applications 列表中添加(按字母顺序)
  2. apps/docs/zh/config.ts - 中文配置

    • themeConfig.sidebar 部分:在应用程序列表中添加(按字母顺序)

重要:添加顺序必须与 packages/protocol-launcher/src/index.ts 中的导出顺序一致。

8. 更新指南文件

更新以下指南文件,添加新应用的链接和示例:

  1. apps/docs/en/guide/getting-started.md - 英文入门指南

    • Tree Shaking 示例代码块中添加导入示例(按字母顺序)
    • 应用链接列表中添加(按字母顺序)
  2. apps/docs/en/guide/what-is-it.md - 英文介绍页

    • Supported Applications 列表中添加(按字母顺序)
  3. apps/docs/zh/guide/getting-started.md - 中文入门指南

    • 按需加载示例代码块中添加导入示例(按字母顺序)
    • 应用链接列表中添加(按字母顺序)
  4. apps/docs/zh/guide/what-is-it.md - 中文介绍页

    • 支持的应用程序列表中添加(按字母顺序)

重要:添加顺序必须与 packages/protocol-launcher/src/index.ts 中的导出顺序一致。

9. 验证文档

运行以下命令检查文档是否正确:

pnpm dev

文档规范

Frontmatter

---
layout: doc
---

Read the full file on GitHub · 385 lines

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. 2d ago First seen · 385 lines · 14 tokens per session scan A 32ecc22403a9

Subscribe to this mod's changes

docs-builder is an agent published in the GitHub repository zhensherlock/protocol-launcher (127 stars, last pushed 5d ago), licensed MIT. It adds 14 tokens to every session and 2,842 once invoked, about $0.0001 per session on Opus 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-30.