home / skills / bdambrosio / cognitive_workbench / mc-craft

This skill crafts Minecraft items using the Mineflayer recipe system, leveraging available materials to produce desired items efficiently.

npx playbooks add skill bdambrosio/cognitive_workbench --skill mc-craft

Review the files below or copy the command above to add this skill to your agents.

Files (2)
Skill.md
1.5 KB
---
name: mc-craft
type: python
description: "Perform crafting via Mineflayer recipe system. Returns success/failure"
---

# Minecraft Craft Tool

Performs crafting using Mineflayer recipe system. Crafts items from inventory materials according to Minecraft recipes.

## Purpose

Item crafting for tool creation, material processing, and item production. Uses available inventory materials to craft items.

## Input

- `value`: Recipe/item name (preferred)
- `recipe`: Recipe/item name (alternative to value)
- `count`: Integer (optional, default: `1`)

## Output

Returns uniform_return format with:
- `value`: Text summary (success/failure message)
- `data`: Structured data dict (machine-readable). Key fields:
  - `success`: Boolean
  - `item`: String (item that was crafted)
  - `count`: Integer (number of items crafted)

## Behavior & Performance

- Uses Mineflayer recipe system
- Requires appropriate materials in inventory
- Fails if materials insufficient or recipe invalid
- May require crafting table for complex recipes

## Guidelines

- Use `mc-inventory` first to check available materials
- Item name must match Minecraft item names (e.g., "minecraft:stick", "minecraft:wooden_pickaxe")
- Some recipes require crafting table - use `mc-open` on crafting table first
- Count parameter allows crafting multiple items at once

## Usage Examples

Craft single item:
```json
{"type":"mc-craft","recipe":"minecraft:stick","count":4,"out":"$craft"}
```

Craft tool:
```json
{"type":"mc-craft","value":"minecraft:wooden_pickaxe","count":1,"out":"$tool"}
```

Overview

This skill performs in-game crafting using the Mineflayer recipe system. It attempts to craft the requested Minecraft item using materials in the bot’s inventory and returns a clear success or failure result. The skill supports crafting counts and reports machine-readable output for automation.

How this skill works

The skill accepts a recipe or item name and an optional count, then queries the Mineflayer recipe system to perform the craft. It checks inventory materials and uses a crafting table if required (the table must be opened beforehand for table-only recipes). On completion it returns a structured result indicating success, the item crafted, and the number produced.

When to use it

  • Automate creation of tools, blocks, or consumables from inventory materials
  • Batch-crafting multiple items (using the count parameter)
  • Integrating crafting into larger automation flows or bots
  • When you have confirmed available materials via an inventory check

Best practices

  • Run an inventory check (mc-inventory) before crafting to avoid wasted attempts
  • Use exact Minecraft item names (e.g., "minecraft:stick") for reliable matching
  • Open a crafting table (mc-open) first for recipes that require it
  • Specify count only when you have enough materials to craft multiple items
  • Handle failure responses programmatically to trigger material gathering or alternative actions

Example use cases

  • Craft 4 sticks from wood using recipe: {"type":"mc-craft","recipe":"minecraft:stick","count":4}
  • Produce a wooden pickaxe for mining: {"type":"mc-craft","value":"minecraft:wooden_pickaxe"}
  • Batch-create torches or food items as part of a base setup routine
  • Embed crafting step in automation scripts that gather materials, then craft the required items

FAQ

What input fields are required?

Provide a recipe or value with the Minecraft item name. Count is optional and defaults to 1.

What happens if materials are missing?

The skill returns a failure in the structured data. Use inventory checks to confirm materials before calling the skill.