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 skills add hmj1026/dhpk --skill git-smart-commitgit clone --depth 1 https://github.com/hmj1026/dhpkWrote 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.
[](https://agentmods.dev/skills/hmj1026/dhpk/git-smart-commit)<a href="https://agentmods.dev/skills/hmj1026/dhpk/git-smart-commit"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/git-smart-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.
<a href="https://agentmods.dev/skills/hmj1026/dhpk/git-smart-commit"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/git-smart-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00086 | $0.03023 |
| Opus 5.5 | $0.00034 | $0.01209 |
| Sonnet 5.5 | $0.00017 | $0.00605 |
| Haiku 4.5 | $0.00009 | $0.00302 |
Grade A, and why
git-smart-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 yesterday.
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 — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Smart Commit — 智慧拆分提交
將目前所有 staged / unstaged 變更,依功能邏輯分群後,逐批 git add + git commit。
When NOT to Use
- 只有單一檔案、單一目的且預期只需要 1 個 commit。
- 目前在 merge/rebase 衝突中,尚未完成衝突解決。
- 使用者要求「只生成一筆 commit」或「僅提供訊息模板」。
Public options and execution guard
--scope <path> limits collection; --type <type> forces the reviewed conventional type; --ai-co-author opts into the approved trailer. Before proposing or running commits, read rules/execution-policy.md, preserve its manual/automatic boundary, require code precommit success, and treat plans as unexecuted.
流程 — SSOT: rules/execution-policy.md owns commit/review safety; this skill owns grouping evidence
1. 收集摘要並閱讀相關變更
從 consumer 專案根目錄或子目錄執行唯讀收集器:
node "$SKILL_DIR/scripts/collect-changes.js" [--scope <path>]
$SKILL_DIR 是已安裝技能目錄。收集器原始碼見 scripts/collect-changes.js。--scope 是 repo-relative literal path;它限制檔案清單,但仍會回報範圍外的 staged 內容。收集器只讀取 Git 狀態與統計,不輸出 diff 或檔案內容,也不執行 hooks。
摘要提供 repoRoot、起始 head、files、safety 與 hooks;hook 資訊不代表已執行或通過。解讀欄位或處理收集失敗時,閱讀 collector contract。
若收集器不存在、退出非零、JSON 無效或輸出不完整,回報摘要未完成並停止提交流程,不推斷「沒有變更」或「沒有 hook」。若 files 沒有範圍內變更,先檢查 safety,尤其範圍外 staged;確認沒有待處理安全狀態後,再回報目前範圍無需提交。
摘要只用來選出待檢查的功能群。將 shell 工作目錄切換到輸出中的 repoRoot,再逐路徑閱讀該群的 staged 與 unstaged diff;新增的未追蹤檔案要閱讀檔案內容。使用 literal pathspec,rename 要同時檢查新舊路徑:
git --literal-pathspecs diff -- <path>
git --literal-pathspecs diff --cached -- <path>
逐組檢查並控制輸出量,不先讀取整個 worktree 的完整 diff。收集器會拒絕前後觀察到的 HEAD、status 或行數統計變動,但摘要不是原子快照,也不能證明內容未變。若來源在檢查期間改變,重新收集摘要、檢查受影響內容並重擬計畫;提交前仍須核對實際 staged diff。
2. 分析並分群
依變更意圖、功能關聯和依賴關係分組。目錄可協助定位,不能單獨決定 commit 邊界;同一功能跨 Controller、Service、Model、View、測試或文件時,應一起評估。
分群規則
- 同一功能的 Domain 與 Infrastructure 實作,以及對應測試,通常放在同一組。
- MVC 功能可將相關的
Controller、Model、View和測試放在同一組。 - Migration 僅在能獨立理解和驗證時拆成單獨 commit;必要的程式相依不得拆散。
- 少量變更依實際關聯併入最相關的功能群,不以檔案數量或路徑強行合併。
- 新增功能使用
feat;修正或重構使用fix/refactor/style;刪除或環境設定使用chore;文件更新使用docs。
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- yesterday Changed · +8 lines 27914fb053a1
- 2d ago Changed · -1 lines 0db779db1995
- 23d ago First seen · 190 lines · 86 tokens per session scan A d8e9eed8596b
git-smart-commit is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 86 tokens to every session and 3,023 once invoked, about $0.0003 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-09-24.
Other skills, from other repositories
avatar-contribution-pr
Turn an avatar GitHub issue (from the in-app avatar-editor easter egg) into a merged sprite — validate the art, then either add a new module or replace an existing one, and open a PR that closes the issue. Handles both "Avatar contribution: " (a brand-new sprite) and "Avatar edit: " (a hand-redraw of an existing…
precommit
Pre-commit checks — lint:fix -> build -> test.
release
Bump a plugin's version, write a detailed changelog entry for the upgrade skill to consume, and commit+push. Takes a plugin slug argument identifying which plugin under plugins/ to release. Use this skill whenever the user says "release", "version bump", "cut a release", "changelog and push", or finishes a set of…
unslop-commit
Rewrites commit messages so they sound like a careful human engineer wrote them. Strips AI/marketing slop ("comprehensive solution", "robust implementation", "leverage", "enhance", "seamlessly", "This commit..."). Keeps Conventional Commits format. Subject ≤72 chars (aim ≤50), imperative mood. Body only when "why"…
commit
Changelog and commit — lightweight motion for day-to-day plugin dev work in the monorepo. One commit per plugin scope; CHANGELOG and staging routed by detected slug. Trigger when the user says "commit", "commit this", "save this", "wrap this up", "let's commit", or finishes a change and wants to capture it. NOT for…
commit
Analyze git diffs or staged changes and generate conventional commit messages that explain WHY a change was made. Supports auto-detecting type and scope, intelligent file staging, and interactive overrides. Use when asked to "write a commit message", "generate a commit", "describe my changes", "commit this"…