| name | build |
| description | Generates a Minecraft structure from a natural language description and outputs a real .schem file, automatically copied to the user's WorldEdit schematics folder. Trigger on any Minecraft building request — "/promptcraft:build a castle", "make me a village", "build a dungeon", etc. |
| argument-hint | <describe what you want to build> |
| disable-model-invocation | false |
Promptcraft — /promptcraft:build
The user wants to build something in Minecraft. Turn their description into a .schem file in their WorldEdit schematics folder, ready to paste in-game.
What $ARGUMENTS contains
The user's full natural language description — everything after /promptcraft:build. Examples:
"a medieval castle with a moat, 40x40, dark stone"
"small cozy forest cabin with a fireplace"
"egyptian pyramid, hollow inside, 30 blocks tall"
Step 1 — Read the block reference
Read CLAUDE.md in the project root. It contains the full block vocabulary, coordinate system, style palettes, and building strategies. Do this before planning anything.
Step 2 — Plan the build
Decide:
- Style — which palette fits? (Medieval, Rustic, Modern, Nether, Elven, Egyptian — or derive your own)
- Size — Small (7–15³), Medium (15–40³), Large (40–100³)
- Structure — layers, key features, interior details
- Materials — specific blocks for walls, floor, roof, accents, lighting
Tell the user your plan in 2–3 sentences before writing any code.
If the description is vague, ask one clarifying question at most (style, scale, or specific feature), then proceed.
Step 3 — Write a generator script
Always write a Python generator script for anything non-trivial — never hand-write a JSON block array.
Save the script to output/<name>_generator.py. Always create the output directory first:
import json
import os
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
OUTPUT_DIR = os.path.join(SCRIPT_DIR, "..", "output")
os.makedirs(OUTPUT_DIR, exist_ok=True)
blocks = []
def fill_rect(x1, y, z1, x2, z2, block):
for x in range(x1, x2 + 1):
for z in range(z1, z2 + 1):
blocks.append({"x": x, "y": y, "z": z, "block": block})
def hollow_rect(x1, y, z1, x2, z2, block):
for x in range(x1, x2 + 1):
for z in range(z1, z2 + 1):
if x == x1 or x == x2 or z == z1 or z == z2:
blocks.append({"x": x, "y": y, "z": z, "block": block})
def fill_box(x1, y1, z1, x2, y2, z2, block):
for y in range(y1, y2 + 1):
fill_rect(x1, y, z1, x2, z2, block)
def hollow_box(x1, y1, z1, x2, y2, z2, block):
y (y1, y2 + ):
hollow_rect(x1, y, z1, x2, z2, block)
():
x (cx - radius, cx + radius + ):
z (cz - radius, cz + radius + ):
(x - cx) ** + (z - cz) ** <= radius ** :
blocks.append({: x, : y, : z, : block})
():
radius == :
blocks.append({: cx, : y, : cz, : block})
x (cx - radius, cx + radius + ):
z (cz - radius, cz + radius + ):
dist_sq = (x - cx) ** + (z - cz) **
(radius - ) ** < dist_sq <= radius ** :
blocks.append({: x, : y, : z, : block})
():
width_z = z2 - z1 +
half = width_z //
layer (half):
y = y_base + layer
x (x1, x2 + ):
blocks.append({: x, : y, : z1 + layer,
: })
x (x1, x2 + ):
blocks.append({: x, : y, : z2 - layer,
: })
width_z % == :
ridge_z = z1 + half
x (x1, x2 + ):
blocks.append({: x, : y_base + half, : ridge_z, : block_cap})
blueprint = {
: ,
: ,
: ,
: blocks
}
output_file = os.path.join(OUTPUT_DIR, )
(output_file, ) f:
json.dump(blueprint, f, indent=)
()
Step 4 — Run the generator
python output/<name>_generator.py
Confirm output/<name>.json was created and how many blocks it contains.
Step 5 — Run build.py
python build.py output/<name>.json
build.py will:
- Validate the blueprint
- Generate the
.schem → output/<name>.schem
- Auto-copy to the user's WorldEdit schematics folder (if
config.json is set)
- Print the in-game commands
Step 6 — Report back
Tell the user:
Quality bar
- Interior detail — not just hollow shells. Add floors, lighting, furniture, ladders.
- Material variation — mix mossy/cracked/regular stone, alternate log types, etc.
- Entrances — doors need frames, arches, or steps.
- Lived-in details — flower pots, torches, barrels, crafting tables.
Pre-build checklist
Before generating the final blueprint, verify each item:
Coordinate reminder
- Origin
(0,0,0) = northwest bottom corner
- X = East (+), Y = Up (+), Z = South (+)
- Y=0 is ground level — build upward from there
- Always
//paste -a to strip air and blend into terrain