AgentSkillsCN

flutter-fix-and-verify

每日运行Flutter“绿色分支”工作流程,在一条确定性的命令中完成`pub get`、可选的`dart fix/format`、分析与测试。

SKILL.md
--- frontmatter
name: flutter-fix-and-verify
description: Daily Flutter "green branch" workflow that runs pub get, optional dart fix/format, analyze, and tests in one deterministic command.
triggers:
  - "fix flutter warnings quickly"
  - "run flutter pre-commit checks"
  - "make flutter branch green"
inputs:
  - "mode flag: --dry-run | --execute | --verify-only"
outputs:
  - "fix/verification report and optional code formatting/fix updates"
safety:
  - "execute requires clean git tree"
  - "verify-only does not mutate files"
commands:
  - "skills/flutter-fix-and-verify/scripts/run.sh --verify-only"
  - "skills/flutter-fix-and-verify/scripts/run.sh --execute"

When to use / when NOT to use

  • Use in daily dev loops before commit/PR push.
  • Do not use as a substitute for release-specific checks.

Preconditions (tools, versions, repo state)

  • Flutter/Dart installed.
  • pubspec.yaml present.
  • Clean tree for --execute.

Workflow (DISCOVER → PLAN → EXECUTE → VERIFY → REPORT)

  1. DISCOVER: validate toolchain/project.
  2. PLAN: determine fix/check sequence.
  3. EXECUTE: apply fixes and formatting in execute mode.
  4. VERIFY: run analyze + tests.
  5. REPORT: summarize pass/fail and changed files.

Exact commands and expected signals

bash
skills/flutter-fix-and-verify/scripts/run.sh --dry-run
skills/flutter-fix-and-verify/scripts/run.sh --verify-only --ci
skills/flutter-fix-and-verify/scripts/run.sh --execute

Success: analyze/tests run and report generated. Failure: missing toolchain/project or failing analyzer/tests.

If it fails (checklist)

  • Run flutter doctor.
  • Address analyzer/test failures from report output.
  • Re-run in verify-only to confirm clean status.

Final report template

  • Fixes applied (if any).
  • Analyze/test outcomes.
  • Remaining blockers.
  • Next actions.