android-cleanup-agentGitHubnpm

Claude Code plugin

The plugin lets Claude drive the CLI for you: it connects, audits, explains in plain language what is slowing the device down, asks you how you use it, and gets your approval before anything changes. Claude never changes the device directly; everything goes through the CLI and its safeguards.

Install

/plugin marketplace add willcoliveira/android-cleanup-agent
/plugin install android-cleanup-agent@android-cleanup-agent

The plugin calls the android-cleanup-agent CLI, so install it too (npm i -g android-cleanup-agent) along with adb. See Getting started.

Skills

SkillWhat it doesYou might say
/android-cleanup-agent:cleanupThe whole flow: connect, audit, explain, interview, plan, approvals, risk judge, apply with health checks, optional restart, results and report."my Google TV is slow, clean it up"
/android-cleanup-agent:auditRead-only: connects, audits and explains what is using memory, storage and waking the device. Changes nothing."why is my TV slow?", "what apps can I remove?"
/android-cleanup-agent:restoreChecks which changes are still in place, then brings apps back, re-enables disabled ones and puts settings back, newest first."bring back the Google app", "undo the cleanup"

The interview

After the audit, Claude asks a few short questions. The answers decide what is offered:

The plan itself is built by the CLI, deterministically, from the audit, the curated catalog and these answers. Claude explains it; it does not invent items.

Approvals

Claude walks you through the plan category by category (Google apps, media apps, manufacturer apps, social apps, assistant and voice, analytics, games, performance settings, background scanning, radios, caches, apps you installed). Approving a category does not approve everything in it: apps you installed yourself and high-risk items, such as turning off the Google app, each need their own explicit yes.

Risk judge

Right before applying, an independent sub-agent reviews the approved list against what you said. It vetoes items that look risky for you: something tied to a feature you use, a high-risk change without a clear reason, an app that looks like one of your main apps. It can only remove items from the approved set; it cannot approve or add anything.

Applying, restarting and reporting

apply --yes and reboot --yes pass through Claude Code's permission dialog, so you confirm them yourself. Higher-risk items are applied alone with a health check after each. At the end a report sub-agent writes the summary from the CLI's own numbers: RAM in use and storage free before and after, what was removed, turned off or changed, what was skipped or rolled back and why, and how to undo it.

Hooks

The plugin's hooks block raw device-changing commands (adb shell pm uninstall, adb shell settings put, adb reboot and similar), fastboot and root commands, and edits of the tool's own run files. If Claude tried to go around the CLI, the command is refused. Safety & restore has the details.