clean

GitHub

清理 Flutter 构建产物并重置项目状态。适用于更新 Flutter、依赖变更或缓存异常导致的构建错误,提供全量或快速清理命令,并在清理后指导恢复依赖与代码生成。

.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

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-20 13:44
浙ICP备14020137号-1 $お客様$