moonbit-lang

Reference MoonBit syntax, data types, and coding conventions.

44|3|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/moonbit-community/fastcc --skill moonbit-lang-moonbit-community
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moonbit-lang
Source: https://github.com/moonbit-community/fastcc/tree/main/.codex/skills/moonbit-lang-skill
Command: npx skills add https://github.com/moonbit-community/fastcc --skill moonbit-lang-moonbit-community

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

MoonBit language reference and coding conventions help developers write MoonBit code with correct syntax, error handling, and APIs, providing a central resource for learning and reference.

Core Features & Use Cases

  • Comprehensive MoonBit reference: syntax, data types, patterns, error handling, FFI, async, and standard library references.
  • Quick lookup and examples for common tasks such as defining structs, enums, and traits, pattern matching, and using the standard library.
  • Use Case: A developer wants to implement a MoonBit module and needs to consult syntax and conventions quickly while coding.

Quick Start

Open this skill to browse the MoonBit language reference, search for syntax examples like struct definitions or pattern matching, and copy-and-paste examples into your MoonBit project.

Frequently Asked Questions about moonbit-lang

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define structs and enums in MoonBit?

MoonBit syntax for defining structs and enums is covered comprehensively in the language reference, which provides copy-and-paste examples for data types and standard conventions to ensure correct implementation in your modules.

What is the correct syntax for pattern matching in MoonBit?

Pattern matching in MoonBit uses specific syntax detailed in the language reference. You can browse the reference to find exact syntax examples for matching data types and handling various structural patterns correctly.

How does error handling work in MoonBit?

Error handling in MoonBit is a core feature detailed in the language reference. The documentation provides specific syntax and conventions to implement error handling correctly, ensuring robust code execution and proper API usage.

Can I use FFI and async features in MoonBit?

Yes, MoonBit supports both FFI and async features, with specific syntax and usage patterns documented in the language reference. The guide helps developers integrate external functions and manage asynchronous operations following standard conventions.

What's the best way to look up standard library APIs in MoonBit?

The best way to look up standard library APIs in MoonBit is by browsing the language reference, which serves as a central resource for syntax, data types, and library functions, enabling quick lookup and copy-and-paste examples.

Do I need to follow specific coding conventions when writing MoonBit code?

Yes, following MoonBit coding conventions is recommended for proper syntax and API usage. The language reference provides a central resource for learning these conventions, ensuring developers write consistent and correct code.