clean

GitHub

清理 Flutter 构建产物并重置项目状态。适用于解决更新 Flutter 后的构建错误、包间状态不一致、依赖变更或缓存问题。支持全量 melos 清理、单应用快速清理及生成文件清理,并提供后续恢复步骤指引。

.claude/skills/clean/SKILL.md keychat-io/keychat-app

Trigger Scenarios

Flutter 更新后出现构建错误 多个包之间状态不一致 发生主要依赖变更后 Xcode 或 Gradle 缓存导致的问题

Install

npx skills add keychat-io/keychat-app --skill clean -g -y
More Options

Non-standard path

npx skills add https://github.com/keychat-io/keychat-app/tree/main/.claude/skills/clean -g -y

Use without installing

npx skills use keychat-io/keychat-app@clean

指定 Agent (Claude Code)

npx skills add keychat-io/keychat-app --skill clean -a claude-code -g -y

安装 repo 全部 skill

npx skills add keychat-io/keychat-app --all -g -y

预览 repo 内 skill

npx skills add keychat-io/keychat-app --list

SKILL.md

Frontmatter
{
    "name": "clean",
    "description": "Clean build artifacts and reset Flutter state",
    "allowed-tools": "Bash(melos *), Bash(flutter clean), Bash(rm *)",
    "disable-model-invocation": true
}

Clean build artifacts and reset the project state.

Commands

Full clean with melos

melos run clean:flutter

This runs in all Flutter packages:

  • flutter clean
  • flutter pub get
  • Removes ios/Podfile.lock
  • Runs pod repo update && pod install

Quick clean for app only

cd packages/app && flutter clean && flutter pub get

Clean generated files

cd packages/app && rm -rf lib/**/*.g.dart lib/**/*.isar.dart

When to use

  • Build errors after updating Flutter
  • Inconsistent state between packages
  • After major dependency changes
  • Xcode or Gradle cache issues

After cleaning

Remember to:

  1. Run melos bootstrap to restore dependencies
  2. Run melos run generate:all to regenerate code
  3. Run melos run pod:install for iOS/macOS

Version History

  • 294d00d Current 2026-07-05 10:51

Same Skill Collection

.claude/skills/architecture/SKILL.md
.claude/skills/batch/SKILL.md
.claude/skills/bootstrap/SKILL.md
.claude/skills/flutter-check/SKILL.md
.claude/skills/generate/SKILL.md
.claude/skills/lint/SKILL.md
.claude/skills/pods/SKILL.md
.claude/skills/run/SKILL.md
.claude/skills/rust-build/SKILL.md
.claude/skills/test/SKILL.md

Metadata

Files
0
Version
294d00d
Hash
47ba9dbc
Indexed
2026-07-05 10:51

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-18 16:09
浙ICP备14020137号-1 $mapa de visitantes$