From moonbit-skills
Guides MoonBit development by solving language, code, compiler diagnostics, package, toolchain, backend, FFI, and test questions using fresh sources like moon ide and docs.
npx claudepluginhub moonbitlang/skills --plugin moonbit-skillsThis skill uses the workspace's default tool permissions.
Use this skill to solve MoonBit developer questions by identifying the missing
Provides MoonBit best practices for code generation, navigation with moon ide/doc, and fixes for common AI syntax pitfalls like type params, raise, macros, and loops.
Guides binding C libraries to MoonBit using native FFI: extern "c" declarations, moonbit.h stubs, moon.pkg config, ownership annotations, callbacks, string conversion, and AddressSanitizer validation.
Provides Zig programming expertise with version-specific docs (0.2.0-master), auto-detection, 223 recipes, templates, examples, scripts, and best practices.
Share bugs, ideas, or general feedback.
Use this skill to solve MoonBit developer questions by identifying the missing context first. This is an orientation skill, not a bundled copy of all MoonBit documentation.
If the user asks for exact standard-library APIs, package APIs, or recently
changed behavior, verify with moon ide doc, official API docs, package docs,
or local project files instead of guessing.
Some MoonBit facts move faster than model memory: new syntax, experimental features, package availability, package APIs, dependency versions, target support, and command flags. For these, do not turn memory into a final answer.
Use this pattern:
moon commands,
official docs, mooncakes package docs, or the registry.This is not a rule to verify every stable fact. It is a rule to admit when MoonBit ecosystem or feature knowledge may be stale, then check the latest source before making exact claims.
Keep freshness checks bounded. For package or API discovery, use one local toolchain query and, if needed, one registry or public-docs lookup. If those do not confirm the exact fact, stop and answer "not confirmed from the checked sources" with the next verification command. Do not run many near-duplicate web searches just to prove absence.
Keep discovery narrow. Once a source-of-truth command or document answers the user's requested level of detail, stop searching unless the user asked for examples, signatures, alternatives, or validation by execution. Do not spend extra context proving nearby facts that are not needed for the answer.
When recommending external material, provide a concrete URL from
references/source-map.md. Do not assume the user has this repository checked
out.
moon ide doc in the
user's project. It reflects the installed toolchain and dependencies better
than memory or stale docs.moon add <candidate> in a disposable or
user project before naming a dependency as available.llvm is nightly-only. Stable backend guidance should use wasm, wasm-gc,
js, or native; --target all excludes llvm.moon.mod.json and moon.pkg.json beat generic advice for package
names, imports, targets, and dependencies.E#### diagnostics, use moon check --explain or the exact online error
page pattern before inventing a cause.Treat MoonBit facts as three tiers:
llvm being nightly-only.moon ide, local
files, generated interfaces, official docs, or mooncakes.Never present unverified guesses as facts. If an exact fact is not verified,
say what must be checked and provide the command or URL. Prefer "I can answer
the capability, but the exact API needs moon ide doc '*json*'" over a
plausible module or function name.
If a verification command fails, returns no result, or was only checked outside
the user's project, do not cite it as if it proved the exact API. Say what the
failure means and give the next source, for example package installation,
moon tree, mooncakes package docs, or a local dependency file.
If you did verify an exact fact, say so compactly: "Verified with
moon ide doc '@json'" or "Source: ". Do not omit the verification source
after naming exact imports, functions, or error meanings.
Do not cite this skill's own reference files as the final verification source for users. The final answer should cite an external URL, a local project file, or a command result. The skill is guidance for the agent, not user-facing evidence.
This rule still applies when a reference file contained the answer. Use the reference file to route the work, then cite the public URL, command, or local project file named by that reference.
Avoid "likely" guesses for exact API behavior. For unknown calls such as
Json.parse or result.unwrap(), say "verify whether this returns typed errors
or a result-like value" instead of guessing which one it uses.
references/question-routing.md
and references/source-map.md.references/answer-shapes.md first. Load
references/capabilities-faq.md only when the quick shape does not cover the
concept or the user asks for a broader comparison. If exact APIs are involved,
use references/lookup-recipes.md.references/mental-models.md.references/idioms.md.moon output, package errors, backend errors, or
diagnostics with an E#### code: read references/diagnostics-playbook.md
and the relevant recipe in references/lookup-recipes.md.references/toolchain-map.md.references/source-map.md.For tasks that span multiple areas, read the most specific reference first, then one secondary reference if needed.
Before answering, decide whether the unknown is most likely:
State uncertainty briefly when it matters, but do not stop at uncertainty if a
recipe can resolve it. For concrete code work, prefer a narrow validation
command such as moon check, moon test, or moon build with the relevant
--target.
moonbit-docs repository itself;
use the repo maintainer skill for docs, translation, Sphinx, or example
maintenance workflows.