Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Clean Comments: Token Conservation

    1

    Eliminates token-wasting inline comments, strips narrative code noise, and migrates public API documentation to clean JSDocs with guaranteed 100% behavioral invariance.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Clean Comments: Token Conservation

    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.

    Token & Quality Metrics

    MetricBeforeAfterDelta
    Total Lines9478-16 lines (-17%)
    Inline Comments140-14 comments (-100%)
    Documented Contracts (JSDoc)02+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.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

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

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    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

    Software
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Listed6 days ago

    What's inside

    Frequently Asked Questions

    The skill uses a state-machine lexer to distinguish between actual comments and identical characters found inside strings, URLs, or regex patterns, ensuring your functional code remains 100% intact.

    By removing redundant narrative and dead code, you significantly reduce the character count per file, allowing you to fit more relevant source code into an LLM's context window without hitting token limits.

    This skill is currently optimized for languages using C-style comment syntax, including JavaScript (ES6+), TypeScript, Java, and C++, though it is most effective for JS/TS environments.

    The skill identifies the 'why' behind complex logic and automatically migrates those insights into structured JSDoc headers, ensuring your documentation is standardized rather than just deleted.

    You receive the core lexical auditing engine, the Comment Triage Matrix logic, and the automated refactoring scripts, all designed to be integrated into your existing CI/CD or pre-processing workflows.

    Yes, the tool includes a Token Estimation feature that calculates the specific volume of tokens saved per file, providing clear metrics on the efficiency gains for your AI workflows.

    New in LLM Ops