Skip to content
Agentmart
Submit a tool

code-comment

コードから分からないことだけを書き、コードの言い換えや作業経緯を書かないためのコードコメントの原則。コードを書く・変更するときにコメントを付けるかどうかを判断するとき、「コメント書いて」「KDoc書いて」と依頼されたとき、コードレビューでソースコード中のコメントの要否を判断するときに必ず使う。

Skill by rmakiyama

IndexedMIT
Write a review

Chalk Labs

Need help deploying code-comment?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/rmakiyama-code-comment

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

コードから分からないことだけを書き、コードの言い換えや作業経緯を書かないためのコードコメントの原則。コードを書く・変更するときにコメントを付けるかどうかを判断するとき、「コメント書いて」「KDoc書いて」と依頼されたとき、コードレビューでソースコード中のコメントの要否を判断するときに必ず使う。

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/code-comment

What's inside

Skill name
code-comment
Description
コードから分からないことだけを書き、コードの言い換えや作業経緯を書かないためのコードコメントの原則。コードを書く・変更するときにコメントを付けるかどうかを判断するとき、「コメント書いて」「KDoc書いて」と依頼されたとき、コードレビューでソースコード中のコメントの要否を判断するときに必ず使う。
License
MIT
Instructions
47 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Code Comment

コメントは、コードから分からないことを読む人に伝えるために書く。

## 原則

- コードから分からないことだけを書く
  - コードを初めて見る人がコードだけを見てそのコメントを書けるなら、そのコメントは不要
- 読み手は言語とフレームワークを知っている前提で書く
  - 構文やAPIの一般的な意味は解説しない。書くのはこのコードベース固有の知識とドメイン知識
- コメントで補う前にコードを直す
  - 名前、関数の分割、型で表現できることはコードで表現する。悪い名前をコメントで説明しない
  - コメントが長くなる、または書きにくいときは、書く前に分割や命名の変更を試す
- コードと同じ抽象度のコメントは繰り返しになる
  - コードより低い抽象度で精度を足すか(単位、境界値、nullの意味、副作用)、高い抽象度で何を達成しようとしているかを足す
- 作業の経緯はコメントではなくコミットメッセージやIssueに書く
- コメントはコードと一緒に更新する
  - 間違ったコメントはコメントなしより悪い
- コメントの言語と形式は周囲のコードとプロジェクトのスタイルガイドに従う。無ければ言語公式の規約に従う

## 書くもの

- なぜそうしているか、なぜ別の方法でないか
  - 一見不要に見える処理や制約は、後から不要と判断されて削除されないよう理由を残す
- このコードが約束する契約と、変更する人が守る制約
  - 周囲の事情は、誰が呼ぶかではなく、このコードが何を守るかとして書く
- 利用者が実装を読まずに使う前提の型や関数には、シグネチャから分からない契約をドキュメンテーションコメントとして書く
  - 契約とは、振る舞い、引数の制約、戻り値、副作用、例外。実装の詳細は書かない
  - 可視性がpublicであることだけを理由に書かない。名前と型で契約が尽きているものに義務的に書かない
- TODO
  - 何が不足していて、何があれば解消できるかを書く

## 書かないもの

- コードの言い換え
- 手順の実況
  - 動作をなぞるコメント、番号付きステップ
- 作業経緯とメタ的な自己解説
  - 指示の出所、会話への参照、修正の経緯、「〜に対応」
  - 変更前との比較や成果の自己申告。「〜から〜に変更」「〜を使うように更新」「安全になった」。差分はdiffで分かる
  - 読み手への注釈。「実際のアプリでは〜」「ここでは簡略化」「必要に応じて〜」
- 周囲からの使われ方
  - 呼び出し元の名前、前後で走る処理。呼び出し元が変わればコメントは腐る
- コメントアウトされたコード
  - 履歴はgitにある

From rmakiyama/skills, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Sep 20, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from rmakiyama

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get code-comment running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying code-comment?

CallGet help
Cite this page

code-comment skill. Agent Mart. https://agentmart.dev/skills/rmakiyama-code-comment (last updated 2026-10-24)