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 agentmods add skills/mh4gf/claude-code/write-code-commentsnpx skills add MH4GF/claude-code --skill write-code-commentsgit clone --depth 1 https://github.com/MH4GF/claude-codeWhat 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 | $0.00059 | $0.00753 |
| Opus 5 | $0.00030 | $0.00377 |
| Sonnet 5 | $0.00012 | $0.00151 |
| Haiku 4.5 | $0.00006 | $0.00075 |
Grade A, and why
write-code-comments 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.
What it actually says
ユーザー指示に従いコードコメントを記述する。comment-guard hook はマーカーファイルが存在する間だけコメント付き編集を許可するため、下記の手順を厳守する。
手順
1. マーカーを作成
最初に、空のマーカーファイルを Write ツールで作成する(カレントディレクトリ基準):
.claude/tmp/.comment-guard-allow
これが無いとコメント付き編集は hook にブロックされる。
2. コメントを記述
$ARGUMENTS の指示に従いコメントを書く。コメントは自己説明的なコードを補助するものであり、悪いコードの言い訳にしない。過度なコメントは可読性を下げるため、必要な箇所に絞る。
鮮度内 (30 分以内) のマーカー下で新規コメントを書くと、コメント本文だけが unslop で lint される。AI 文章クセ (例: 助詞二重・冗長な「することが可能」・prh 用語マッピング違反) を含むと hook が deny する。指摘が返ったらコメント本文を直してから再実行する。
書くべきコメント:
- なぜそう実装したか — 非自明な判断や理由付け
- コードを読んでも即座には分からない知見・前提・制約
- 複雑な箇所や落とし穴への警告
- 複数の実装案がある中で、その方法を選んだ設計判断の根拠
- モジュール・クラス・関数冒頭の、目的と全体動作の高レベルな概要
書くべきでないコメント:
- コードの動作をそのまま言い換える冗長なコメント
- 読めば分かる当たり前の説明
- タスク文脈・レビュー経緯・変更の経緯 — これらは git のコミットメッセージに書く
- 維持できず実態と食い違う恐れのある記述(古いコメントは誤解を招く)
その他:
- 指示された箇所以外にはコメントを足さない
- 既存コメントの体裁・言語(日本語/英語)に合わせる
- TODO は慎重に。残すなら具体的な内容を書く
3. マーカーを削除
作業が完了または中断したら、次のコマンドでマーカーを必ず削除する。
rm -f .claude/tmp/.comment-guard-allow
削除を忘れても 30 分で hook 側が失効扱いにするが、漏れを防ぐため明示的に削除すること。
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 First seen · 57 lines · 59 tokens per session scan A 35ab12486986
write-code-comments is a skill published in the GitHub repository MH4GF/claude-code (2 stars, last pushed 2d ago), licensed MIT. It adds 59 tokens to every session and 753 once invoked, about $0.0003 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.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
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…
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…
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…
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…
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…