compress-code-comments

compress-code-comments is a skill for Claude Code, Codex from devemberx/mcp-server-polarion. It costs 0 tokens per session (1,837 once invoked), scanned A, original, MIT.

A procedure for shortening verbose comments and developer docstrings in Python files. It keeps explanations of why code exists and removes repeated descriptions of what the code already shows.

In plain words
What is it for?
Use it to tidy Python comments and docstrings, especially when they explain code unnecessarily or contain too much narration.
Why use it?
Overly detailed comments take time to read and can become inaccurate when code changes. The procedure limits edits to comments and docstrings so program behavior stays unchanged.

Skill for Claude CodeCodex

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 skills/devemberx/mcp-server-polarion/compress-code-comments
Any agent
npx skills add devemberx/mcp-server-polarion --skill compress-code-comments
Clone the repo
git clone --depth 1 https://github.com/devemberx/mcp-server-polarion

Made for: Claude Code, 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 compress-code-comments

README.md
[![agentmods](https://agentmods.dev/badge/skills/devemberx/mcp-server-polarion/compress-code-comments.svg)](https://agentmods.dev/skills/devemberx/mcp-server-polarion/compress-code-comments)
Your own site
<a href="https://agentmods.dev/skills/devemberx/mcp-server-polarion/compress-code-comments"><img src="https://agentmods.dev/badge/skills/devemberx/mcp-server-polarion/compress-code-comments.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,837 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 $0.00000 $0.01837
Opus 5 $0.00000 $0.00919
Sonnet 5 $0.00000 $0.00367
Haiku 4.5 $0.00000 $0.00184

Measured 5d ago against content hash a0397a55b1f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

compress-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 5d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (evals/files/case1_client.py, evals/files/case2_tool.py, evals/files/case3_payload.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/compress-code-comments/SKILL.md · 80 lines

How it starts

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

name: compress-code-comments description: Compress verbose developer code comments and dev docstrings in .py files, Google-style — keep why, drop what, one line per point; gated on comment-only AST diff. Use when asked to tidy/shrink/clean up code comments, cut comment verbosity, or trim over-explained docstrings. NOT for @mcp.tool docstrings or Field(description=...) (LLM-facing — use shrink-mcp-tool-docs). Triggers on /compress-code-comments.

Self-Documenting Code: Comment Compression

Over-commenting costs: every "what" comment needs re-sync on each code edit (or rots into lie), narration drags reading. Goal: raise information density of developer-facing comments across codebase. Verbose narration → tight "why"-first lines. Redundant "what" comments → deleted. Code keeps doing same — only comments and dev docstrings change.

Work one file at a time, report what cut and why. Diff must be comment-only: no executable line moves, no string literal changes, no behavior change. Gate below proves it.

Boundary vs shrink-mcp-tool-docs (read first)

This skill and shrink-mcp-tool-docs edit different surfaces. Don't cross line:

Surface Owner This skill
# comments (inline + standalone) compress-code-comments edit
Module / class docstrings compress-code-comments edit
Private/helper function docstrings (e.g. _build_*_payload) compress-code-comments edit
@mcp.tool function docstrings shrink-mcp-tool-docs skip — never touch
Field(description=...) strings shrink-mcp-tool-docs skip — never touch

Function decorated @mcp.tool ships whole docstring to client LLM; that text eval-gated by other skill. Leave byte-for-byte unchanged. Same for every Field(description=...). Can still tidy # comments inside the body of an @mcp.tool function — just not its docstring.

Scope

Every .py file in repo except .venv/ and other vendored trees: src/, tests/, evals/, .github/scripts/, .claude/hooks/, scripts/. CLAUDE.md and other *.md out of scope (this skill code comments only).

Read the full file on GitHub · 80 lines

Files

What ships with it

6 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. 5d ago First seen · 80 lines · 0 tokens per session scan A a0397a55b1f0

Subscribe to this mod's changes

compress-code-comments is a skill published in the GitHub repository devemberx/mcp-server-polarion (12 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,837 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-08-30.

Related

Other skills, from other repositories

investigate-issue

Investigate a GitHub issue by fetching details, analyzing the codebase, researching documentation, and presenting an actionable implementation plan with test guidance. Use when asked to investigate, analyze, triage, or plan work for a GitHub issue. Invoked with /investigate-issue or /investigate-issue (prompts for ID).

maximhq/bifrost · 78 tokens

resolve-pr-comments-stack

Resolve unresolved PR review comments across an entire Graphite (gt) stack of many PRs, bottom-up, in one working directory. Use when asked to "go through this stack and resolve comments", "clean up review comments across the whole stack", or given a list/range of PR numbers that form (or partially form) a gt stack.…

maximhq/bifrost · 99 tokens

resolve-pr-comments

Skill "resolve-pr-comments" from maximhq/bifrost, covering resolve pr comments, usage, workflow overview, step 1: detect repository and step 2: fetch unresolved comments (graphql).

maximhq/bifrost · 0 tokens

harness-test-writer

Add regression test cases to the Bifrost provider harness (the Postman collection run via make run-provider-harness-test) based on a merged PR or a GitHub issue. Fetches the PR/issue, traces the affected wire path in the codebase, checks existing harness coverage, designs cases following harness conventions, inserts…

maximhq/bifrost · 133 tokens

review-pr

Reviews a PR or diff with multi-angle finders and adversarial verification, then reports a findings table, a merge/no-merge recommendation, required followups, and offers to create a follow-up PR. Use when the user types /review-pr [PR# | branch | path].

maximhq/bifrost · 60 tokens

surf

Use when the user wants crypto data — token prices, on-chain SQL, prediction-market positions, CEX order books, wallet labels/net-worth, social mindshare, news, or unified search. 83 endpoints across exchange, on-chain, wallet, social, prediction, news and search — one API, flat $0.0085/call in USDC via x402. Settles…

BlockRunAI/blockrun-mcp · 92 tokens