cleanup-unused-assets

作成者: flutter

Reduce plugin size by scanning resources/icons and removing unreferenced assets.

npx skills add https://github.com/flutter/flutter-intellij --skill cleanup-unused-assets

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 test and ./gradlew verifyPlugin to ensure the project is stable.

2. Scan Assets

  • List all files in resources/icons and 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 buildPlugin and check that the plugin still loads correctly without missing resource exceptions.
  • Run ./gradlew testClasses, ./gradlew test and ./gradlew verifyPlugin to 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]").

flutterのその他のスキル

adding-release-notes
flutter
DevToolsのリリースノートにユーザー向けの変更説明を追加します。NEXT_RELEASE_NOTES.mdファイルに改善点、修正、新機能を文書化する際に使用します。
official
dart-modern-features
flutter
モダナイゼーションの候補を見つけるには:
official
api-review
flutter
指定されたコードを標準的なAPI設計ガイドラインに照らしてレビューします。ユーザーがAPIレビューを依頼した場合や、コードをAPI設計に照らして確認したい場合にこのスキルを使用します。
official
code-documentation
flutter
効果的なコードドキュメントを書くためのガイド。docstring、JSDoc、dartdoc、実装コメントを含む。新しいコードを書く際や追加する際にこのスキルを使用する。
official
dart-add-unit-test
flutter
Write and organize unit tests for functions, methods, and classes using `package:test`. Use when creating new logic or fixing bugs to ensure code remains…
official
dart-build-cli-app
flutter
エントリポイント構造、終了コード、クロスプラットフォームのスクリプト。コマンドラインユーティリティ、スクリプト、またはアプリケーションを構築する際に使用します。
official
dart-collect-coverage
flutter
coverageパッケージを使用してカバレッジを収集し、LCOVレポートを作成します
official
dart-fix-runtime-errors
flutter
get_runtime_errors と lsp を使用してアクティブなスタックトレースを取得し、失敗している行を特定して修正を適用し、hot_reload で解決を確認します。
official