Flow2Spec: Skill for Claude Code

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

f2s-kb-distill is a skill for Claude Code from double-coding-lab/Flow2Spec. It costs 67 tokens per session (6,051 once invoked), scanned A, original, MIT.

A knowledge-capture workflow that extracts reusable facts from question-and-answer conversations and stores them in a knowledge base.

In plain words
What is it for?
Use it to turn conversations into knowledge-base updates, merge compatible information, and check the resulting knowledge base.
Why use it?
It reduces the need to copy useful facts into documentation by hand and helps decide whether information belongs in a new or existing topic.

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-distill/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-distill

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/double-coding-lab/flow2spec/f2s-kb-distill"><img src="https://agentmods.dev/badge/skills/double-coding-lab/flow2spec/f2s-kb-distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,051 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 warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 161
    Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
    Fix: Set explicit rate limits, timeouts, and resource quotas for API calls, file operations, and compute. Implement circuit breakers for runaway loops.
  • medium Excessive Agency · line 181
    Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
    Fix: Set explicit rate limits, timeouts, and resource quotas for API calls, file operations, and compute. Implement circuit breakers for runaway loops.
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.00067 $0.06051
Opus 5.5 $0.00027 $0.02420
Sonnet 5.5 $0.00013 $0.01210
Haiku 4.5 $0.00007 $0.00605

Measured 1mo ago against content hash ace8160be374, 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-distill 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-distill/SKILL.md · 390 lines

How it starts

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

任务路径:凡 .task/ 落盘与续作,**必须以 rules/f2s-task 解析的 TASK_ROOT 为准(.task 或 .task/<developerId>;config → git → legacy)。下文若仍出现 .task/todo.json / .task/active/,均视为 TASK_ROOT/... 的简写。

执行口径:本技能只维护 .Knowledge,默认不改配置根 rules/skills。

KB 自动合并协议(必须)

本技能不得把“人工执行命令”作为用户流程。用户触发本技能后,由 agent 自己完成知识候选生成、合并、构建与校验:

  1. 若本轮存在可沉淀知识,先在当前任务上下文中形成 kb-delta 草稿,记录 taskId、developerId、baseRevisions、changes 与证据摘要;没有显式任务目录时可在内存中形成等价对象,不强制为了本技能创建 .task。changes 可使用 appendBody / replaceBody / updateFrontmatter;确需新主题时使用 createTopic,并可携带 taskRule 与 matcher 让路由一并接入。
  2. 写入 .Knowledge 前,必须用 flow2spec kb plan <delta> 或等价内部能力预演;若 topic revision 不一致,停止自动写入,转入语义合并说明。
  3. 可自动合并时,由 agent 调用 flow2spec kb apply <delta> 或等价内部能力写入 topic,并随后执行 flow2spec kb build 与 flow2spec kb check。
  4. 用户只看到“知识库已同步 / 有语义冲突需确认 / 已跳过入库及原因”,不要求用户手动执行 kb plan/apply/build/check。

编排(主 / 子 agent)

  • subAgent / switchAgentVerification 两字段语义以统一入口为唯一事实源:Cursor/Claude 读配置根 rules/f2s-flow2spec-unified-entry.*;Codex 读 .codex/topics/f2s-flow2spec-unified-entry.md(与上同源,flow2spec init 镜像)。
  • 本技能默认不拆子:问答知识提取是单轮聚焦任务,由主 agent 全流程完成效率更高。
  • 写权硬约束:manifest-routing.json 与 .Knowledge/index.md 恒由主 agent 单点落盘。
  • 校验:落盘侧自验。

f2s-kb-distill:问答驱动的知识提取与入库

使用时机

  • 用户提问 → agent 下钻源码回答 → 需要将发现的知识沉淀到 KB
  • 通常由 f2s-kb-feedback-closing 规则自动建议,也可用户主动调用
  • 与 f2s-kb-sync 区分:sync 适合批量同步多个能力;distill 专注单次问答的知识提取

输入

参数 必填 说明
用户问题 自动获取 上一轮用户的提问(自动从对话历史提取)
agent 回答 自动获取 上一轮 agent 的回答内容(自动从对话历史提取)
命中主题 可选 如由 f2s-kb-feedback-closing 触发,会携带命中的 topicId
下钻文件 自动分析 从回答中提取引用的文件/函数(自动分析)

无有效问答上下文时中止并提示用户。

执行挡位(轻量 / 严格,agent 自动判)

f2s-kb-distill 只有一个入口(无 --fast 参数),进入流程第一件事是判挡:

判挡依据(4 个维度,全满足才走轻量挡)

维度 取值方式 走「轻量挡」的条件
上游 f2s-kb-feedback-closing case 看本轮 / 上一轮 agent 回答末尾的收口块 case 2 或 case 3(case 1 / 无收口 → 严格挡)
本轮 Read 业务源码文件数 agent 回顾本轮自己的工具调用 ≤ 3 个
本轮回答引用的函数 / 类名数 数回答里反引号包裹的 xxx() / 类名 ≤ 5 个
用户追问是否否定上游结论 看用户最新输入是否含"不对 / 重新分析 / 那条不准"等 否

Read the full file on GitHub · 390 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 ace8160be374
  2. 1mo ago First seen · 388 lines · 67 tokens per session scan A 3e1d4c8f8eae

Subscribe to this mod's changes

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