code-comments-vp

code-comments-vp is a skill for Codex from VectorPeak/vectorpeak-agent-skills. It costs 115 tokens per session (1,302 once invoked), scanned A, original, Apache-2.0.

A guide for writing and reviewing code comments and docstrings, the notes developers place beside code to explain it.

In plain words
What is it for?
Use it to add, rewrite, review, or standardize comments and documentation in an existing codebase.
Why use it?
It helps comments explain responsibilities, design reasons, side effects, and fallback behavior instead of merely repeating the code.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to add, rewrite, review, or standardize comments and documentation in an existing codebase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vectorpeak/vectorpeak-agent-skills/code-comments-vp
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.

Any agent
npx skills add VectorPeak/vectorpeak-agent-skills --skill code-comments-vp
Clone the repo
git clone --depth 1 https://github.com/VectorPeak/vectorpeak-agent-skills

Made for: 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 code-comments-vp

README.md
[![agentmods](https://agentmods.dev/badge/skills/vectorpeak/vectorpeak-agent-skills/code-comments-vp/github.svg)](https://agentmods.dev/skills/vectorpeak/vectorpeak-agent-skills/code-comments-vp)
Your own site
<a href="https://agentmods.dev/skills/vectorpeak/vectorpeak-agent-skills/code-comments-vp"><img src="https://agentmods.dev/badge/skills/vectorpeak/vectorpeak-agent-skills/code-comments-vp/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 code-comments-vp

Your own site · 80×15
<a href="https://agentmods.dev/skills/vectorpeak/vectorpeak-agent-skills/code-comments-vp"><img src="https://agentmods.dev/badge/skills/vectorpeak/vectorpeak-agent-skills/code-comments-vp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,302 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00115 $0.01302
Opus 5.5 $0.00046 $0.00521
Sonnet 5.5 $0.00023 $0.00260
Haiku 4.5 $0.00012 $0.00130

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

Security

Grade A, and why

code-comments-vp 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 2mo 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.

dev-skills/code-comments-vp/SKILL.md · 167 lines

How it starts

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

Code Comments VP

Goal

Write maintainable comments that explain responsibility, execution flow, boundaries, side effects, fallback behavior, and design reasons.

Golden rule:

优先解释“为什么这样写”和“这段代码在链路中承担什么责任”,少解释“这行代码语法上做了什么”。

Mode Selection

Choose one mode before editing:

  • coarse: Add or improve comments for a file, module, class, or function. This is the default.
  • fine: Add detailed block comments because the user asks for细粒度/逐段/逐行 comments, or the code contains complex branching, async/concurrency, cache, fallback, state mutation, external calls, security checks, performance-sensitive logic, or business rule priority.
  • review: Review whether comments are sufficient. Lead with findings and suggestions before changing anything.
  • rewrite: Existing comments are inaccurate, noisy, inconsistent, or too shallow. Preserve correct meaning and rewrite in this style.
  • style-transfer: The user points to an example file. First extract the comment style, then apply it to the target code.

Default Style

Default to coarse-grained comments. Prefer module docstrings, class docstrings, and function docstrings before inline comments.

Use Chinese comments by default when the user uses Chinese or the surrounding project comments are Chinese.

Use these section labels when useful:

  • 执行流程:
  • 参数:
  • 返回:
  • Yields:
  • 异常:
  • 说明:
  • 字段说明:
  • 规则说明:
  • 兜底策略:

Read references/comment-patterns.md when adding or rewriting more than one docstring, when the user asks for a reusable style, or when fallback/import-level comments are involved.

Coarse-Grained Template

Use this module docstring for most Python files:

"""模块职责一句话。

说明这个文件处在哪一层、接收什么输入、调用哪些下游能力、产出什么结果。
如果是 API / service / pipeline / adapter / config 文件,说明它的边界职责。
"""

Use this function docstring for important functions:

def some_function(...):
    """一句话说明这个函数在业务链路中的作用。

    执行流程:
    1. ...
    2. ...
    3. ...

    参数:
        xxx: 来源、含义、影响范围。

    返回:
        xxx: 返回内容和关键字段含义。

    异常:
        xxx: 什么时候抛出,调用方应如何理解。
    """

Read the full file on GitHub · 167 lines

Files

What ships with it

3 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.

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. 2mo ago First seen · 167 lines · 115 tokens per session scan A b113a39bbf9c

Subscribe to this mod's changes

code-comments-vp is a skill published in the GitHub repository VectorPeak/vectorpeak-agent-skills (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 115 tokens to every session and 1,302 once invoked, about $0.0005 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-08-31.

Related

Other skills, from other repositories

OpenSourceManagement

Triages open issues, pull requests and GitHub Discussions across the principal's own open-source repos (the list in Config.md) via the gh CLI, ranks what needs attention with suggested replies, posts edit-in-place marker comments, diffs new Ollama library models against a local model box, and takes a private repo…

danielmiessler/LifeOS · 212 tokens

Simplify

Research-first simplification of any file, skill, tool, subsystem or codebase against its ideal state: reads its ISA or derives its purpose, maps every dependent (callers, imports, references, hooks, settings, docs, tests), classifies each element with evidence as load-bearing, duplicate, dead, cruft or…

danielmiessler/LifeOS · 196 tokens

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.

shinpr/claude-code-workflows · 29 tokens

output-eval-error-analysis

Systematically review workflow traces to identify failure modes before building evaluators. Use when starting an eval project, after significant pipeline changes, or when production quality drops.

growthxai/output · 38 tokens

pr-description-writer

Redacta una descripción de pull request clara y estructurada a partir de un diff de git, resumen de rama o lista de commits. Úsalo cuando te pidan escribir una descripción de PR, redactar una solicitud de cambios o documentar cambios de código. Produce una descripción con resumen, motivación, cambios realizados, pasos…

mohitagw15856/pm-claude-skills · 80 tokens

idea-team

A structured group discussion for exploring a product idea through three roles: researcher, critic, and analogy finder. The roles look for evidence, weaknesses, and useful comparisons.

majiayu000/spellbook · 182 tokens