git-precommit

git-precommit is a skill for Claude Code, Codex from u9401066/template-is-all-you-need. It costs 92 tokens per session (1,633 once invoked), scanned A, original, Apache-2.0.

A pre-commit workflow that coordinates updates to project memory, documentation, changelogs, roadmaps, architecture notes, and commit messages before code is saved to Git.

In plain words
What is it for?
It is for reviewing changed files, updating relevant project documents, checking structural changes, and generating Conventional Commits messages before committing or pushing.
Why use it?
It helps keep project records aligned with code changes and prepares commits in a consistent format.

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/u9401066/template-is-all-you-need/git-precommit
Any agent
npx skills add u9401066/template-is-all-you-need --skill git-precommit
Clone the repo
git clone --depth 1 https://github.com/u9401066/template-is-all-you-need

Made for: Claude Code, Codex.

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 git-precommit

README.md
[![agentmods](https://agentmods.dev/badge/skills/u9401066/template-is-all-you-need/git-precommit.svg)](https://agentmods.dev/skills/u9401066/template-is-all-you-need/git-precommit)
Your own site
<a href="https://agentmods.dev/skills/u9401066/template-is-all-you-need/git-precommit"><img src="https://agentmods.dev/badge/skills/u9401066/template-is-all-you-need/git-precommit.svg" alt="Measured on agentmods" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,633 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.00092 $0.01633
Opus 5 $0.00046 $0.00816
Sonnet 5 $0.00018 $0.00327
Haiku 4.5 $0.00009 $0.00163

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

Security

Grade A, and why

git-precommit 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 4d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/skills/git-precommit/SKILL.md · 246 lines

How it starts

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

Git 提交前工作流(編排器)

描述

協調多個 Skills 完成 Git 提交前的所有準備工作。這是一個「編排器」Skill,負責調用其他 Skills。

觸發條件

  • 「準備 commit」「GIT」「gc」
  • 「要提交了」「git commit」
  • 「推送」「push」

法規依據

  • 憲法:CONSTITUTION.md 第三章
  • 子法:.github/bylaws/git-workflow.md

🔧 操作步驟(編排流程)

Step 1: 收集變更資訊

git status --short
git diff --name-only --cached

使用工具:

get_changed_files()  # 取得變更清單

Step 2: 執行 memory-updater(必要)

呼叫條件:永遠執行

調用 memory-updater skill:
- 更新 activeContext.md(當前焦點)
- 更新 progress.md(移動 Done/Doing)

Step 3: 執行 readme-updater(條件)

呼叫條件

  • 新增功能(src/ 有新檔案)
  • 依賴變更(pyproject.toml/package.json 變更)
  • API 變更
若需要,調用 readme-updater skill

Step 4: 執行 changelog-updater(條件)

呼叫條件

  • 有功能性變更(非純文檔)
  • 有 bug 修復
  • 有安全性修補
若需要,調用 changelog-updater skill

Step 5: 執行 roadmap-updater(條件)

呼叫條件

  • 完成了 ROADMAP 中列出的功能
若需要,調用 roadmap-updater skill

Step 6: 架構文檔檢查(條件)

呼叫條件

  • 有結構性變更(新增 domain/application 層)
若需要,更新 memory-bank/architect.md

Step 7: 生成 Commit Message

依據 Conventional Commits 格式:

<type>(<scope>): <description>

[optional body]

[optional footer(s)]

類型對照

變更內容 type
新功能 feat
Bug 修復 fix
文檔 docs
重構 refactor
測試 test
建構/CI chore

Step 8: 執行 Git 命令

# 檢查狀態
git status

# Stage 變更
git add .

# 提交
git commit -m "feat(auth): 新增用戶認證模組"

# 推送(如果用戶確認)
git push origin main

📊 流程圖

┌─────────────────────────────────────────────────┐
│          Git Pre-Commit Orchestrator            │
├─────────────────────────────────────────────────┤
│  Step 1: 收集變更    [分析] get_changed_files   │
│  Step 2: memory-sync [必要] Memory Bank 同步    │
│  Step 3: readme      [條件] README 更新         │
│  Step 4: changelog   [條件] CHANGELOG 更新      │
│  Step 5: roadmap     [條件] ROADMAP 更新        │
│  Step 6: architect   [條件] 架構文檔檢查        │
│  Step 7: message     [生成] Commit Message      │
│  Step 8: commit      [執行] git add/commit/push │
└─────────────────────────────────────────────────┘

Read the full file on GitHub · 246 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. 4d ago First seen · 246 lines · 0 tokens per session scan A df55882ce3bf

Subscribe to this mod's changes

git-precommit is a skill published in the GitHub repository u9401066/template-is-all-you-need (3 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 92 tokens to every session and 1,633 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

setup-husky-dotnet

Use when configuring Git hooks in .NET projects before team commits occur, to enforce commit message standards and code formatting automatically.

SebastienDegodez/copilot-instructions · 30 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-obsidian-claude-gradient

OpenDesign's enterprise AI-adoption brief: local-first agents at work, the risk controls, the ROI, and the rollout plan. Built as a decision-grade AI literacy deck for leadership, IT, security.

nexu-io/open-design · 53 tokens

html-ppt-tech-sharing

OpenDesign internals: how the agent stream, sandbox, and artifacts work — an engineering deep-dive talk. Built as a decision-grade AI literacy deck for engineers, dev community.

nexu-io/open-design · 43 tokens

git-commit

Generate conventional commit messages for Java projects. Use when user says "commit", "create commit", "commit changes", or after completing code changes that need to be committed.

decebals/claude-code-java · 38 tokens

close-task-commit-push-pr

Close the active backlog task (detected from branch name), commit all changes, push to remote, and open a pull request. Use when the user says "close task and ship it", "close task commit push pr", or invokes /close-task-commit-push-pr.

devoxx/DevoxxGenieIDEAPlugin · 64 tokens