moonbit-language

moonbit-language is a skill for Claude Code, Codex from hyfdev/moonbit-agent-skills. It costs 155 tokens per session (2,183 once invoked), scanned A, original, MIT.

A verified reference for the MoonBit programming language, checked against a specific MoonBit compiler version. It covers how to understand, write, review, and fix MoonBit code.

In plain words
What is it for?
Use it when working with .mbt or .mbt.md files, including syntax, types, patterns, visibility, traits, errors, API design, and translations from Rust, TypeScript, or Go.
Why use it?
It reduces mistakes caused by assuming MoonBit behaves like another language or by relying on outdated language details. It also distinguishes claims tested with the compiler from information only described in documentation.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hyfdev/moonbit-agent-skills/moonbit-language
Any agent
npx skills add hyfdev/moonbit-agent-skills --skill moonbit-language
Clone the repo
git clone --depth 1 https://github.com/hyfdev/moonbit-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for moonbit-language

README.md
[![agentmods](https://agentmods.dev/badge/skills/hyfdev/moonbit-agent-skills/moonbit-language.svg)](https://agentmods.dev/skills/hyfdev/moonbit-agent-skills/moonbit-language)
Your own site
<a href="https://agentmods.dev/skills/hyfdev/moonbit-agent-skills/moonbit-language"><img src="https://agentmods.dev/badge/skills/hyfdev/moonbit-agent-skills/moonbit-language.svg" alt="Measured on agentmods" height="20"></a>
Per session 155 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,183 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00155 $0.02183
Opus 5 $0.00077 $0.01092
Sonnet 5 $0.00031 $0.00437
Haiku 4.5 $0.00015 $0.00218

Measured 5d ago against content hash 96749ccdb722, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

moonbit-language scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify_snippet.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/moonbit-language/SKILL.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MoonBit language

Verification contract

Executable claims in this skill are checked against moonc v0.10.6+80dc50f24 (MoonBit release 0.10.6, build 2026-08-04) on Linux x86_64. The repository runs every mbt check fence on wasm-gc, wasm, js, and native and runs diagnostic fixtures against the same pin. Facts that depend on an external runtime or were not executed are explicitly labeled Documented, not executed with an official source. Blocks marked mbt nocheck are explanatory rejected or deprecated forms; they are not executed.

MoonBit is pre-1.0 and changes quickly. Before relying on a load-bearing claim, run moon version --all. If local moonc differs from the pin:

  1. Treat the claim as a hypothesis.
  2. Reproduce the smallest relevant example with moon check, moon test, or node scripts/verify_snippet.ts.
  3. Compare the local version with the official latest manifest and current documentation commit; a newer official pin means this skill is stale even when no website release article exists.
  4. State which version was actually tested and any remaining difference.

Work by task

  • Understand code: identify unfamiliar syntax and the local compiler version; search this file for the exact token or diagnostic; load the routed reference; explain behavior only after matching the code to a checked example or an explicitly documented fact.
  • Write code: load the smallest relevant reference, use its current forms, then run moon check and the narrowest useful moon test. Do not invent syntax from another language or an old MoonBit tutorial.
  • Fix code: preserve the program's intent, reproduce the diagnostic, search both the diagnostic text and suspicious token in the references, apply the current migration, and rerun with warnings denied when deprecation is involved. Do not silence a warning before proving the replacement.
  • Judge a feature: distinguish verified, documented, proposal, and unknown. Official docs can lag or suppress warnings; the compiler at the stated pin decides executable behavior.

Read the full file on GitHub · 76 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 76 lines · 155 tokens per session scan A 96749ccdb722

Subscribe to this mod's changes

moonbit-language is a skill published in the GitHub repository hyfdev/moonbit-agent-skills (6 stars, last pushed 28d ago), licensed MIT. It adds 155 tokens to every session and 2,183 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.