Flow2Spec: Skill for Claude Code

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

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

A maintenance procedure for removing a stock-document's knowledge topics and index links from a project. It updates the project's knowledge files and routing rules.

In plain words
What is it for?
Use it when deleting a document from the project's stock-docs folder and you need to remove its related topics, index entries, routing rules, and dependencies.
Why use it?
It prevents deleted project documents from leaving stale topics, search routes, or dependencies behind. The procedure also handles references to a removed fallback 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-rm/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-rm

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/double-coding-lab/flow2spec/f2s-kb-rm"><img src="https://agentmods.dev/badge/skills/double-coding-lab/flow2spec/f2s-kb-rm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 908 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.00040 $0.00908
Opus 5.5 $0.00016 $0.00363
Sonnet 5.5 $0.00008 $0.00182
Haiku 4.5 $0.00004 $0.00091

Measured 1mo ago against content hash d7120b62393f, 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-rm 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-rm/SKILL.md · 62 lines

What it actually says

执行口径:仅维护 .Knowledge,不改配置根 rules/skills。

编排(主 / 子 agent)

  • 两字段(subAgent / switchAgentVerification)语义以统一入口为唯一事实源:Cursor/Claude 读配置根 rules/f2s-flow2spec-unified-entry.*;Codex 读 .codex/topics/f2s-flow2spec-unified-entry.md(与上同源,flow2spec init 镜像)。不在此复述。
  • 默认主 agent 全流程执行(单点删除拆子收益低)。
  • 拆子阈值:仅当 subAgent=true 且批量删除一次 ≥ 5 主题时,才拆子执行删除与清引用。
  • 主必控:范围确认、fallbackTopic 重指。
  • 写权硬约束:manifest-routing.json 与 .Knowledge/index.md 恒由主 agent 落盘。
  • 验证:默认落盘侧自验;本 SKILL 不绑定交叉校验。

删除文档对应的项目上下文

输入

  • 一个参数:.Knowledge/stock-docs/<文件名>.md 路径,或可匹配文件名片段。

执行步骤

  1. 读取 .Knowledge/index.md,匹配目标文档相关主题。
  2. 删除对应 .Knowledge/topics/<topic>.md 文件。
  3. 从 .Knowledge/index.md 移除匹配项并写回。
  4. 更新路由清单:
    • .Knowledge/manifest-routing.json:移除失效 topicPaths、taskToTopicRules、topicDependencies、topicMetadata 引用
    • 对应 matchers/<matcherId>.json:移除失效规则或 includeAny 词条(与已删 task/matcherId 对齐)
    • 若删除了 fallbackTopic,必须指定新的兜底主题
    • 创作侧准则:本步会调整 topicDependencies(删除被依赖主题或孤儿边),须先 Read rules/f2s-topic-authoring.* 全文(Cursor/Claude:rules/f2s-topic-authoring.mdc;Codex:.codex/topics/f2s-topic-authoring.md),核对 DAG 与最小化约束后再落盘。

输出摘要(必须)

  • 已删除的 topic 文件列表
  • .Knowledge/index.md 删除的条目
  • 路由清单调整的字段
  • 未执行项(若有)

复杂场景示例

用户输入文件名片段「回调」,匹配到 2 个主题文档。

  • 先列出两个候选并要求用户确认删除范围,避免误删。
  • 删除后同步清理路由清单失效引用;若删到了 fallbackTopic,必须先指定新的兜底主题再落盘。
  • 最终摘要中写清:删除了哪些 topic、保留了哪些 topic、为什么。

约束

  • 匹配多义时先询问用户确认。
  • 仅删除命中主题,不影响其它主题。
  • manifest-routing.json 与 .Knowledge/index.md 恒由主 agent 落盘(写权硬约束);范围确认与 fallbackTopic 重指不可下放给子 agent。

完成后自检

  1. 被删 topic 是否仍被 manifest 引用(必须为否)。
  2. index 是否仍存在失效主题路径(必须为否)。
  3. topicMetadata 是否仍引用已删除 topic(必须为否)。
  4. fallbackTopic 是否仍有效。
  5. 未在低于拆子阈值(< 5 主题)时强行拆子;manifest / index 由主单点落盘。
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 First seen · 62 lines · 40 tokens per session scan A d7120b62393f

Subscribe to this mod's changes

f2s-kb-rm is a skill published in the GitHub repository double-coding-lab/Flow2Spec (52 stars, last pushed 6d ago), licensed MIT. It adds 40 tokens to every session and 908 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