Flow2Spec: Skill for Claude Code

.claude/skills/f2s-kb-build/SKILL.md

f2s-kb-build is a skill for Claude Code from double-coding-lab/Flow2Spec. It costs 45 tokens per session (2,604 once invoked), scanned A, original, MIT.

A project-knowledge builder that creates topics, indexes, and routing files from documents in a .Knowledge/stock-docs folder. It organizes project context so tasks can be directed to the relevant documentation.

In plain words
What is it for?
Use it to generate project context, build knowledge indexes and topic routes, and run the f2s-kb-build or final-context workflow.
Why use it?
It removes the need to maintain these topic and routing files by hand. It also defines which files the main agent and helper agents may change during larger updates.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents; mentions Codex.

This is double-coding-lab/Flow2Spec's own configuration. It tells Claude Code how to work on Flow2Spec itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Flow2Spec configures →

Reuse

Borrowing it

Nothing to install: this file belongs to double-coding-lab/Flow2Spec. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/double-coding-lab/Flow2Spec/main/.claude/skills/f2s-kb-build/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/double-coding-lab/Flow2Spec

Made for: Claude Code.

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 f2s-kb-build

README.md
[![agentmods](https://agentmods.dev/badge/skills/double-coding-lab/flow2spec/f2s-kb-build/github.svg)](https://agentmods.dev/skills/double-coding-lab/flow2spec/f2s-kb-build)
Your own site
<a href="https://agentmods.dev/skills/double-coding-lab/flow2spec/f2s-kb-build"><img src="https://agentmods.dev/badge/skills/double-coding-lab/flow2spec/f2s-kb-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 f2s-kb-build

Your own site · 80×15
<a href="https://agentmods.dev/skills/double-coding-lab/flow2spec/f2s-kb-build"><img src="https://agentmods.dev/badge/skills/double-coding-lab/flow2spec/f2s-kb-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,604 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00045 $0.02604
Opus 5.5 $0.00018 $0.01042
Sonnet 5.5 $0.00009 $0.00521
Haiku 4.5 $0.00005 $0.00260

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

Security

Grade A, and why

f2s-kb-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 1mo 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-kb-build/SKILL.md · 117 lines

How it starts

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

执行口径:本技能只维护 .Knowledge(topics/index/manifest-routing/matchers 分片),不改配置根 rules/skills。不再维护 .Knowledge/manifest-matchers.json(已废弃聚合文件;flow2spec init 会删除遗留副本)。

根据文档生成项目上下文(topics/index/路由清单)

编排(主 / 子 agent)

  • 两字段(subAgent / switchAgentVerification)语义以统一入口为唯一事实源:Cursor/Claude 读配置根 rules/f2s-flow2spec-unified-entry.*;Codex 读 .codex/topics/f2s-flow2spec-unified-entry.md(与上同源,flow2spec init 镜像)。本 SKILL 不复述。
  • 首选分支(小变更 → 主全流程):当本次改动 ≤ 2 个新 / 改主题,且 ≤ 1 个新 matcher,且无跨主题批量引用调整 时,全流程在主 agent 完成,不拆子。
  • 中大变更分支(subAgent=true 且超出上述阈值):
    • 主 agent 在主会话中列出文件级契约:子 A 只写 .Knowledge/topics/<foo>.md,子 B 只写 .Knowledge/matchers/<m-foo>.json,路径互不重叠;
    • 子 agent 仅落盘契约内文件,不跨边界;
    • 主 agent 单点编辑 .Knowledge/manifest-routing.json / .Knowledge/index.md(补 taskToTopicRules、topicPaths、matcherPath、topicDependencies、topicMetadata);
    • 主 agent 做整体验收。
  • 不推荐:单个子 agent 同时改 manifest / index / 多份 topics / matchers;以及「子 A 写、子 B 验」。
  • 「一子写、主验」:仅在交付边界极窄(例如只产出 1 个新 matcher 分片草稿,manifest 引用仍由主写)时可接受。
  • 写权硬约束:.Knowledge/manifest-routing.json(含 topicMetadata)/ .Knowledge/index.md 恒由主 agent 落盘,子 agent 不得触碰。
  • 默认落盘侧 agent 自验;本 SKILL 不绑定交叉校验。

输入

  • 接收一个参数:URL 或本地路径。
  • 本地路径必须位于 .Knowledge/stock-docs/。
  • 须为终稿:项目架构使用 项目架构终稿.md;其他文档推荐文件名含 _终稿.md,或已由 f2s-doc-final 规范化。禁止直接以 项目架构初稿.md、*_初稿.md 或其他尚未定稿的架构文档执行本技能。
  • 若入参文件名含 初稿(包括不带下划线的 项目架构初稿.md)或 _draft、或用户刚完成架构初稿尚未执行 f2s-doc-final:停止,回复须先执行 f2s-doc-final <初稿路径>,待终稿落盘后再以终稿路径调用本技能。
  • 若传入 .Knowledge/req-docs/,提示用户先整理为 stock-docs 终稿后再执行。

生成原则

  1. 拆解:文档较长或包含多块独立能力时,拆分为多个 topic;避免把无关能力塞到同一主题。
  2. 分工:
  • topics/:规则与流程正文(可执行知识)
  • index.md:主题索引与语义说明(人读入口)
  • manifest-routing.json + taskToTopicRules[].matcherPath 指向的 matchers/*.json:任务路由与关键词词表(机读入口)

步骤 1:获取文档内容

  • URL:抓取正文;无法访问时提示用户先落地到 .Knowledge/stock-docs/*.md。
  • 本地路径:读取 Markdown 文档,提炼主题与能力边界。

步骤 2:语义分析(必须)

从文档中提炼:

  • 主题名与主题意图(可形成 topic id)
  • frontmatter summary(初筛召回锚:职责 + 用户会问的核心名词,按 f2s-topic-authoring「初筛召回规范」写;kb build 会同步进 manifest rule.summary)
  • 核心概念与关键流程
  • 业务规则与边界条件
  • 任务触发词(写入对应 matchers/<matcherId>.json 的 includeAny;单概念核心词优先,复合词仅作补充)
  • 与现有主题的依赖关系(用于 topicDependencies)

Read the full file on GitHub · 117 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. 1mo ago Changed · +2 lines 7b308cf574bf
  2. 1mo ago Changed · +1 lines 49f6eb643857
  3. 1mo ago First seen · 114 lines · 45 tokens per session scan A 46d8e16ecef1

Subscribe to this mod's changes

f2s-kb-build is a skill published in the GitHub repository double-coding-lab/Flow2Spec (52 stars, last pushed 6d ago), licensed MIT. It adds 45 tokens to every session and 2,604 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

forget

Remove a personal fact, preference, relationship detail, topic, or prior event from Muse's active memory and stop existing copies or automations from bringing it back. Use for explicit requests such as 'forget that', 'don't remember this about me', or 'remove that from your memory'. Do not use when 'forget it' merely…

asgeirtj/system_prompts_leaks · 74 tokens

mem0-oss-to-platform

Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…

mem0ai/mem0 · 217 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

shellm

Reference for the shellm system — recursive LLM shell, identity management, memory, skills, trajectory, and all CLI tools. Use when working on shellm itself, debugging agent behavior, or understanding how the pieces fit together.

laude-institute/headlong · 49 tokens