moincraft
๐ง Bot Skills
Mineflayer skill taxonomy, retrieval, interruptibility, mode gates, and dynamic action generation.
Moincraft bot skills are JavaScript async functions exposed to the LLM runtime through docs, embeddings, and retrieval.
Skill taxonomy#
| Category | Examples | Purpose |
|---|---|---|
| Crafting | craftRecipe, smeltItem |
Material transformation. |
| Harvesting | collectBlock, breakBlockAt, digDown |
Resource acquisition. |
| Building | placeBlock, tillAndSow |
World modification/agriculture. |
| Combat | attackNearest, defendSelf, avoidEnemies |
PvE/PvP survival. |
| Inventory | equip, discard, putInChest, takeFromChest |
Container and equipment I/O. |
| Survival | consume, goToBed, autoLight |
Health, hunger, sleep, light. |
| Navigation | goToPosition, goToPlayer, followPlayer |
Movement/pathfinding goals. |
| Social | giveToPlayer, tradeWithVillager |
Player/NPC interaction. |
| Mechanism | useDoor, activateNearestBlock |
Interactive blocks/redstone. |
| Utility | wait, stay, useToolOn |
Timing/control helpers. |
Key patterns#
- Semantic retrieval:
SkillLibrary.getRelevantSkillDocs()ranks docs by embedding similarity with word-overlap fallback. - Interruptibility: long-running skills check interrupt flags so
!stopcan win. - Always-show basics: core primitives such as
placeBlock,wait, andbreakBlockAtare always available. - Mode gates: skills can pause autonomous modes while a controlled action runs.
- Dynamic code:
!newAction(description)produces a linted, sandboxed Mineflayer action with relevant skill docs injected.
Contract#
async function skillName(bot, ...params) {
// bot is the first parameter
// check interruption for long loops
// pause/unpause conflicting modes
// log action results
// return success/failure
}
Sources: moincraft/SKILLS.md, moincraft/docs/moincraft-stack-cheatsheet.md.