f2s-git-commit

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 CodeCodex

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 skills/double-coding-lab/flow2spec/f2s-git-commit
Any agent
npx skills add double-coding-lab/Flow2Spec --skill f2s-git-commit
Clone the repo
git clone --depth 1 https://github.com/double-coding-lab/Flow2Spec

Made for: Claude Code, Codex.

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. 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.00149 $0.04166
Opus 5 $0.00075 $0.02083
Sonnet 5 $0.00030 $0.00833
Haiku 4.5 $0.00015 $0.00417

Measured 2d ago against content hash ab0cc4ded0a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

.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. 2d 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 (47 stars, last pushed 4d ago), licensed MIT. It adds 149 tokens to every session and 4,166 once invoked, about $0.0007 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens