flutter-refactor-workflow

Run flutter analyze after code deletions to fix compilation errors.

5|3|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/ZHLX2005/fr --skill flutter-refactor-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-refactor-workflow
Source: https://github.com/ZHLX2005/fr/tree/main/.claude/skills/flutter-refactor-workflow
Command: npx skills add https://github.com/ZHLX2005/fr --skill flutter-refactor-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Flutter 项目在进行页面删除、功能移除或代码重构后,必须立即检查并修复编译错误,确保提交前代码库保持可构建状态。

Core Features & Use Cases

  • 自动在删除/重构后运行静态分析,定位未定义标识符、错误导入和引用断裂。
  • 提供清晰的修复流程:更新导入、替换被删除的类/方法引用、并在修复后再次运行分析以确保通过。
  • 场景覆盖:删除页面、移除功能、重构模块和跨文件引用调整等。

Quick Start

立即在进行删除或重构后运行 flutter analyze 并修复编译错误以确保项目可编译。

Frequently Asked Questions about flutter-refactor-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix compile errors after deleting a page in Flutter?

Resolve compile errors after a Flutter refactor by running static analysis to locate broken imports and undefined identifiers, then updating references and re-running analysis to ensure the project builds successfully.

Why does flutter analyze show undefined identifiers after a code refactor?

Flutter analyze reports undefined identifiers after a refactor because deleted classes or methods leave dangling references across files, requiring replacement or removal of those non-type references to restore the build state.

What is the best way to resolve broken imports when removing features from a Flutter app?

The best way to resolve broken imports when removing Flutter features is to run static analysis immediately after deletion, identify error signatures, and follow a guided workflow to update or remove invalid import statements.

When do I need to run static analysis during a Flutter module restructuring?

Run static analysis immediately during a Flutter module restructuring whenever you delete code or adjust cross-file references, ensuring you catch and fix build-time issues before committing the refactored codebase.

Does this refactoring workflow handle cross-file reference adjustments in Flutter?

Yes, this refactoring workflow handles cross-file reference adjustments in Flutter by detecting broken imports and non-type references across the project, providing guided steps to resolve all build-time compilation errors.