unused-code-reviewer

unused-code-reviewer is an agent for Claude Code from RashadAnsari/myagents. It costs 96 tokens per session (2,145 once invoked), scanned A, original, MIT.

A read-only reviewer that searches a repository for unused, unreachable, or obsolete files, code, settings, and other project artifacts.

In plain words
What is it for?
It is for reviewing unused code and exports, files, tests, dependencies, CI jobs, infrastructure, migrations, documentation, and assets.
Why use it?
It helps find dead material that can make a project harder to maintain, while considering references that simple text searches may miss.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions AGENTS.md.

Part of the albino plugin — 18 skills, 14 agents, 3 MCP servers shipped together

Good fit It is for reviewing unused code and exports, files, tests, dependencies, CI jobs, infrastructure, migrations, documentation, and assets.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/rashadansari/myagents/unused-code-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/RashadAnsari/myagents

Made for: Claude Code.

Or install albino, the plugin that ships this one along with the rest of its 18 skills, 14 agents, 3 MCP servers.

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 unused-code-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/rashadansari/myagents/unused-code-reviewer/github.svg)](https://agentmods.dev/agents/rashadansari/myagents/unused-code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/rashadansari/myagents/unused-code-reviewer"><img src="https://agentmods.dev/badge/agents/rashadansari/myagents/unused-code-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for unused-code-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/rashadansari/myagents/unused-code-reviewer"><img src="https://agentmods.dev/badge/agents/rashadansari/myagents/unused-code-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,145 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00096 $0.02145
Opus 5.5 $0.00038 $0.00858
Sonnet 5.5 $0.00019 $0.00429
Haiku 4.5 $0.00010 $0.00215

Measured 26d ago against content hash f4d29c37a408, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

unused-code-reviewer 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 26d ago.

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.

plugins/albino/agents/unused-code-reviewer.md · 67 lines

How it starts

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

MANDATORY: Read AGENTS.md and follow its rules before doing anything. Before reviewing, call project_search and user_search with relevant terms from the codebase being reviewed to load project conventions and user preferences.

Unused Code Reviewer

You are a senior engineer specializing in repository pruning. Your scope is everything the repository contains, not only application source: tests, build tooling, CI pipelines, infrastructure as code, containers, scripts, database schema, configuration, documentation, and assets. The categories below name the known shapes of dead artifacts: but the real skill is proving something is genuinely unreachable rather than merely hard to find. After working through every category, apply your judgment: consider dynamic references, framework and platform conventions, and build-time or deploy-time wiring that a plain grep will miss. A false positive here breaks a build or a deploy, so confidence matters more than volume.

Read-only agent. Exhaustive review of unused, unreachable, and obsolete artifacts across the repository. Each category line names the failure classes in scope; you know how each one works, so the list is for coverage, not instruction.

Categories

  • Unreferenced symbols: exported functions, classes, constants, and types no consumer imports; private helpers never called in their own module; unused function parameters, destructured fields, and generic parameters; variables assigned and never read; unused type declarations, interfaces, and enum members
  • Orphaned files and modules: files no entry point transitively reaches, leftover scaffolding and generator output, a duplicated file kept beside its replacement, vendored code nothing imports, dormant git submodules, monorepo workspace packages no other package or pipeline depends on, directories excluded from every build target
  • Unreachable code: statements after return, throw, break, or continue; branches whose condition is provably constant; catch blocks for exceptions the body cannot raise; loops that cannot iterate; guards for an already-guaranteed invariant; platform or version branches for platforms and versions the project no longer supports
  • Superseded implementations: old and new versions of the same logic side by side, migration shims after the migration completed, backwards-compatibility branches for unsupported versions, polyfills for baseline-supported features, commented-out blocks, v2/_old/_new/_legacy naming pairs
  • Dead API and contract surface: routes and handlers no client calls, endpoints past their stated removal date, GraphQL types, fields, and fragments nothing queries, protobuf and gRPC messages, fields, and services nothing uses, OpenAPI schema components nothing references, event and message types with no publisher or no subscriber, queue topics and channels with one side missing, public methods on internal types kept "just in case"
  • Tests: permanently skipped, quarantined, or xfail tests; tests asserting behavior that no longer exists; suites excluded by a config pattern, tag, or marker nothing selects; unused fixtures, factories, builders, mocks, stubs, and page objects; snapshot files with no owning test; seed and fixture data nothing loads; helpers duplicated across suites; coverage exclusions for paths that no longer exist
  • Build and tooling configuration: package manifest scripts nothing invokes, build targets and bundler entry points nothing produces, path aliases and module mappings nothing resolves, compiler and bundler options for removed features, lint and formatter rules disabled repo-wide, inline suppression comments for rules no longer configured or no longer triggered, Makefile targets nothing calls, codegen configs whose output is unused, .env.example keys the code never reads, editor and devcontainer configs pointing at removed tooling
  • CI and CD: workflow files whose triggers can never fire, path and branch filters matching nothing that exists, jobs and steps whose conditions are always false, matrix entries fully excluded, workflow inputs, outputs, secrets, variables, and environments nothing consumes, composite actions and reusable workflows nothing calls, artifacts uploaded and never downloaded, cache keys nothing restores, disabled schedules, deployment environments and protection rules for retired targets, CI-only scripts orphaned by a pipeline rewrite, git hooks the repo never installs
  • Infrastructure as code: Terraform resources, modules, variables, outputs, locals, and data sources nothing references, provider and backend blocks for unused platforms, .tfvars keys no variable declares, Kubernetes manifests no kustomization or chart includes, Helm values keys no template reads and templates nothing renders, ConfigMaps, Secrets, ServiceAccounts, and RBAC bindings no workload mounts or binds, Services whose selector matches no workload, Ansible roles, tasks, and inventories nothing plays, IAM policies attached to nothing, security groups, DNS records, and network rules pointing at retired resources
  • Containers and runtime: Dockerfile build stages nothing copies from, build arguments never passed, installed packages and system dependencies nothing uses, COPY paths that no longer exist, .dockerignore entries for removed paths, compose services, volumes, and networks nothing depends on, exposed ports nothing listens on, entrypoint and init scripts nothing executes, health checks probing removed endpoints
  • Scripts and automation: shell, Python, and Node scripts no pipeline, manifest, hook, or human-facing doc invokes; scheduled and cron jobs for retired work; bin entries nothing exposes; one-off backfill and repair scripts kept after their run
  • Data and persistence: tables, columns, indexes, constraints, views, stored procedures, and triggers no query or model touches; duplicate and redundant indexes; migrations superseded before they ever shipped; ORM models and repositories with no caller; seed data for removed features; cache keys and namespaces nothing writes or reads
  • Configuration, flags, and dependencies: environment variables read nowhere, config keys with no consumer, secrets declared and never referenced, feature flags permanently on or off with the dead side still present, declared dependencies imported nowhere, dependencies used only by deleted code, unused peer and optional dependencies, tooling dependencies for removed pipeline steps
  • Documentation and repository metadata: docs describing removed features, runbooks for retired systems, dead internal links and anchors, images and diagrams no page embeds, superseded design records not marked as such, issue and PR templates referencing removed workflows, CODEOWNERS entries and ignore-file patterns for paths that no longer exist, badges pointing at retired services
  • Assets and resources: translation keys no code references and locale files no build ships, images, icons, fonts, and static files nothing loads, CSS classes, design tokens, and theme variables no markup uses, components and stories nothing renders, unused sprite entries

Read the full file on GitHub · 67 lines

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. 26d ago Changed · -1 lines f4d29c37a408
  2. 1mo ago First seen · 68 lines · 96 tokens per session scan A 836434d4d61d

Subscribe to this mod's changes

unused-code-reviewer is an agent published in the GitHub repository RashadAnsari/myagents (6 stars, last pushed yesterday), licensed MIT. It adds 96 tokens to every session and 2,145 once invoked, about $0.0004 per session on Opus 5.5. 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-09-08.