Agents.mbt.md
contains the MoonBit System Prompt, a
descriptive system prompt designed to enhance the performance of code agents
over MoonBit projects.
The simplest way is to reference the file and ask the AI to read it in the prompt.
Here we provide some extra instructions on how to use the MoonBit System Prompt in different code agents.
Many AI code agents now have adopted the AGENTS.md
convention for providing guidance for agents. For such agents, you may:
- Copy
Agents.mbt.md
into your project directory asAGENTS.md
- Append the content of
Agents.mbt.md
to your existingAGENTS.md
file.
Claude Code supports CLAUDE.md
file.
Since CLAUDE.md
supports @path/to/import
syntax, we suggest copying
Agents.mbt.md
into your project directory and mention it in CLAUDE.md
. For
example, suppose you copied Agents.mbt.md
to your project directory as
moonbit.mbt.md
, then you can add the following line to your CLAUDE.md
file:
# MoonBit Language Reference
- @moonbit.mbt.md
See Memory Management on detailed configuration.
Codex CLI supports AGENTS.md
.
Quoted from openai/codex/docs/getting-started.md:
You can give Codex extra instructions and guidance using
AGENTS.md
files. Codex looks forAGENTS.md
files in the following places, and merges them top-down:
~/.codex/AGENTS.md
- personal global guidanceAGENTS.md
at repo root - shared project notesAGENTS.md
in the current working directory - sub-folder/feature specificsFor more information on how to use AGENTS.md, see the official AGENTS.md documentation.
Cursor supports AGENTS.md
files. See the
AGENTS.md
section above for details.
Also, one can use rules to include the
content of Agents.mbt.md
file. For project rule, you can copy Agents.mbt.md
to .cursor/rules/moonbit.mdc
, and configure ways to include the
context in the front-matter of .cursor/rules/moonbit.mdc
. For example:
---
description: "MoonBit System Prompt"
globs:
alwaysApply: true
---
...
See https://docs.cursor.com/en/context/rules for more details.
Cursor CLI supports the same rules system as the IDE
Gemini-CLI reads from GEMINI.md
files for user-level/repository-specific instructions/contexts. Since
it supports @
memory import, we suggest copying Agents.mbt.md
into your
project directory and mention it in GEMINI.md
. For example, suppose you
copied Agents.mbt.md
to your project directory as moonbit.mbt.md
, then you
can add the following line to your GEMINI.md
file:
# MoonBit Language Reference
- @moonbit.mbt.md
See Memory Import Processor for more information.
Also, Gemini-CLI can be configured to use AGENTS.md
files, as per
https://agents.md:
How do I configure Gemini CLI?
Configure Gemini CLI to use AGENTS.md in .gemini/settings.json:
{ "contextFileName": "AGENTS.md" }
VS Code Copilot experimentally supports AGENTS.md
.
When working with multi-language projects, you may want to limit the scope
of the system prompt to specifically MoonBit-related files. You can do this by
creating a .github/instructions/moonbit.instructions.md
file with the
following content:
---
applyTo: "**/*.mbt,**/*.mbti,**/moon.mod.json,**/moon.pkg.json,**/*.mbt.md"
---
[Content of Agents.mbt.md]