From promptcraft
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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/promptcraft:buildThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
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.
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"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.
Decide:
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.
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):
for y in range(y1, y2 + 1):
hollow_rect(x1, y, z1, x2, z2, block)
def fill_circle(cx, y, cz, radius, block):
"""Fill a solid circle at height y."""
for x in range(cx - radius, cx + radius + 1):
for z in range(cz - radius, cz + radius + 1):
if (x - cx) ** 2 + (z - cz) ** 2 <= radius ** 2:
blocks.append({"x": x, "y": y, "z": z, "block": block})
def hollow_circle(cx, y, cz, radius, block):
"""Place only the perimeter of a circle at height y."""
if radius == 0:
blocks.append({"x": cx, "y": y, "z": cz, "block": block})
return
for x in range(cx - radius, cx + radius + 1):
for z in range(cz - radius, cz + radius + 1):
dist_sq = (x - cx) ** 2 + (z - cz) ** 2
if (radius - 1) ** 2 < dist_sq <= radius ** 2:
blocks.append({"x": x, "y": y, "z": z, "block": block})
def pitched_roof(x1, z1, x2, z2, y_base, block_stair, block_cap):
"""Build a gable roof with ridge running east-west (X axis).
North slope uses facing=north stairs, south slope uses facing=south.
Ridge is capped with full blocks."""
width_z = z2 - z1 + 1
half = width_z // 2
for layer in range(half):
y = y_base + layer
# North slope
for x in range(x1, x2 + 1):
blocks.append({"x": x, "y": y, "z": z1 + layer,
"block": f"{block_stair}[facing=north,half=bottom]"})
# South slope
for x in range(x1, x2 + 1):
blocks.append({"x": x, "y": y, "z": z2 - layer,
"block": f"{block_stair}[facing=south,half=bottom]"})
# Ridge cap — fill the center to close the peak
if width_z % 2 == 1:
# Odd width: single center row of full blocks
ridge_z = z1 + half
for x in range(x1, x2 + 1):
blocks.append({"x": x, "y": y_base + half, "z": ridge_z, "block": block_cap})
# Even width: the two innermost stair rows face each other with high sides meeting —
# they already form a complete peak, no cap block needed.
# ... build logic here ...
blueprint = {
"name": "<name>",
"description": "<description>",
"version": "JE_1_21_1",
"blocks": blocks
}
output_file = os.path.join(OUTPUT_DIR, "<name>.json")
with open(output_file, "w") as f:
json.dump(blueprint, f, indent=2)
print(f"Blueprint saved: {output_file} ({len(blocks)} blocks)")
python output/<name>_generator.py
Confirm output/<name>.json was created and how many blocks it contains.
python build.py output/<name>.json
build.py will:
.schem → output/<name>.schemconfig.json is set)Tell the user:
.schem is ready and was copied to their schematics folder//schem load <name>
//paste -a
Before generating the final blueprint, verify each item:
east=true,west=true etc.)persistent=true — without it, leaves decay and vanish in-game within minutes(0,0,0) = northwest bottom corner//paste -a to strip air and blend into terrainnpx claudepluginhub cgoulart35/promptcraft --plugin promptcraftGenerates Dungeondraft battle maps with procedural terrain, rectangular rooms, corridors, and polygon layouts from scene descriptions via YAML configs.
Generates a unified modular environment kit (walls, floors, doors, pillars, arches) using a style-anchor pattern so all pieces share visual consistency. Useful when building level tilesets.
Level design fundamentals, pacing, difficulty progression, environmental storytelling, and spatial design for engaging gameplay experiences.