Feature Doc 标志

Feature Doc

社区热门
huytieu
feature-doc

为您的产品提供闭环式功能文档编写。提供功能(问题编号或 ID)后,它会读取源代码、操作线上应用以截取真实屏幕截图并录制屏幕,撰写文档文章(适用于 Docusaurus 或任何 Markdown 文档站点),同时包含操作步骤和使用场景内容;随后由一个使用全新上下文的只读验证器检查文章,再向您汇报。当您说“为 <feature> 编写文档”“记录 issue #123”或“/feature-doc”时使用。

Add to TypingMind

概览

发布者huytieu
代码仓库COG-second-brain
技能名称feature-doc
星标数
1.3K
复刻数
162
附带文件
4
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 4 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 huytieu 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Feature Doc AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/huytieu/COG-second-brain/tree/main/.claude/skills/feature-doc
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/huytieu/COG-second-brain.git /tmp/COG-second-brain
mkdir -p .claude/skills
cp -r /tmp/COG-second-brain/.claude/skills/feature-doc .claude/skills/feature-doc
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Feature Doc,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Feature Doc。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Feature Doc 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

feature-doc: closed-loop feature documentation

Produces one evidence-backed feature article end to end. Capture needs no manual gesture: a bundled recorder grabs frames from the browser through the DevTools protocol. Publishing the docs PR stays a gate for you at CP-6.

Configuration

Set these once (a .env, your kit.toml, or pass them as arguments). Nothing below is hardcoded.

SettingMeaningExample
APP_URLStart page of the live app to drivehttps://app.example.com/projects/1
ISSUE_REPOIssue tracker holding the feature issuesyour-org/your-product
DOCS_REPOLocal path of the docs repo../your-docs
DOCS_DIRFolder inside the docs repo for the articledocs/features/
EVIDENCE_DIRWhere screenshots and video land./evidence/<feature>/

Keep the docs repo in a folder your tools can always read. Some operating systems block background reads of the Documents folder mid-session, which breaks the verifier.

When to use

  • A shipped or shipping feature has no article, or an outdated one.
  • You want a doc that works as a user manual and as a guide to what you can do with the feature, with real screenshots and a video.

Skip it for backend features with no user surface (write a short "no doc required" record instead).

Closed loop

CP-1 spec (issues/repo)  -> CP-2 plan (AC-n)  -> CP-3 build (capture + write)
   -> CP-3v component verify (task-verifier, read-only)  -> fix-agent (max 2)
   -> CP-5 post-condition  -> CP-6 ship gate (you review, then open the docs PR)

The writer never grades its own work. The verifier is a fresh-context, read-only subagent that gets paths and AC-n only, never the writer's narration. See the closed-loop skill for the checkpoint mechanics.

Inputs

  • Feature id plus seed issue numbers in ISSUE_REPO, or a spec path.
  • A browser already logged in to the app, reachable by a browser automation tool (Playwright, CDP, or your browser harness). If the app redirects to a login page, stop and ask the user to sign in. Never type credentials.
  • The docs repo at DOCS_REPO. One article per feature: a new feature gets a new article, a changed one updates the existing article.

Pipeline

1. Enrich (CP-1)

