moonbit-single-file-check

Validate standalone .mbt.md files with moon check and moon test.

Updated Jan 7, 2026
One-click install
npx skills add https://github.com/peter-jerry-ye/skills --skill moonbit-single-file-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moonbit-single-file-check
Source: https://github.com/peter-jerry-ye/skills/tree/main/skills/moonbit-single-file-check
Command: npx skills add https://github.com/peter-jerry-ye/skills --skill moonbit-single-file-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MoonBit's single-file mode lets you validate a single .mbt.md file outside any MoonBit project, ensuring it can be tested without project context.

Core Features & Use Cases

  • Standalone validation: detect if a given .mbt.md file is not inside a MoonBit project.
  • Project scope detection: verify absence/presence of moon.mod.json in ancestor directories or a moon.pkg.json next to the file to determine project scope.
  • Guided execution: provide moon check and moon test commands for immediate validation on the standalone file.

Quick Start

Use the moonbit-single-file-check skill to validate a standalone file 'example.mbt.md' by running: moon check example.mbt.md moon test example.mbt.md

Frequently Asked Questions about moonbit-single-file-check

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

FAQPage Schema
How do I validate a standalone .mbt.md file outside a MoonBit project?

To validate a standalone .mbt.md file outside a MoonBit project, ensure no moon.mod.json exists in parent directories and no moon.pkg.json is adjacent, then run moon check and moon test on the file.

What is MoonBit single-file mode and when do I need it?

MoonBit single-file mode is a validation process for testing an isolated .mbt.md file without project context. You need it when writing standalone scripts or examples outside a full MoonBit project structure.

Why does moon run fail for my standalone .mbt.md file?

Moon run fails for standalone .mbt.md files because moon run is not supported in MoonBit's single-file mode. You can only use moon check and moon test commands to validate standalone files outside a project.

Can I use moon test on a .mbt.md file if a moon.pkg.json is in the same directory?

No, you cannot use single-file mode if a moon.pkg.json is next to the file or a moon.mod.json is in a parent directory. The file is treated as part of an existing MoonBit project rather than standalone.