Flow2Spec: Skill for Claude Code

.claude/skills/f2s-git-commit/SKILL.md

f2s-git-commit is a skill for Claude Code from double-coding-lab/Flow2Spec. It costs 149 tokens per session (4,166 once invoked), scanned A, original, MIT.

A Git commit workflow that checks changes, optionally checks related knowledge-base coverage, creates a commit message, and commits selected files.

In plain words
What is it for?
Use it after coding to inspect the diff, check for conflicts and documentation coverage when required, stage exact files, and create a commit without pushing.
Why use it?
It gives commits a repeatable review process and avoids accidentally adding every file or skipping Git hooks. It can also use a shorter path when the user explicitly requests a quick commit.

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-git-commit/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-git-commit

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/double-coding-lab/flow2spec/f2s-git-commit"><img src="https://agentmods.dev/badge/skills/double-coding-lab/flow2spec/f2s-git-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,166 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.00149 $0.04166
Opus 5.5 $0.00060 $0.01666
Sonnet 5.5 $0.00030 $0.00833
Haiku 4.5 $0.00015 $0.00417

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

Security

Grade A, and why

f2s-git-commit 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-git-commit/SKILL.md · 252 lines

How it starts

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

执行口径:本技能代用户执行 git 操作;不使用 git add -A / git add .,不跳过 hooks(--no-verify),不自动 push。git pull / git fetch 合并入本地前必须取得用户对「拉取」的明确确认;git commit 不要求单独一轮「确认」交互(见步骤 3–4)。用户明确要求“快捷提交”时,仅跳过步骤 2 知识库覆盖检查,其余安全步骤照常执行。

编排(主 / 子 agent)

  • subAgent / switchAgentVerification 语义以统一入口为唯一事实源:Cursor/Claude 读配置根 rules/f2s-flow2spec-unified-entry.*;Codex 读 .codex/topics/f2s-flow2spec-unified-entry.md。
  • 本技能全程在主 agent 完成(pull 的确认不可下放子 agent;git commit 不要求单独一轮用户确认,见步骤 3–4)。

f2s-git-commit(提交代码)

强制流程

快捷提交模式

当用户本轮明确说出 “快捷提交”、“快速提交” 或 “quick commit” 时,进入快捷提交模式:

  • 跳过 步骤 2:知识库覆盖检查,不读取 .Knowledge/topics/ / .Knowledge/stock-docs/ 做覆盖判断。
  • 不提示用户先运行 f2s-kb-sync / f2s-kb-feat。
  • 不跳过步骤 1 的变更读取与冲突标记检查。
  • 不跳过步骤 3 的提交信息生成与展示。
  • 不跳过步骤 4 的精确 git add <文件列表>、正常 git commit 与 git hooks。
  • 不得因快捷提交使用 git add -A / git add . / --no-verify / 自动 push。

步骤 1:读取变更(只读)

git status --short
git diff HEAD
  • 从 git status --short 区分三类文件:
    • Staged:已 git add,前缀为 M 、A 、D (首列非空)
    • Unstaged:已追踪但未 add,前缀为 M、 D(次列非空)
    • Untracked:?? 前缀,新文件尚未追踪
  • 若三类均为空(nothing to commit),直接告知用户并结束。

冲突检查(必须,先于一切):

扫描所有变更文件内容,若任意文件包含 <<<<<<<、=======、>>>>>>> 冲突标记,立即终止并提示:

❌ 检测到未解决的 merge conflict:
  - <文件路径>

请先解决冲突后再提交。

步骤 2:知识库覆盖检查(默认必须;三种情况可跳过)

若处于快捷提交模式,本步骤直接跳过,并在步骤 5 收尾提示中说明“已按快捷提交跳过知识库覆盖检查”。

先判断 .Knowledge/ 是否存在:

  • 若 .Knowledge/manifest-routing.json 不存在:跳过本步骤,在步骤 5 收尾提示「项目尚未初始化 Flow2Spec 知识库,建议运行 flow2spec init」,继续步骤 3。

跳过判定 A:改动纯文档 / 知识库自身(进入覆盖检查前先判定)

若步骤 1 收集到的 pending 文件路径全部命中以下模式,直接跳过本步骤(在步骤 5 说明「本次改动纯文档,已跳过覆盖检查」):

  • .Knowledge/**(改的就是知识库自己,检自己无意义)
  • docs/** / docs/en/**
  • README*.md / LICENSE / CHANGELOG*
  • .claude/** / .cursor/** / .codex/**(agent 配置根,由 flow2spec init 分发,与业务能力覆盖无关)
  • presentations/** / assets/** / 其他纯静态资源

任一文件落在 src/ / lib/ / cli.js / templates/ / 业务代码目录时,本捷径不生效,继续走覆盖检查。

跳过判定 B:近期已同步过知识库

Read the full file on GitHub · 252 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 First seen · 252 lines · 149 tokens per session scan A ab0cc4ded0a5

Subscribe to this mod's changes

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