Read each seed issue (gh issue view <n> --repo $ISSUE_REPO --json title,body,state,labels,milestone, or your tracker's CLI) and any matching spec files. Establish the concrete user surface, the ship status per issue (an OPEN issue is not a shipped surface, so do not claim it), and the exact flow to demo. Never invent UI. Where a detail is unknown, mark it TODO and flag it.

2. Plan (CP-2)

Map the article's sections to AC-n (see Post-conditions). Grep the docs repo for existing coverage to decide between a new article and an update.

3. Capture (CP-3)

Drive the live flow and save real evidence into EVIDENCE_DIR.

  • Screenshots of each meaningful state, using your browser tool's screenshot call.

  • A real video of the end-to-end flow with the bundled recorder (no gesture, no ffmpeg needed for the capture):

    bash
    SR_OUT=$EVIDENCE_DIR/<feature>-demo \
    SR_URL=$APP_URL \
    SR_FPS=8 \
    SR_STEPS='[{"at":0.5,"do":"click_testid","testid":"..."},{"at":2.0,"do":"click_text","text":"..."}]' \
    browser-harness < .claude/skills/feature-doc/tools/screenrec.py

    screenrec.py runs inside a CDP-based Python harness that exposes the page (browser-harness is one such tool; adapt the launcher to Playwright or your own). It writes frames, <out>.manifest.json (fps, viewport, per-action events with cursor coordinates and captions) and a quick <out>.raw.mp4 preview. Step actions are click_xy|click_testid|click_text|type|key|scroll, each with at (seconds) and an optional caption.

    The deliverable is a clean, complete recording of the real workflow: set up, configure, use, get the result. Finish it with tools/recompose.py, which places the real viewport in a simple browser window on a gradient background and speeds up long waits instead of cutting them. No captions, no intro or outro cards, no synthetic cursor.

    bash
    RC_MANIFEST=<base>.manifest.json RC_OUT=<feature>-walkthrough.mp4 \
    RC_SEGMENTS='[[0,9,1],[9,58,8],[58,70,1]]'  # [from_s,to_s,speed]; ramp the waits \
    RC_ADDR="app.example.com" python3 .claude/skills/feature-doc/tools/recompose.py

    recompose.py needs ffmpeg and Pillow. Embed the result with a plain video tag: <video controls preload="metadata" style="width:100%;border-radius:8px;"><source src="..." type="video/mp4" /></video>.

    • Length follows the task: long enough to teach setup and usage.
    • The usage payoff must work on camera. If the payoff step is broken, do not record a stub. Use screenshots for the working part and hold the video until the full flow works.
    • A clip of a few seconds is worse than a screenshot. Use a screenshot instead.
    • tools/videokit.py makes a branded, captioned teaser with intro and outro cards. Use it only for marketing teasers, never for walkthroughs.
  • Optional polish: an interactive demo (Arcade or similar). Browsers require a trusted user gesture to start such recorders, so tools/arcade-record.py drives the flow while you press the start and stop shortcut yourself.

  • Look at every capture. Open the images and the video, name any UI discrepancy, fix the flow, and re-capture. Never pass on "the element exists".

  • If a flow is gated (a broken backend path, an unshipped surface), capture what works, file the blocker in your tracker, and mark the rest pending. Do not fake a working demo.

  • Mask any customer data or personal data visible in a capture before it leaves your machine.

4. Write (CP-3)

Write the article as markdown (MDX-safe when the docs site is Docusaurus) with both layers:

  • How-to: overview, why it matters, step-by-step usage.
  • Use-case layer: at least 3 use cases with sample workflows (each a concrete prompt or step list plus the expected result), prompting techniques where the feature takes input, best practices, limitations.
  • Embed the captured media (![alt](path) for images, a video tag for the recording). Cross-link to related articles.
  • Run the draft through the no-ai-slop skill before verification.

5. Verify (CP-3v then CP-5)

Spawn a task-verifier with only the article path, the evidence directory and the AC-n list. It re-opens the files and media itself and returns one row per AC: EVIDENCE AC-n | CP-3v | PASS|FAIL | <one line + path/observation>. On FAIL:fixable, spawn fix-agent (max 2 attempts) with just the failed AC-n, then re-verify. After 2 attempts, escalate with the evidence.

6. Report and ship gate (CP-6)

Summarize the article path, the media (with accessible URLs once uploaded), the AC-n PASS table, and open TODOs or gated items. Opening the docs PR waits for the user.

Post-conditions

  • AC-1 The article exists at the planned path under DOCS_DIR with valid frontmatter for your docs site.
  • AC-2 It contains how-to steps and the use-case layer (at least 3 use cases, prompting where relevant, best practices).
  • AC-3 Every UI or behavior claim is grounded in a captured screenshot or an issue body. Unknowns are TODO, not invented. Surfaces from OPEN issues are marked gated, not shipped.
  • AC-4 Either (a) a clean, complete walkthrough recording exists (real setup, usage and result, no decoration, valid mp4 by ffprobe) and the article embeds it, or (b) screenshots cover the working parts and the article notes the video is pending. A short decorated clip does not satisfy this.
  • AC-5 Evidence that ships is accessible (uploaded to the PR or issue, not a local path).
  • AC-6 A limitations section states any gated, blocked or unshipped parts.

Rules

  • No fabrication. Follow your house writing rules (no em dashes, TL;DR first, scannable).
  • Visual verification is mandatory for UI docs: read the pixels, fix what is wrong, re-capture.
  • Use relative paths or config values in all output, never machine-specific absolute paths.

Escape hatches

  • Auth wall: stop and ask the user to sign in. Never enter credentials.
  • CDP will not connect: point your harness at the browser's remote-debugging URL (for example http://localhost:9222) and reload it. If the browser prompts for permission, the user clicks Allow.
  • Flow gated by a bug: file it, capture the working portion, mark the rest pending.
  • ffmpeg absent: the recorder falls back to a GIF preview. Install ffmpeg for the mp4.

Tools

  • tools/screenrec.py: flow recorder (CDP frame-grab loop to frames, manifest and raw preview).
  • tools/recompose.py: walkthrough finisher. Manifest to a clean 1920x1080 h264 mp4 with a browser window, gradient and speed ramps. Options: RC_FIT=1 fits a phone or tall capture, RC_CROP=x0,y0,x1,y1 crops the source, RC_NOBAR=1 drops the browser bar, RC_SPEED_BADGE=1 labels sped-up segments, RC_REDACT pixelates boxes such as a person's name.
  • tools/videokit.py: branded teaser cut with captions and cards (teaser only).
  • tools/arcade-record.py: hybrid interactive-demo recorder. Set APP_URL and add flows to its FLOWS table.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Feature Doc AI 技能有什么作用?

为您的产品提供闭环式功能文档编写。提供功能(问题编号或 ID)后,它会读取源代码、操作线上应用以截取真实屏幕截图并录制屏幕,撰写文档文章(适用于 Docusaurus 或任何 Markdown 文档站点),同时包含操作步骤和使用场景内容;随后由一个使用全新上下文的只读验证器检查文章,再向您汇报。当您说“为 <feature> 编写文档”“记录 issue #123”或“/feature-doc”时使用。

为什么在 TypingMind 中使用 Feature Doc?

因为您只需安装一次,就能搭配任何模型使用。Feature Doc 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Feature Doc?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/huytieu/COG-second-brain/tree/main/.claude/skills/feature-doc。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Feature Doc?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Feature Doc 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Feature Doc 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Feature Doc AI 技能免费吗?

是的。huytieu 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