f2s-doc-final

A document-formatting skill that turns a PDF or Markdown file into a Chinese Markdown document following a specified final-draft template.

In plain words
What is it for?
Use it to prepare documents for the f2s knowledge-base build process, optionally using a template file and handling large PDFs with a sub-agent.
Why use it?
It removes the manual work of reading source documents and arranging their concepts, rules, and processes into a consistent structure.

Skill for Claude CodeCodex

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 skills/double-coding-lab/flow2spec/f2s-doc-final
Any agent
npx skills add double-coding-lab/Flow2Spec --skill f2s-doc-final
Clone the repo
git clone --depth 1 https://github.com/double-coding-lab/Flow2Spec

Made for: Claude Code, Codex.

Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,963 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.00058 $0.01963
Opus 5 $0.00029 $0.00981
Sonnet 5 $0.00012 $0.00393
Haiku 4.5 $0.00006 $0.00196

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

Security

Grade A, and why

f2s-doc-final 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.

.claude/skills/f2s-doc-final/SKILL.md · 93 lines

How it starts

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

执行口径:初稿/终稿统一写入 .Knowledge/stock-docs/;模板优先读取 .Knowledge/template/终稿模版.md

编排(主 / 子 agent)

  • subAgent / switchAgentVerification 两字段语义以统一入口为唯一事实源:Cursor/Claude 读配置根 rules/f2s-flow2spec-unified-entry.*Codex.codex/topics/f2s-flow2spec-unified-entry.md(与上同源,flow2spec init 镜像)。本节不复述。
  • 默认不拆子:MD / PDF → 终稿模版的连贯性最好,由主会话一气呵成完成理解、套模版与定稿。
  • 可选拆子(仅当 subAgent=true 且大体量 / 多文件,阈值:PDF > 50 页> ~5MB 文本):子 agent 做「套模版、排版与结构搬运」草稿;主 agent 对照终稿模版、识别缺口并向用户追问、与用户对齐并定稿 / 验收子 agent 不得单独宣称终稿已合规
  • 不为「格式转换可独立」默认拆子:终稿合规依赖模版语义 + 业务表述,主侧验收成本通常仍在。
  • 校验:落盘侧 agent 自验,本 SKILL 不绑定交叉校验。

将 PDF 或 MD 转换为《终稿模版》规范格式(spec → context)

用户会在本技能后附带至少一个参数第一个参数为本地 PDF 文件路径Markdown 文件路径(必填);第二个参数(可选)为输出文件路径,若提供则覆盖默认输出位置。请根据文件类型按下列流程执行,输出便于后续由 f2s-kb-build 技能消费的终稿风格 Markdown 文档。

终稿模版仅作提示:若存在 .Knowledge/template/终稿模版.md,可读取作为结构参考;不强制套用。

内嵌模板结构(当项目内无 .Knowledge/template/终稿模版.md 时使用)

规范要求:

  • 一级标题:方案名(如 # xxx 技术方案设计)。
  • 二级标题至少包含## 核心概念## 业务规则## 关键流程;其余可按需增删(如 状态与流转、接口、配置/表设计/错误码、实现位置与对接方式)。
  • 核心概念:用表格列出术语、实体、关键 ID(列:概念、说明)。
  • 状态与流转:若有状态机,用列表写状态及流转;若无可简述或省略。
  • 业务规则:列表写约束、校验、配置项。
  • 关键流程:按「用户侧或系统侧」主流程,列表写流程名、步骤简述、入口接口/方法、结果。
  • 可选章节:接口、配置/表设计/错误码、实现位置与对接方式,按需保留并填写。

流程一:用户传入的是 Markdown(.md)

  1. 读取用户传入的 .md 文件内容。
  2. 参考格式(不强制):若存在 .Knowledge/template/终稿模版.md,可读取作为结构提示;否则可参考下方内嵌模板结构。
  3. 分析与转换
  • 理解原文主题与结构,提炼「方案名」「核心概念」「业务规则」「关键流程」及与原文相关的其他章节(如状态与流转、接口、配置/表设计/错误码、实现位置等)。
  • 将内容重组为结构清晰的终稿风格 Markdown:一级标题为方案名;建议至少包含 核心概念、业务规则、关键流程 三个二级标题,其余按原文有无与需要增删;表格/列表格式可参考模版,不必完全一致。
  • 若原文缺少某节,可标「(待补充)」或根据原文推断补全;若原文结构已清晰,可保留原文章节命名。
  1. 输出
  • 默认写入 .Knowledge/stock-docs/<方案名>_终稿.md(最终产物带 _终稿 标识)。
  • 若用户希望指定输出路径,可在命令后附带第二个参数作为输出路径;否则用默认。
  1. 回复:告知用户已生成 .Knowledge/stock-docs/<方案名>_终稿.md,并提示可按 f2s-kb-build 继续同步 .Knowledge/topics.Knowledge/index.md(必要时 manifest)。

流程二:用户传入的是 PDF(.pdf)

分两步完成:先 PDF → 初稿 MD,用户确认后再 初稿 MD → 模板格式 MD

步骤 A:首次执行(传入 PDF 路径)

Read the full file on GitHub · 93 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 · 93 lines · 58 tokens per session scan A 7b39a3ffb5d6

Subscribe to this mod's changes

f2s-doc-final is a skill published in the GitHub repository double-coding-lab/Flow2Spec (47 stars, last pushed 4d ago), licensed MIT. It adds 58 tokens to every session and 1,963 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens