comment

comment is a cursor rule for Cursor from leaperone/MultiPost-Extension. It costs 0 tokens per session (835 once invoked), scanned A, original, Apache-2.0.

Coding rules for writing useful comments in a codebase. They favor explaining why a decision exists over restating what the code does, and cover file, function, inline, and task comments.

In plain words
What is it for?
Use them when adding or reviewing comments, documenting functions and types, or writing TODO and FIXME notes in a project.
Why use it?
They reduce comments that become noise or drift away from the code. They give developers a consistent way to document decisions and follow-up work in English.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

About the project

MultiPost-Extension is a browser extension that publishes text, images, videos, and other content to multiple social media platforms from one operation. Content creators use it to distribute a single piece of content across supported platforms, and web applications or scripts can call its extension or REST APIs.

leaperone/MultiPost-Extension · 3,278 stars · on GitHub · multipost.app

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.

agentmods
npx agentmods add rules/leaperone/multipost-extension/comment
Clone the repo
git clone --depth 1 https://github.com/leaperone/MultiPost-Extension

Made for: Cursor.

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 comment

README.md
[![agentmods](https://agentmods.dev/badge/rules/leaperone/multipost-extension/comment.svg)](https://agentmods.dev/rules/leaperone/multipost-extension/comment)
Your own site
<a href="https://agentmods.dev/rules/leaperone/multipost-extension/comment"><img src="https://agentmods.dev/badge/rules/leaperone/multipost-extension/comment.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 835 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00000 $0.00835
Opus 5 $0.00000 $0.00417
Sonnet 5 $0.00000 $0.00167
Haiku 4.5 $0.00000 $0.00084

Measured yesterday against content hash eb8aa40d8dd5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

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

.cursor/rules/comment.mdc · 133 lines

How it starts

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

Code Commenting Guidelines

基本原则 Basic Principles

  • 注释应该解释为什么这样做,而不是做了什么
  • 代码即文档,仅在必要时添加注释
  • 使用清晰简洁的语言,避免冗余, English
  • 及时更新注释,确保与代码同步

文件头注释 File Header Comments

/**
 * @file 文件的简要描述
 * @description 详细描述文件的功能和用途
 * @author [作者名称]
 * @date YYYY-MM-DD
 */

函数注释 Function Comments

/**
 * 函数的简要描述
 * @description 详细描述函数的功能
 * @param {string} param1 - 参数1的描述
 * @param {number} param2 - 参数2的描述
 * @returns {Promise<boolean>} 返回值的描述
 * @throws {Error} 可能抛出的错误
 * @example
 * const result = await someFunction('test', 123);
 */
function someFunction(param1: string, param2: number): Promise<boolean> {
  // ...
}

行内注释 Inline Comments

// ✅ 好的注释:解释复杂的业务逻辑
if (user.role === 'admin' && !isHoliday) {
  // 管理员在非假日期间具有特殊权限
  grantSpecialAccess();
}

// ❌ 不好的注释:陈述显而易见的事实
// 检查用户是否为管理员
if (user.role === 'admin') {
  // ...
}

待办注释 TODO Comments

// TODO(github-username): 实现用户认证功能 (#123)
// FIXME(github-username): 修复内存泄漏问题 (#456)
// NOTE: 这里使用递归可能会导致性能问题

类型定义注释 Type Definition Comments

/**
 * 用户配置接口
 * @interface UserConfig
 * @property {string} name - 用户名
 * @property {number} age - 年龄
 * @property {string[]} permissions - 权限列表
 */
interface UserConfig {
  name: string;
  age: number;
  permissions: string[];
}

常量和枚举注释 Constants and Enum Comments

/**
 * 用户角色枚举
 * @enum {string}
 */
enum UserRole {
  /** 管理员用户 */
  ADMIN = 'admin',
  /** 普通用户 */
  USER = 'user',
  /** 访客用户 */
  GUEST = 'guest',
}

/** 最大重试次数 */
const MAX_RETRY_COUNT = 3;

弃用注释 Deprecation Comments

/**
 * @deprecated 从 v2.0.0 开始弃用,请使用 `newFunction()` 替代
 * @see {@link newFunction}
 */
function oldFunction() {
  // ...
}

区块注释 Section Comments

//===================================
// 初始化配置
//===================================

//===================================
// 工具函数
//===================================

//===================================
// 事件处理
//===================================

Read the full file on GitHub · 133 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. yesterday First seen · 133 lines · 835 tokens per session scan A eb8aa40d8dd5

Subscribe to this mod's changes

comment is a cursor rule published in the GitHub repository leaperone/MultiPost-Extension (3,278 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 835 tokens. 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-04.