Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Agent Janitor

    1

    Clean up obsolete TODOs and dead-end comments that distract AI agents and inflate token costs.

    $2

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Agent Janitor

    Agent Janitor

    Example session with this skill installed

    Audit this repository for distraction traps and prune any dead-end comments that reference closed tickets in the owner/web-app repo.

    • Read your context and instructions
    • Compiled the agent janitor
    • Generated the document

    I have completed the audit of the codebase and cross-referenced inline comments with the owner/web-app repository. The audit identified several "Dead-End Traps" where code comments reference issues that have already been resolved or closed.

    Codebase Audit & Pruning Report

    File PathLineTriggerTicket IDStatusRisk Category
    src/auth/service.ts42TODO#882CLOSED🛑 Dead-End Trap
    src/db/connection.js108FIXME#915RESOLVED🛑 Dead-End Trap
    src/ui/header.tsx15TODO#1042OPEN⚠️ Scope-Creep
    lib/utils/format.py89BUG#773WONT_FIX🛑 Dead-End Trap
    tests/main_test.go204TODON/A>400d⏳ Fossil Debt

    Proposed Cleanup (Pruning Diff)

    --- a/src/auth/service.ts
    +++ b/src/auth/service.ts
    @@ -41,2 +41,1 @@
    -    // TODO(#882): Remove this shim once the legacy provider is decommissioned
         return legacyAuth(credentials);
    
    --- a/src/db/connection.js
    +++ b/src/db/connection.js
    @@ -107,1 +107,1 @@
    -    poolSize: 10, // FIXME(#915): Increase pool size for production
    +    poolSize: 10,
    

    Next steps

    • Review the diff above to ensure no critical context is lost.
    • Run clean_dead_ends(apply=true, github_repo="owner/web-app") to commit these changes.
    • Run mask_triggers() on the remaining OPEN ticket comments to prevent agent side-quests.

    header.tsx

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Stale TODOs and obsolete FIXME comments are more than just technical debt. They are distraction traps that trigger unprompted agent side-quests. Research shows these comments can inflate session steps by 70% and token usage by 77% as LLMs attempt to solve problems that were already resolved years ago. This skill audits your codebase for these traps and prunes them to keep your AI sessions focused and efficient.

    What it does

    • Classify distraction traps by mapping inline comments against live GitHub issue statuses or local registries.
    • Identify dead-end traps referencing tickets that are already closed, resolved, or marked as won't-fix.
    • Flag fossil debt by surfacing untracked comments that have remained untouched for over 365 days.
    • Prune obsolete comments through safe removal of standalone lines or trimming trailing comments while preserving syntax.
    • Neutralize triggers by converting active action verbs like TODO and FIXME into passive developer notes.

    How it works

    1. Audit the workspace using audit_codebase to identify risks across your directory or a specific GitHub repo.
    2. Review the risk breakdown to see a file-by-file inventory of dead-end traps and scope-creep risks.
    3. Generate a diff with clean_dead_ends or mask_triggers to preview proposed edits without modifying files.
    4. Apply the cleanup by setting the apply parameter to true or running the equivalent CLI commands in your terminal.

    Frameworks & tools

    This tool uses the Agent-Janitor MCP server and a CLI fallback. It integrates with GitHub for live ticket lookup and supports local JSON registries for offline audits.

    Why this beats prompting it yourself

    Generic prompts often fail to distinguish between active tasks and stale context, leading agents to accidentally delete useful documentation. This skill uses a specialized MCP server to cross-reference real ticket statuses, ensuring only truly obsolete "dead-end" comments are removed while preserving necessary developer notes.

    Use cases

    • Pre-session grooming to prevent an AI agent from wandering into closed bugs during a complex refactor.
    • CI/CD presubmit checks to block commits containing comments that reference already resolved tickets.
    • Context window optimization by stripping hundreds of lines of obsolete comment debt from large files.

    Known limitations

    Requires an active Agent-Janitor MCP server or CLI installation to function. Large repositories may require specific path targeting to avoid session timeouts.

    Requires Agent-Janitor MCP server or CLI installation. Live ticket lookup requires GitHub API access. Large repositories may require targeted path parameters to stay within session limits.

    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 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 7 days ago

    Requires

    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Listed7 days ago
    Updated6 days ago

    What's inside

    Frequently Asked Questions

    The Agent Janitor identifies and removes stale TODOs or FIXME comments that reference already-closed GitHub tickets, preventing AI agents from wasting tokens and steps trying to "fix" resolved issues.

    The skill requires the Agent-Janitor MCP server or CLI tool; it integrates directly with GitHub to verify ticket statuses and supports local JSON registries for offline environments.

    No, the skill includes a preview mode that generates a diff, allowing you to review proposed removals or 'trigger masking' (turning active TODOs into passive notes) before any files are modified.

    By removing hundreds of lines of obsolete comment debt, you reduce the total character count sent to the LLM, lowering per-request token costs and keeping the agent's focus on relevant code.

    Yes, you can target specific directories or individual files using the audit_codebase function to avoid timeouts and keep the cleanup focused on your current workspace.

    New in LLM Ops