moonbit-refactoring

Installation
SKILL.md

MoonBit Refactoring Skill

Intent

  • Preserve behavior and public contracts unless explicitly changed.
  • Minimize the public API to what callers require.
  • Prefer declarative style and pattern matching over incidental mutation.
  • Use view types (ArrayView/StringView/BytesView) to avoid copies.
  • Add tests and docs alongside refactors.

Workflow

Start broad, then refine locally:

  1. Architecture first: Review package structure, dependencies, and API boundaries.
  2. Inventory public APIs and call sites (moon ide doc, moon ide find-references).
  3. Pick one refactor theme (API minimization, package splits, pattern matching, loop style).
  4. Apply the smallest safe change.
  5. Update docs/tests in the same patch.
  6. Run moon check, then moon test.
  7. Use coverage to target missing branches.
Installs
20
GitHub Stars
73
First Seen
Feb 11, 2026
moonbit-refactoring — moonbitlang/moonbit-agent-guide