What problem does it solve?
writing-motoko helps you produce modern Motoko that compiles cleanly and matches best-practice patterns for canister development, especially around persistence, upgrades, and maintainable multi-file architecture.
Core Features & Use Cases
- Modern persistence & upgrades: Uses enhanced orthogonal persistence conventions and avoids unnecessary stable/upgrade hooks.
- Safe, consistent coding style: Enforces dot-notation for self-parameter functions, contextual dot calls for core types, and avoids common compiler error patterns.
- Principled canister architecture: Recommends a types.mo / lib/ / mixins/ / main.mo layout with mixins for service composition.
- Upgrade/migration readiness: Provides guidance for enhanced migration constraints and where to load migrating-motoko variants.
- API boundary correctness: Encourages shared types for public functions and conversions from internal mutable containers.
Quick Start
Use the writing-motoko skill when editing your canister .mo files by asking the AI to refactor your code to match the skill’s Motoko conventions for mo:core, dot notation, enhanced persistence, and a types/lib/mixins/main architecture.