Cleanup Unused Assets
Developmentcleanup-unused-assetsCleanup Unused Assets is an Agent Skill for development published in the flutter/flutter-intellij repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Reduce plugin size by scanning resources/icons and removing unreferenced assets.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/flutter/flutter-intellij/blob/HEAD/.agents/skills/cleanup-unused-assets/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/cleanup-unused-assets, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Skill: Unused Asset Cleanup
You are tasked with reducing plugin size by removing unused icons, images, and resources.
Objective
Reduce plugin size by removing unused icons, images, and resources.
Workflow Instructions
1. Baseline
- Run
./gradlew testand./gradlew verifyPluginto ensure the project is stable.
2. Scan Assets
- List all files in
resources/iconsand other asset directories.
3. Search Usages
- Check if each asset is referenced in code or
plugin.xml.
4. Remove
- Delete assets with zero references.
5. Verify
- Run
./gradlew buildPluginand check that the plugin still loads correctly without missing resource exceptions. - Run
./gradlew testClasses,./gradlew testand./gradlew verifyPluginto ensure no regressions. - Suggest manual test steps: Check code changes made and write test steps for a user to execute that trigger changed code paths. If needed, add logging statements to verify code paths successfully run.
6. Report & Review
- Summarize assets removed.
- Test Location: Explicitly state where in the IDE user should go to test changed functionality (e.g., "Go to Preferences > Languages & Frameworks > Flutter").
- Action: Ask user to review deletions closely.
- Do not commit or push.
- Provide a suggested Git commit message (e.g., "Cleanup: Remove unused icon [Icon Name]").