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.
npx agentmods add rules/double-coding-lab/flow2spec/f2s-flow2spec-unified-entrygit clone --depth 1 https://github.com/double-coding-lab/Flow2SpecWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.04366 | $0.04366 |
| Opus 5 | $0.02183 | $0.02183 |
| Sonnet 5 | $0.00873 | $0.00873 |
| Haiku 4.5 | $0.00437 | $0.00437 |
Grade A, and why
f2s-flow2spec-unified-entry 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.
How it starts
The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Flow2Spec 统一入口规则
本项目知识库已统一到 .Knowledge/,请按以下顺序读取,避免无范围检索。
项目根 CLI 开关(必须按需读取)
业务仓库项目根 flow2spec.config.json(flow2spec init 在文件缺失时补齐)含布尔字段 subAgent、switchAgentVerification(切换 agent 校验),默认 false。执行任意 f2s-* 技能或与 Flow2Spec 初始化相关的说明前,须读取该文件;技能或规则中凡写「仅当 subAgent / switchAgentVerification 为 true」的步骤,必须按文件实际值决定是否执行;缺失字段或文件不存在时均视为 false。
init与择路:flow2spec init会把统一入口写入当前仓库;Cursor / Claude 读取配置根rules/f2s-flow2spec-unified-entry.*,Codex 读取.codex/topics/f2s-flow2spec-unified-entry.md。两处正文同源,按当前工具读取对应入口即可;技能引「统一入口」时,在 Codex 以.codex/topics/f2s-flow2spec-unified-entry.md为准。
两字段语义(模板约定)
subAgent:f2s-*技能若规定某步骤「用子 agent 执行」,则true时按技能使用子 agent,false时在主 agent 内完成。用户可在对话中要求「仅当本项为true时,由主 agent 动态判断哪些子任务适合交给子 agent」——仅当配置为true时该要求有效;配置为false时凡依赖拆子 agent 的该段说明不生效,全部在主 agent 完成。subAgent=true时,主 agent 必须在技能正文前段显式判断本次是否拆子;即使判断不拆,也必须输出不拆原因。各f2s-*在工作哪一阶段必须或建议使用子 agent 由技能正文逐步约定;技能未写明时不默认拆子。switchAgentVerification(切换 agent 校验):落盘或变更后的验证/复核(对照清单、diff、自检)不是「一律在主 agent」;默认以落盘侧所在 agent 为「当前 agent」,在该会话内完成校验(子 agent 落盘的就在子 agent 内验,主 agent 落盘的就在主 agent 内验)。仅当① 配置switchAgentVerification为true,且 ② 当前f2s-*技能正文对该步骤明确写出「当switchAgentVerification为true」时,才启用交叉校验:子 agent 落盘的 → 由主 agent 校验;主 agent 落盘的 → 由子 agent 校验(须已存在子 agent 会话,即subAgent为true且实际拆出子任务;若subAgent为false,无子侧可承接,「主落盘→子验」不发生,校验全部在主 agent 内完成)。配置为false、或技能未写依赖本项、或用户仅泛泛要求「给对方验」的:不启用交叉,仍在落盘侧 agent内完成验证。
Git worktree 与子任务工作目录卫生(subAgent: true 或并行子任务时必读)
部分环境会为子 agent / 并行尝试创建 独立 git worktree 或等价隔离目录。规则如下:
- 谁创建谁收尾:子侧创建则子侧在返回前尽量清理;若子会话已结束无法清理,主 agent 合并结果后必须执行清理,禁止依赖「稍后自动回收」。
- 收尾动作(必须):对仅为本次子任务添加的 worktree,在合并或丢弃该子任务结果后执行
git worktree remove <path>(工作区干净仍失败时再用git worktree remove --force <path>,须确认该路径无他人未提交修改);随后git worktree list自检,禁止留下已知孤儿路径。 - 中断 / 用户换题前:若本会话曾添加 worktree,在结束前必须完成上述移除或在
task.md「## 备注」写明残留路径与删除命令,并视情况写入user-todos.md请用户本地执行(见f2s-task)。 - 禁止:子任务已结束、主分支已继续开发,仍长期保留仅用于尝试的 worktree 目录(易造成混淆提交、磁盘堆积)。
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.
- 2d ago First seen · 118 lines · 4,366 tokens per session scan A 3738c4d9a6f0
f2s-flow2spec-unified-entry is a cursor rule published in the GitHub repository double-coding-lab/Flow2Spec (47 stars, last pushed 5d ago), licensed MIT. It adds 4,366 tokens to every session, about $0.0218 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.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.