med-paper-assistant: Skill for Claude Code

.claude/skills/git-precommit/SKILL.md

git-precommit is a skill for Claude Code from u9401066/med-paper-assistant. It costs 63 tokens per session (1,892 once invoked), scanned B, original, Apache-2.0.

A pre-commit workflow for checking code and research-project changes before creating a Git commit. A Git commit is a saved set of project changes, and a pre-commit check runs just before that save.

In plain words
What is it for?
Use it when committing, submitting, or finishing work. It checks documentation, architecture, project integrity, paper-related files, workspace state, and Git status, while reporting issues instead of automatically changing files.
Why use it?
It reminds developers to synchronize project memory, update relevant documentation, inspect structural changes, and check whether work is committed and pushed.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions AGENTS.md.

This is u9401066/med-paper-assistant's own configuration. It tells Claude Code how to work on med-paper-assistant 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 med-paper-assistant configures →

Reuse

Borrowing it

Nothing to install: this file belongs to u9401066/med-paper-assistant. 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/u9401066/med-paper-assistant/master/.claude/skills/git-precommit/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/u9401066/med-paper-assistant

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/u9401066/med-paper-assistant/git-precommit/github.svg)](https://agentmods.dev/skills/u9401066/med-paper-assistant/git-precommit)
Your own site
<a href="https://agentmods.dev/skills/u9401066/med-paper-assistant/git-precommit"><img src="https://agentmods.dev/badge/skills/u9401066/med-paper-assistant/git-precommit/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 git-precommit

Your own site · 80×15
<a href="https://agentmods.dev/skills/u9401066/med-paper-assistant/git-precommit"><img src="https://agentmods.dev/badge/skills/u9401066/med-paper-assistant/git-precommit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,892 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00063 $0.01892
Opus 5.5 $0.00025 $0.00757
Sonnet 5.5 $0.00013 $0.00378
Haiku 4.5 $0.00006 $0.00189

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

Security

Grade B, and why

git-precommit scanned grade B with 1 finding 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.

Enumerates other installed skillsmediumAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

| G6.2 | Skill 數量 | `ls -d .claude/skills/*/` vs AGENTS.md | ⚠️ WARN |
.claude/skills/git-precommit/SKILL.md · 122 lines

How it starts

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

Git 提交前工作流(編排器 + Pre-Commit Hooks)

Copilot Hooks(寫作時即時修正)定義於 auto-paper/SKILL.md。 Pre-Commit Hooks(本檔,git commit 前最終把關)只報告不自動修改。

觸發:「commit」「推送」「做完了」「收工」「快速 commit」


Step 0: 偵測變更範圍

get_changed_files() 或 git diff --cached --name-only。 論文檔案模式:projects/*/drafts/*, projects/*/concept.md, projects/*/references/*, projects/*/.memory/* → 匹配時觸發 Paper Hooks。


通用 Hooks(每次觸發)

Hook 條件 動作 MCP Tools
G1 memory-sync 必要 更新 Memory Bank + workspace state memory_bank_update_progress, workspace_state_action(action="sync")
G2 readme-update 新功能/API 變更 更新 README read_file, replace_string_in_file
G3 changelog-update 版本/重要修改 更新 CHANGELOG 同上
G4 roadmap-update 里程碑完成 更新 ROADMAP 同上
G5 arch-check 結構性變更 檢查架構文檔 grep_search, list_dir
G6 project-integrity SKILL/AGENTS/src 變更 專案一致性審計 見下方
G7 vsx-integrity skills/prompts/vsx 變更 VSX Extension 同步 見下方
G8 doc-update-reminder 任何程式/設定變更 提醒需更新的文檔 scripts/check-doc-updates.py (pre-commit hook)
G9 git-status-check 必要 偵測未 commit/未 push(Code-Enforced) run_quality_checks(action="writing_hooks", hooks="G9")

Read the full file on GitHub · 122 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 · 122 lines · 63 tokens per session scan B 1c5227ddc1fa

Subscribe to this mod's changes

git-precommit is a skill published in the GitHub repository u9401066/med-paper-assistant (12 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 63 tokens to every session and 1,892 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (enumerates other installed skills). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.