Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

minecraft-datapack

FreeRuns bundled scriptsNot checked

Create, edit, and debug vanilla Minecraft 26.x and 1.21.x datapacks, including functions, advancements, recipes, loot tables, predicates, tags, and pack…

Jahrome907by Jahrome907★ 220 GitHub stars

About this skill

Minecraft Datapack Skill

Inspect pack.mcmeta and the target Minecraft version before editing. Preserve an existing target unless migration is requested; metadata numbers alone do not make older command or registry schemas compatible. Check the edited files with the bundled validator and test in-game when available.

Skill Scope

Routing Boundaries

  • Use when: the deliverable is datapack files (pack.mcmeta, data/...) and .mcfunction/JSON content.
  • Do not use when: the request is command-only snippets not tied to a datapack file tree (minecraft-commands-scripting).
  • Do not use when: the request requires loader APIs, Java code, or runtime mod behavior (minecraft-modding).

Pack Metadata

Minecraft Version Preferred pack metadata
1.21 / 1.21.1 pack_format: 48
1.21.2 / 1.21.3 pack_format: 57
1.21.4 pack_format: 61
1.21.5 pack_format: 71
1.21.6 pack_format: 80
1.21.7 / 1.21.8 pack_format: 81
1.21.9 / 1.21.10 min_format: [88, 0], max_format: [88, 0]
1.21.11 min_format: [94, 1], max_format: [94, 1]
26.1 min_format: [101, 1], max_format: [101, 1]
26.2 min_format: [107, 1], max_format: [107, 1]
26.3 min_format: [121, 0], max_format: [121, 0]

Use pack_format for a legacy-only target through data pack format 81. Starting with data pack format 82 in 1.21.9, define both explicit min_format and max_format values. A range that includes a legacy format below 82 must also retain pack_format and supported_formats; do not include supported_formats for a modern-only range. For a legacy-compatible range, supported_formats may be one integer, a two-integer inclusive range, or an object with integer min_inclusive and max_inclusive fields. For exact patch targeting, use [major, minor] arrays for both min_format and max_format, including .0 versions such as [88, 0]. A single integer is equivalent to [major, 0] for min_format, while a single integer in max_format allows any minor version on that major line. Do not write decimal JSON numbers such as 94.1.

Keep pack.mcmeta exact for the patch you target instead of trying to span the multiple Minecraft releases with one metadata block.


Directory Layout

my-datapack/
├── pack.mcmeta
└── data/
    ├── <namespace>/           ← use your pack's name (e.g., mypack)
    │   ├── function/
    │   │   ├── main.mcfunction
    │   │   └── tick.mcfunction
    │   ├── advancement/
    │   │   └── custom_advancement.json
    │   ├── recipe/
    │   │   └── custom_recipe.json
    │   ├── loot_table/
    │   │   └── custom_loot.json
    │   ├── predicate/
    │   │   └── is_night.json
    │   ├── item_modifier/
    │   │   └── add_name.json
    │   └── tags/
    │       ├── block/
    │       │   └── climbable.json
    │       ├── entity_type/
    │       │   └── bosses.json
    │       └── function/
    │           └── custom_flow.json  ← manually invoked tag
    └── minecraft/
        └── tags/function/
            ├── load.json             ← engine tag; runs on /reload
            └── tick.json             ← engine tag; runs every game tick

pack.mcmeta

1.21.8 and earlier

{
  "pack": {
    "pack_format": 81,
    "description": "My Custom Datapack v1.0"
  }
}

Deliberate legacy-to-modern compatibility range

Use this form only when the pack actually supports both sides of the format-82 boundary. Mojang requires the retained legacy fields for this range.

{
  "pack": {
    "pack_format": 81,
    "supported_formats": [81, 88],
    "min_format": [81],
    "max_format": [88],
    "description": "My compatible datapack"
  }
}

1.21.9 / 1.21.10

{
  "pack": {
    "min_format": [88, 0],
    "max_format": [88, 0],
    "description": "My Custom Datapack v1.0"
  }
}

1.21.11

{
  "pack": {
    "min_format": [94, 1],
    "max_format": [94, 1],
    "description": "My Custom Datapack v1.0"
  }
}

26.3

{
  "pack": {
    "min_format": [121, 0],
    "max_format": [121, 0],
    "description": "My Custom Datapack v1.0"
  }
}

Function Tags (load / tick)

The engine recognizes the minecraft:load and minecraft:tick tags, so these files must use the minecraft namespace. A load.json or tick.json in a custom namespace is a valid custom tag name, but it has no automatic behavior.

data/minecraft/tags/function/load.json

{
  "values": [
    "<namespace>:setup"
  ]
}

data/minecraft/tags/function/tick.json

{
  "values": [
    "<namespace>:tick"
  ]
}

data/<namespace>/function/setup.mcfunction

# Runs once on /reload
scoreboard objectives add deaths deathCount
scoreboard objectives add kills playerKillCount
tellraw @a {"text":"[
Full SKILL.md on GitHub

Install minecraft-datapack in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

references/data-examples.mdscripts/jq-shim.mjsscripts/validate-datapack.sh

FAQ

What does the minecraft-datapack skill do?

Create, edit, and debug vanilla Minecraft 26.x and 1.21.x datapacks, including functions, advancements, recipes, loot tables, predicates, tags, and pack metadata. Use when the deliverable is a datapack file tree without Java or loader APIs.

How do I install the minecraft-datapack skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the minecraft-datapack skill run scripts?

Yes, this skill bundles executable scripts. Review the source before installing.

Related skills

Compare minecraft-datapack with