f2s-config-check

A rule that requires reading flow2spec.config.json before using any flow2spec skill. The file controls whether sub-agents and an additional verification step are used.

In plain words
What is it for?
It is for enforcing configuration checks, task-directory rules and verification responsibilities before f2s skills run.
Why use it?
It prevents the workflow from making decisions based on assumed configuration values.

Cursor rule for Cursor

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 rules/double-coding-lab/flow2spec/f2s-config-check
Clone the repo
git clone --depth 1 https://github.com/double-coding-lab/Flow2Spec

Made for: Cursor.

Per session 1,079 This file is loaded in full into every session.
When invoked 1,079 The same file — it is already loaded in full.
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.01079 $0.01079
Opus 5 $0.00540 $0.00540
Sonnet 5 $0.00216 $0.00216
Haiku 4.5 $0.00108 $0.00108

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

Security

Grade A, and why

f2s-config-check 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.

.cursor/rules/f2s-config-check.mdc · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 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/... 的简写

f2s 技能前置强制步骤

执行任何 f2s-* 技能的第一个动作,必须用 Read 工具读取项目根 flow2spec.config.json,获取 subAgentswitchAgentVerification 的实际值,再决定后续编排方式。

必须执行:Read("flow2spec.config.json")  ← 技能正文任何步骤之前
读取结果 行为
subAgent: true 先显式判断当前技能是否满足拆子前提 / 规模阈值;满足时按技能 SKILL.md 的 B/C 模式派子 agent,并在回复或执行记录中写明「本次是否拆子、拆给谁、为什么」;不满足时主 agent 继续完成,但也必须输出不拆原因
subAgent: false 全部在主 agent 内完成,不得拆子 agent
switchAgentVerification: true 子 agent 落盘的由主 agent 校验;主 agent 落盘的由子 agent 校验(须 subAgent=true 且已拆子任务)
switchAgentVerification: false 落盘侧自验,不交叉
文件不存在 所有字段均视为 false

Claude Codef2s-config-sessionSessionStart 注入一次配置摘要;f2s-config-injectPreToolUse 仅作为守门提示,提醒调用 f2s-* Skill 前首步必须 Read("flow2spec.config.json")。两者都不替代本条 Read 要求。

Cursor:配置读取仍走文本约束(本规则 alwaysApply),不依赖 hook 自动读取配置。

CodexSessionStart 会注入一次配置摘要;进入 f2s-* Skill 正文前仍必须 Read("flow2spec.config.json"),且当 subAgent=true 时,主 agent 必须先显式判断当前技能是否满足拆子前提 / 阈值,再决定是否派子;即使判断不拆,也必须输出不拆原因。Codex 没有 Claude 的 PreToolUse Skill 守门,不能把“拆子判断”留给隐式心证。

changeTracking(变更追踪)

字段 生效技能 行为
changeTracking.feat: true f2s-kb-feat 步骤 0 必须执行:创建或续作 .task/active/ 变更追踪任务
changeTracking.feat: false f2s-kb-feat 步骤 0 跳过,不创建 .task/ 目录
changeTracking.fix: true f2s-kb-fix 步骤 0 必须执行:创建或续作 .task/active/ 变更追踪任务
changeTracking.fix: false f2s-kb-fix 步骤 0 跳过,不创建 .task/ 目录
changeTracking.implement: true f2s-implement-tech-design 步骤 2.5 写入任务清单、步骤 2.6 随实现同步打钩 task.md、步骤 5 满足归档门禁后归档
changeTracking.implement: false f2s-implement-tech-design 步骤 2.5、2.6 和步骤 5 的变更追踪部分跳过

intentRecognition(意图识别)

字段 行为
intentRecognition: true 启用意图识别:高置信操作意图按 rules/f2s-intent-routing.* 自动进入对应 Skill;讨论 / 评估 / 低置信输入不得自动调用
intentRecognition: false 不启用自动分流;仅显式 $f2s-* / 明确要求执行某技能时进入对应 Skill
字段不存在 视为 false

Read the full file on GitHub · 51 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 · 51 lines · 1,079 tokens per session scan A a8b59b2501e8

Subscribe to this mod's changes

f2s-config-check is a cursor rule published in the GitHub repository double-coding-lab/Flow2Spec (47 stars, last pushed 4d ago), licensed MIT. It adds 1,079 tokens to every session, about $0.0054 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.