audit-dependencies

bởi flutter

Tối ưu kích thước và bảo mật plugin bằng cách loại bỏ các phụ thuộc không sử dụng và cập nhật các thư viện lỗi thời.

npx skills add https://github.com/flutter/flutter-intellij --skill audit-dependencies

Skill: Dependency & Library Audit

You are tasked with optimizing plugin size and security by removing unused dependencies and updating outdated libraries.

Objective

Optimize plugin size and security by removing unused dependencies and updating outdated libraries.

Workflow Instructions

1. Baseline

  • Run ./gradlew test and ./gradlew verifyPlugin to ensure the project is stable.

2. Audit build.gradle

  • Review dependencies {} block. Identify libraries that might no longer be used.

3. Check plugin.xml

  • Ensure all <depends> tags match actual API usage.

4. Update Versions

  • Check for newer stable versions of third-party libraries.

5. Remove Unused

  • Delete any local .jar files in lib/ that are not referenced or can be replaced by Maven coordinates.

6. Verify

  • Run ./gradlew buildPlugin and check the distribution size. Ensure the plugin still loads and functions correctly.
  • Run ./gradlew testClasses, ./gradlew test, and ./gradlew verifyPlugin to ensure no checking or runtime issues were introduced.
  • Suggest manual test steps: Check the code changes made and write test steps for a user to execute that will trigger the code paths that have changed. If needed, add logging statements to verify that the code paths have successfully run.

7. Report & Review

  • Summarize the dependencies removed or updated.
  • Test Location: Explicitly state where in the IDE the user should go to test the changed functionality (e.g., "Go to Preferences > Languages & Frameworks > Flutter").
  • Action: Ask the user to review the build.gradle changes closely.
  • Do not commit or push.
  • Provide a suggested Git commit message (e.g., "Cleanup: Remove unused dependency [Name]").

Thêm skills từ flutter

dart-modern-features
flutter
Để tìm các ứng viên cho việc hiện đại hóa:
flutter-fix-layout-issues
flutter
Sửa lỗi bố cục Flutter (tràn, ràng buộc vô hạn) bằng các công cụ Dart và Flutter MCP. Sử dụng khi xử lý "RenderFlex overflowed", "Vertical…
adding-release-notes
flutter
Thêm mô tả thay đổi dành cho người dùng vào ghi chú phát hành DevTools. Sử dụng khi ghi lại các cải tiến, sửa lỗi hoặc tính năng mới trong tệp NEXT_RELEASE_NOTES.md.
reviewing-devtools-prs
flutter
Quy trình rà soát pull request riêng cho kho lưu trữ DevTools, áp dụng các nguyên tắc về phong cách và mẫu rà soát phổ biến của DevTools. Sử dụng khi rà soát pull request trong…
dart-use-primary-constructors
flutter
Giúp người dùng viết các primary constructor đúng cú pháp và ngữ nghĩa trong Dart, đồng thời di chuyển/sử dụng cú pháp constructor mới, cú pháp dấu chấm phẩy thân rỗng,…
code-documentation
flutter
Hướng dẫn viết tài liệu mã hiệu quả, bao gồm docstrings, JSDoc, dartdoc và các chú thích triển khai. Sử dụng kỹ năng này khi viết mã mới, thêm…
api-review
flutter
Xem xét mã được chỉ định theo các nguyên tắc thiết kế API chuẩn. Sử dụng kỹ năng này khi người dùng yêu cầu đánh giá API hoặc kiểm tra mã theo thiết kế API…
flutter-accessibility
flutter
Triển khai các tiêu chuẩn truy cập WCAG 2 và EN 301 549 cùng bố cục thích ứng trong ứng dụng Flutter. Áp dụng chú thích ngữ nghĩa, kích thước vùng chạm (tối thiểu 48x48 dp) và tỷ lệ tương phản văn bản (4.5:1 cho văn bản nhỏ, 3:1 cho văn bản lớn) trên các nền tảng di động, web và máy tính để bàn. Cung cấp logic quyết định cho khởi tạo ngữ nghĩa web, bao bọc widget tương tác, chuyển đổi bố cục dựa trên kích thước màn hình và xử lý đầu vào bàn phím/chuột. Bao gồm quản lý điều hướng tiêu điểm qua FocusTraversal