About minecraft-texture
minecraft-texture is a workflow skill for turning generated images into usable Minecraft pixel textures. It combines image-model generation with a local Python script that removes white backgrounds, samples color blocks, and checks output without an external service.
Key features
- 01Image-generation prompt guidance
- 02White-background removal and transparency
- 03Dominant-color sampling per block
- 0416×16 and 32×32 PNG output
- 05Programmatic texture checks
Use cases
- 01Preparing item or block textures for Minecraft
- 02Converting generated images into pixel textures
- 03Checking transparency and near-white artifacts
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ hairyf/ skills --skill minecraft-textureAfter installing, type/minecraft-texturein Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/best-practices-prompts.mdcore-script.mdcore-workflow.mdscripts/mc_texture.pyDetails
From the project READMEMinecraft Texture
Workflow modeled on the ai-kit texture tool (https://ai-kit.xingduansuzhao.com/texture): generate the texture with an image model, then post-process it into usable 16x16 / 32x32 pixel textures. The post-processing (white-background removal + color-block sampling) is implemented in
scripts/mc_texture.py— no login or external service required.
Workflow
- Generate — use an image model (e.g. the
imagegenskill) with a prompt that produces a flat front view of the item/block that fills the whole frame on a plain white background. Do NOT ask for grid lines — the pipeline converts white to transparency and samples color blocks directly. See best-practices-prompts. - Post-process — run the pipeline script:
python scripts/mc_texture.py pipeline texture.png -o out/ --sizes 16,32
This replaces the white background with transparency, samples the dominant color of every block, and writes out/texture-16x16.png and out/texture-32x32.png.
3. Verify — run python scripts/mc_texture.py check out/texture-32x32.png for a programmatic check (near-white dots, transparency ratio; no vision model needed). Rerun with a tuned --tolerance / --white-cutoff if background edges bleed or thin details disappear.
References
| Topic | Description | Reference |
|---|---|---|
| Workflow | Full generate → post-process → verify flow and placing textures into a mod/resource pack | core-workflow |
| Script reference | Commands, options, tuning, troubleshooting | core-script |
| Prompt recipes | Prompts for generating item/block textures that fill the frame on white | best-practices-prompts |