Works with the AI Agents you already use
Clean Comments: Token Conservation
Eliminates token-wasting inline comments, strips narrative code noise, and migrates public API documentation to clean JSDocs with guaranteed 100% behavioral invariance.
$9
Clean Comments: Token Conservation
Example session with this skill installed
Audit src/services/billing.ts, remove useless inline comments to conserve LLM tokens, and add JSDocs for exported functions while preserving exact behavior.
- Read your context and instructions
- Compiled the clean comments
Summary of Comment Cleanup
- Target:
src/services/billing.ts - Audit Findings: 14 inline
//comments identified wasting ~68 LLM tokens per file read. - Actions Taken:
- Removed 12 trivial step narrators (
// 1. Calculate discount,// Loop through items). - Removed 2 trailing comments on object property initializers.
- Added 2 JSDoc contracts documenting edge-case behavior on exported functions.
- Removed 12 trivial step narrators (
Token & Quality Metrics
| Metric | Before | After | Delta |
|---|---|---|---|
| Total Lines | 94 | 78 | -16 lines (-17%) |
| Inline Comments | 14 | 0 | -14 comments (-100%) |
| Documented Contracts (JSDoc) | 0 | 2 | +2 contracts |
| Est. Token Cost per Read | ~480 tokens | ~395 tokens | -85 tokens saved (-17.7%) |
Verification
- Test Suite: All unit tests pass with zero regressions.
Scanner Verification: python3 scripts/find_inline_comments.py src/services/billing.ts reported 0 unwanted comments.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop burning 20–35% of your LLM context window on obvious, redundant inline comments that state the obvious.
Clean Comments is an autonomous code hygiene and token conservation skill designed for agentic workflows. When AI coding agents continuously re-read files loaded with narrative noise (// 1. Users, // increment i, // record order), they burn valuable context tokens and suffer cognitive distraction.
Clean Comments restores clarity and saves tokens across every subsequent agent cycle:
- 🛡️ Guaranteed Behavioral Invariance: Zero logic modifications. Variables, types, control flow, and runtime behavior remain 100% unchanged.
- 🧹 Triage Matrix: Eliminates trivial step markers, trailing annotations, and commented-out dead code.
- 📜 JSDoc/TSDoc Migration: Automatically documents public interfaces, exported functions, and complex classes at the API boundary where documentation actually belongs.
- 🔬 Companion Lexical Scanner: Includes
scripts/find_inline_comments.py, a zero-dependency Python state-machine lexer that detects comments with 1-based coordinates while ignoring URLs (https://), strings, and template literals. - 📊 Token Savings Quantification: Accurately estimates context tokens saved per read pass.
- 🌐 Multi-Language Support: Operates on TypeScript, JavaScript, Dart, Go, Rust, Java, C#, and C++.
What's Inside the Skill:
SKILL.md— Actionable instructions with trigger-based detection and triage rules.scripts/find_inline_comments.py— Zero-dependency lexical scanner and in-place comment stripper.examples/— Concrete before/after walkthroughs and standardized deliverable report templates.
Optimized for C-style comments (JS, TS, C++, Java). Does not support languages with different delimiters like Python (#) or Ruby. Requires Python 3 to run the auditor script.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 6 days ago
Requires