Works with the AI Agents you already use
Agent Janitor
Clean up obsolete TODOs and dead-end comments that distract AI agents and inflate token costs.
$2
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 Path | Line | Trigger | Ticket ID | Status | Risk Category |
|---|---|---|---|---|---|
src/auth/service.ts | 42 | TODO | #882 | CLOSED | 🛑 Dead-End Trap |
src/db/connection.js | 108 | FIXME | #915 | RESOLVED | 🛑 Dead-End Trap |
src/ui/header.tsx | 15 | TODO | #1042 | OPEN | ⚠️ Scope-Creep |
lib/utils/format.py | 89 | BUG | #773 | WONT_FIX | 🛑 Dead-End Trap |
tests/main_test.go | 204 | TODO | N/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 remainingOPENticket comments to prevent agent side-quests.
header.tsx
PDF · document
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
- Audit the workspace using
audit_codebaseto identify risks across your directory or a specific GitHub repo. - Review the risk breakdown to see a file-by-file inventory of dead-end traps and scope-creep risks.
- Generate a diff with
clean_dead_endsormask_triggersto preview proposed edits without modifying files. - Apply the cleanup by setting the
applyparameter 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.
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.
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
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 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 7 days ago
- Software
Python
In case of problems contact me on avishekrauniyar.com.np