f2s-doc-pdf

A document-conversion workflow that turns a technical PDF into a Markdown file and saves it in the project's `.Knowledge/req-docs/` folder. It can also help complete written process descriptions that are missing from diagrams.

In plain words
What is it for?
Use it to convert a local PDF technical proposal into a Markdown requirements document, preserve structures such as tables and code blocks, and collect missing process details from the user.
Why use it?
It avoids manually copying and restructuring a technical proposal before implementation. It also makes diagram-based steps easier to clarify when the PDF's flowcharts cannot be read directly.

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

Made for: Claude Code, Codex.

Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,301 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.00041 $0.01301
Opus 5 $0.00020 $0.00651
Sonnet 5 $0.00008 $0.00260
Haiku 4.5 $0.00004 $0.00130

Measured 2d ago against content hash 075af114f6b4, 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-pdf 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-pdf/SKILL.md · 71 lines

How it starts

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

执行口径:技术方案文档统一落在 .Knowledge/req-docs/;规则能力仍由配置根 rules/skills 加载。

编排(主 / 子 agent)

  • 两字段(subAgent / switchAgentVerification)语义以统一入口为唯一事实源:Cursor/Claude 读配置根 rules/f2s-flow2spec-unified-entry.*Codex.codex/topics/f2s-flow2spec-unified-entry.md(与上同源,flow2spec init 镜像)。本文不复述。
  • 默认不拆子:追问-落盘必须在主 agent 内完成(子 agent 无法向用户追问)。
  • 可选拆子:仅当 subAgent=true 且 PDF 规模超阈值(> 50 页 或 > ~5MB 文本)时启用;子 agent 仅负责 PDF→MD 首稿并落盘 .Knowledge/req-docs/<名>.md不向用户追问、不写「流程说明」章节;主 agent 接手后续追问与流程图补写。
  • 校验默认由落盘侧 agent 自验;本 SKILL 不绑定交叉校验。

将 PDF 技术方案文档转为 Markdown(并补全流程说明)

用户会在本技能后附带一个参数PDF 技术方案文档的本地路径(如 ~/Downloads/技术方案.pdf,或 .Knowledge/req-docs/某草稿.pdf)。请按以下步骤执行,将 PDF 转为 Markdown 并保存到 .Knowledge/req-docs/,必要时引导用户补全流程说明。

步骤 1:读取 PDF 并转为 Markdown

  1. 若启用拆子(PDF > 50 页 或 > ~5MB),子 agent 仅负责 PDF→MD 首稿并落盘 req-docs/<名>.md,不追问、不写流程说明;主 agent 接手后续步骤。读取用户传入的 PDF 文件,提取其中的文字内容(表格、章节、列表、代码块等尽量保留结构),整理为 Markdown 格式。
  2. 保存到 .Knowledge/req-docs/,推荐路径:.Knowledge/req-docs/<方案名>.md。文件名为原 PDF 文件名去掉 .pdf 后加 .md
  3. 若目录不存在,先创建再写入。
  4. 保存后告知用户:「已将该 PDF 转为 Markdown 并保存为 xxx.md。」

步骤 2:向用户提问获取流程图(可选但推荐)

PDF 内嵌的流程图无法被直接解析为步骤与分支,若需按图实现代码,需用户配合提供。

  1. 向用户说明:「文档中可能包含流程图,我无法从 PDF 中解析图中的步骤与分支。若您后续会根据技术方案实现代码(见 implement-tech-design 规则),建议补全流程说明:
  • 方式一:将相关流程图以图片形式发到本次对话中,我将解析后以文字形式写入上述 MD;
  • 方式二:直接以文字描述每个接口/流程的步骤(如:1. 是否登录 2. 查某表 3. 判断某字段 → 返回结果),我将原样写入上述 MD。
    若文档无流程图或暂不提供,可回复「跳过」,我将结束本技能。」
  1. 若用户回复「跳过」或明确表示无需流程说明:告知用户「在对话中提供上述 MD 路径并说明按技术方案实现代码,我将按 implement-tech-design 规则执行。」并结束。
  2. 若用户提供流程图(图片或文字):进入步骤 3。

步骤 3:将流程说明写入该 MD

  1. 若用户提供的是图片:解析图片中的步骤、判断分支与返回,整理为文字步骤。
  2. 若用户提供的是文字:直接采用。
  3. 在该 MD 文件末尾(或新增「流程说明」章节)追加流程内容,格式示例:
## 流程说明(由用户提供 / 由流程图解析)

### 示例接口 A
1. 前端发起请求
2. 后端:查询某表最后一条记录
3. 判断:是否有某 ID?是 → 返回 true,否 → 返回 false
4. 返回结果

### 示例接口 B
1. 是否登录 → 否 返回 401
2. 是否过期 → 是 返回 403
…
  1. 保存后告知用户:「流程说明已写入 xxx.md。接下来请在对话中提供该 MD 路径并说明要按技术方案实现代码,我将按 implement-tech-design 规则执行。」

Read the full file on GitHub · 71 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 · 71 lines · 41 tokens per session scan A 075af114f6b4

Subscribe to this mod's changes

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

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens