[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6D2RFBBBQM00KGTE0DF8NTY":3,"skill-same:01M6D2RFBBBQM00KGTE0DF8NTY":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M6D2RFBBBQM00KGTE0DF8NTY","minecraft-datapack",null,"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.","Jahrome907\u002Fminecraft-agent-skills","Jahrome907","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F222458345?v=4","01M6D2JFFY1EQCC572G6G3X1R2","Joe ","01M6D2JFS2EE87QN8QCFVFY6M8",197,"MIT","https:\u002F\u002Fgithub.com\u002FJahrome907\u002Fminecraft-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fminecraft-codex-skills\u002Fskills\u002Fminecraft-datapack\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30],"minecraft","minecraft datapack","debug","create","java","metadata","file","file tree","edit","use","loot","functions","2026-11-10 10:12:30",false,"---\nname: minecraft-datapack\ndescription: \"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.\"\n---\n\n# Minecraft Datapack Skill\n\nInspect `pack.mcmeta` and the target Minecraft version before editing. Preserve\nan existing target unless migration is requested; metadata numbers alone do not\nmake older command or registry schemas compatible. Check the edited files with\nthe bundled validator and test in-game when available.\n\n## Skill Scope\n\n### Routing Boundaries\n- `Use when`: the deliverable is datapack files (`pack.mcmeta`, `data\u002F...`) and `.mcfunction`\u002FJSON content.\n- `Do not use when`: the request is command-only snippets not tied to a datapack file tree (`minecraft-commands-scripting`).\n- `Do not use when`: the request requires loader APIs, Java code, or runtime mod behavior (`minecraft-modding`).\n\n---\n\n## Pack Metadata\n\n| Minecraft Version | Preferred `pack` metadata |\n|-------------------|---------------------------|\n| 1.21 \u002F 1.21.1     | `pack_format: 48` |\n| 1.21.2 \u002F 1.21.3   | `pack_format: 57` |\n| 1.21.4            | `pack_format: 61` |\n| 1.21.5            | `pack_format: 71` |\n| 1.21.6            | `pack_format: 80` |\n| 1.21.7 \u002F 1.21.8   | `pack_format: 81` |\n| 1.21.9 \u002F 1.21.10  | `min_format: [88, 0]`, `max_format: [88, 0]` |\n| 1.21.11           | `min_format: [94, 1]`, `max_format: [94, 1]` |\n| 26.1              | `min_format: [101, 1]`, `max_format: [101, 1]` |\n| 26.2              | `min_format: [107, 1]`, `max_format: [107, 1]` |\n| 26.3              | `min_format: [121, 0]`, `max_format: [121, 0]` |\n\nUse `pack_format` for a legacy-only target through data pack format 81. Starting\nwith data pack format 82 in 1.21.9, define both explicit `min_format` and\n`max_format` values. A range that includes a legacy format below 82 must also\nretain `pack_format` and `supported_formats`; do not include\n`supported_formats` for a modern-only range.\nFor a legacy-compatible range, `supported_formats` may be one integer, a\ntwo-integer inclusive range, or an object with integer `min_inclusive` and\n`max_inclusive` fields.\nFor exact patch targeting, use `[major, minor]` arrays for both `min_format` and\n`max_format`, including `.0` versions such as `[88, 0]`. A single integer is\nequivalent to `[major, 0]` for `min_format`, while a single integer in\n`max_format` allows any minor version on that major line. Do not write decimal\nJSON numbers such as `94.1`.\n\nKeep `pack.mcmeta` exact for the patch you target instead of trying to span the\nmultiple Minecraft releases with one metadata block.\n\n---\n\n## Directory Layout\n\n```\nmy-datapack\u002F\n├── pack.mcmeta\n└── data\u002F\n    ├── \u003Cnamespace>\u002F           ← use your pack's name (e.g., mypack)\n    │   ├── function\u002F\n    │   │   ├── main.mcfunction\n    │   │   └── tick.mcfunction\n    │   ├── advancement\u002F\n    │   │   └── custom_advancement.json\n    │   ├── recipe\u002F\n    │   │   └── custom_recipe.json\n    │   ├── loot_table\u002F\n    │   │   └── custom_loot.json\n    │   ├── predicate\u002F\n    │   │   └── is_night.json\n    │   ├── item_modifier\u002F\n    │   │   └── add_name.json\n    │   └── tags\u002F\n    │       ├── block\u002F\n    │       │   └── climbable.json\n    │       ├── entity_type\u002F\n    │       │   └── bosses.json\n    │       └── function\u002F\n    │           └── custom_flow.json  ← manually invoked tag\n    └── minecraft\u002F\n        └── tags\u002Ffunction\u002F\n            ├── load.json             ← engine tag; runs on \u002Freload\n            └── tick.json             ← engine tag; runs every game tick\n```\n\n---\n\n## `pack.mcmeta`\n\n### 1.21.8 and earlier\n\n```json\n{\n  \"pack\": {\n    \"pack_format\": 81,\n    \"description\": \"My Custom Datapack v1.0\"\n  }\n}\n```\n\n### Deliberate legacy-to-modern compatibility range\n\nUse this form only when the pack actually supports both sides of the format-82\nboundary. Mojang requires the retained legacy fields for this range.\n\n```json\n{\n  \"pack\": {\n    \"pack_format\": 81,\n    \"supported_formats\": [81, 88],\n    \"min_format\": [81],\n    \"max_format\": [88],\n    \"description\": \"My compatible datapack\"\n  }\n}\n```\n\n### 1.21.9 \u002F 1.21.10\n\n```json\n{\n  \"pack\": {\n    \"min_format\": [88, 0],\n    \"max_format\": [88, 0],\n    \"description\": \"My Custom Datapack v1.0\"\n  }\n}\n```\n\n### 1.21.11\n\n```json\n{\n  \"pack\": {\n    \"min_format\": [94, 1],\n    \"max_format\": [94, 1],\n    \"description\": \"My Custom Datapack v1.0\"\n  }\n}\n```\n\n### 26.3\n\n```json\n{\n  \"pack\": {\n    \"min_format\": [121, 0],\n    \"max_format\": [121, 0],\n    \"description\": \"My Custom Datapack v1.0\"\n  }\n}\n```\n\n---\n\n## Function Tags (load \u002F tick)\n\nThe engine recognizes the `minecraft:load` and `minecraft:tick` tags, so these\nfiles must use the `minecraft` namespace. A `load.json` or `tick.json` in a\ncustom namespace is a valid custom tag name, but it has no automatic behavior.\n\n### `data\u002Fminecraft\u002Ftags\u002Ffunction\u002Fload.json`\n```json\n{\n  \"values\": [\n    \"\u003Cnamespace>:setup\"\n  ]\n}\n```\n\n### `data\u002Fminecraft\u002Ftags\u002Ffunction\u002Ftick.json`\n```json\n{\n  \"values\": [\n    \"\u003Cnamespace>:tick\"\n  ]\n}\n```\n\n### `data\u002F\u003Cnamespace>\u002Ffunction\u002Fsetup.mcfunction`\n```mcfunction\n# Runs once on \u002Freload\nscoreboard objectives add deaths deathCount\nscoreboard objectives add kills playerKillCount\ntellraw @a {\"text\":\"[MyPack] Loaded!\",\"color\":\"green\"}\n```\n\n### `data\u002F\u003Cnamespace>\u002Ffunction\u002Ftick.mcfunction`\n```mcfunction\n# Runs every tick — KEEP THIS SHORT\n# Only put fast, targeted operations here\nexecute as @a[scores={deaths=1..}] run function mypack:on_death_check\n```\n\n---\n\n## Commands and Function Syntax\n\n### Execute subcommands (datapack-specific patterns)\n```mcfunction\n# Chained execute — common datapack pattern for conditional per-player logic\nexecute as @a[gamemode=!spectator] at @s if block ~ ~-1 ~ #minecraft:logs run give @s minecraft:apple\n\n# store result into score (bridge between NBT world and scoreboard state)\nexecute store result score @s mypack.health run data get entity @s Health\n\n# in: run logic in another dimension\nexecute in minecraft:the_nether run say This runs in the Nether\n```\n\n### Storage NBT (datapack-specific global state)\n```mcfunction\n# Storage is the datapack-native key-value store — persists across \u002Freload\ndata modify storage mypack:data config.difficulty set value \"hard\"\ndata get storage mypack:data config.difficulty\n\n# Copy live entity data into storage for macro use or cross-function state\ndata modify storage mypack:log last_player_pos set from entity @s Pos\n```\n\nFor full command syntax, selectors, and scoreboard operations see the\n[Minecraft Wiki — Commands](https:\u002F\u002Fminecraft.wiki\u002Fw\u002FCommands) reference.\nThe `minecraft-commands-scripting` skill covers command-only work in depth.\n\n---\n\n## Macros (1.20.2+)\n\nMacro functions let you pass dynamic arguments to a function.\n\n### Define a macro function (`data\u002Fmypack\u002Ffunction\u002Fgreet.mcfunction`)\n```mcfunction\n# Macro argument: $(name)\n$tellraw @a {\"text\":\"Welcome $(name)!\",\"color\":\"gold\"}\n$scoreboard players set $(name) points 0\n```\n\n### Call with `run function` + `with`\n```mcfunction\n# Pass values from storage\ndata modify storage mypack:tmp input set value {name:\"Steve\"}\nfunction mypack:greet with storage mypack:tmp input\n\n```\n\n---\n\n## Registry data examples\n\nRead [references\u002Fdata-examples.md](references\u002Fdata-examples.md) when authoring\nadvancements, recipes, loot tables, predicates, or tags. Load only the relevant\nsection and keep existing namespaces and version targets.\n\n## Worldgen Overrides\n\n### Override biome noise (`data\u002Fminecraft\u002Fworldgen\u002Fnoise_settings\u002Foverworld.json`)\nEdit inside an existing copy — do NOT create from scratch without the full JSON.\nGet the vanilla version from the Minecraft jar: `jar xf minecraft.jar data\u002F`.\n\n### Override a biome's spawn costs (through 26.2)\n\nFor 26.3, use the biome's `minecraft:gameplay\u002Fnatural_mob_spawns` environment\nattribute instead; the old top-level `spawn_costs` field was removed.\n```json\n{\n  \"spawn_costs\": {\n    \"minecraft:zombie\": {\n      \"energy_budget\": 0.12,\n      \"charge\": 0.7\n    }\n  }\n}\n```\n\n---\n\n## Installation & Testing\n\nPlace the pack folder or ZIP under the world's `datapacks\u002F` directory, with\n`pack.mcmeta` at its root. Then use these in-game commands:\n\n```text\n\u002Fdatapack list\n\u002Fdatapack enable \"file\u002Fmy-datapack\"\n\u002Fdatapack disable \"file\u002Fmy-datapack\"\n\u002Freload\n```\n\n### Development workflow\n1. Edit `.mcfunction` or `.json` files\n2. Run the bundled validator to catch JSON and path errors before loading:\n   ```bash\n   .\u002Fscripts\u002Fvalidate-datapack.sh --root \u002Fpath\u002Fto\u002Fdatapack\n   ```\n3. If errors, fix and re-validate until clean\n4. Run `\u002Freload` in-game (or `\u002Fminecraft:reload` if a mod intercepts it)\n5. Test with target command (e.g., `\u002Ffunction mypack:setup`, trigger an advancement)\n6. Check `latest.log` for runtime errors (missing references, bad selectors)\n\n---\n\n## Common Errors\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| `Unknown or invalid command` | Syntax error in function | Check whitespace, selector, trailing space |\n| `Datapack did not load` | Invalid JSON in any file | Validate with `jq . \u003C file.json` |\n| `pack metadata mismatch` | Wrong `pack_format` or `min_format` \u002F `max_format` values | Update `pack.mcmeta` for the exact Minecraft release |\n| Function not running on tick | Missing engine tick tag or wrong namespace | Check `data\u002Fminecraft\u002Ftags\u002Ffunction\u002Ftick.json` |\n| Macro error | `$` line but no `with` | Provide `with storage\u002Fentity\u002Fblock` |\n\n## Validator Script\n\nUse the bundled validator script before shipping a datapack update:\n\n```bash\n# Run from the installed skill directory (for example `.codex\u002Fskills\u002Fminecraft-datapack`):\n.\u002Fscripts\u002Fvalidate-datapack.sh --root \u002Fpath\u002Fto\u002Fdatapack\n\n# Strict mode treats warnings as failures:\n.\u002Fscripts\u002Fvalidate-datapack.sh --root \u002Fpath\u002Fto\u002Fdatapack --strict\n```\n\nWhat it checks:\n- JSON validity for `pack.mcmeta` and `data\u002F**\u002F*.json`\n- Legacy pluralized path mistakes for loot tables, functions, and block\u002Fitem\u002Ffunction tags\n- `data\u002Fminecraft\u002Ftags\u002Ffunction\u002Fload.json` and `tick.json` references resolve to local `.mcfunction` files\n- custom-namespace `load.json` and `tick.json` names, which are valid but do not run automatically\n\n---\n\n## References\n\n- Minecraft Wiki — Data Pack: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FData_pack\n- Minecraft Java Edition 1.21.9 release notes: https:\u002F\u002Fwww.minecraft.net\u002Fen-us\u002Farticle\u002Fminecraft-java-edition-1-21-9\n- Minecraft Wiki — Function: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FFunction_(Java_Edition)\n- Minecraft Wiki — Commands: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FCommands\n- Pack format history: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FPack_format\n- NBT format: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FNBT_format\n- Predicate conditions: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FPredicate\n- Loot table format: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FLoot_table\n\n- [Mojang: Java Edition 26.3](https:\u002F\u002Fwww.minecraft.net\u002Fen-us\u002Farticle\u002Fminecraft-java-edition-26-3)\n","# Minecraft Datapack Skill\n\nInspect `pack.mcmeta` and the target Minecraft version before editing. Preserve\nan existing target unless migration is requested; metadata numbers alone do not\nmake older command or registry schemas compatible. Check the edited files with\nthe bundled validator and test in-game when available.\n\n## Skill Scope\n\n### Routing Boundaries\n- `Use when`: the deliverable is datapack files (`pack.mcmeta`, `data\u002F...`) and `.mcfunction`\u002FJSON content.\n- `Do not use when`: the request is command-only snippets not tied to a datapack file tree (`minecraft-commands-scripting`).\n- `Do not use when`: the request requires loader APIs, Java code, or runtime mod behavior (`minecraft-modding`).\n\n---\n\n## Pack Metadata\n\n| Minecraft Version | Preferred `pack` metadata |\n|-------------------|---------------------------|\n| 1.21 \u002F 1.21.1     | `pack_format: 48` |\n| 1.21.2 \u002F 1.21.3   | `pack_format: 57` |\n| 1.21.4            | `pack_format: 61` |\n| 1.21.5            | `pack_format: 71` |\n| 1.21.6            | `pack_format: 80` |\n| 1.21.7 \u002F 1.21.8   | `pack_format: 81` |\n| 1.21.9 \u002F 1.21.10  | `min_format: [88, 0]`, `max_format: [88, 0]` |\n| 1.21.11           | `min_format: [94, 1]`, `max_format: [94, 1]` |\n| 26.1              | `min_format: [101, 1]`, `max_format: [101, 1]` |\n| 26.2              | `min_format: [107, 1]`, `max_format: [107, 1]` |\n| 26.3              | `min_format: [121, 0]`, `max_format: [121, 0]` |\n\nUse `pack_format` for a legacy-only target through data pack format 81. Starting\nwith data pack format 82 in 1.21.9, define both explicit `min_format` and\n`max_format` values. A range that includes a legacy format below 82 must also\nretain `pack_format` and `supported_formats`; do not include\n`supported_formats` for a modern-only range.\nFor a legacy-compatible range, `supported_formats` may be one integer, a\ntwo-integer inclusive range, or an object with integer `min_inclusive` and\n`max_inclusive` fields.\nFor exact patch targeting, use `[major, minor]` arrays for both `min_format` and\n`max_format`, including `.0` versions such as `[88, 0]`. A single integer is\nequivalent to `[major, 0]` for `min_format`, while a single integer in\n`max_format` allows any minor version on that major line. Do not write decimal\nJSON numbers such as `94.1`.\n\nKeep `pack.mcmeta` exact for the patch you target instead of trying to span the\nmultiple Minecraft releases with one metadata block.\n\n---\n\n## Directory Layout\n\n```\nmy-datapack\u002F\n├── pack.mcmeta\n└── data\u002F\n    ├── \u003Cnamespace>\u002F           ← use your pack's name (e.g., mypack)\n    │   ├── function\u002F\n    │   │   ├── main.mcfunction\n    │   │   └── tick.mcfunction\n    │   ├── advancement\u002F\n    │   │   └── custom_advancement.json\n    │   ├── recipe\u002F\n    │   │   └── custom_recipe.json\n    │   ├── loot_table\u002F\n    │   │   └── custom_loot.json\n    │   ├── predicate\u002F\n    │   │   └── is_night.json\n    │   ├── item_modifier\u002F\n    │   │   └── add_name.json\n    │   └── tags\u002F\n    │       ├── block\u002F\n    │       │   └── climbable.json\n    │       ├── entity_type\u002F\n    │       │   └── bosses.json\n    │       └── function\u002F\n    │           └── custom_flow.json  ← manually invoked tag\n    └── minecraft\u002F\n        └── tags\u002Ffunction\u002F\n            ├── load.json             ← engine tag; runs on \u002Freload\n            └── tick.json             ← engine tag; runs every game tick\n```\n\n---\n\n## `pack.mcmeta`\n\n### 1.21.8 and earlier\n\n```json\n{\n  \"pack\": {\n    \"pack_format\": 81,\n    \"description\": \"My Custom Datapack v1.0\"\n  }\n}\n```\n\n### Deliberate legacy-to-modern compatibility range\n\nUse this form only when the pack actually supports both sides of the format-82\nboundary. Mojang requires the retained legacy fields for this range.\n\n```json\n{\n  \"pack\": {\n    \"pack_format\": 81,\n    \"supported_formats\": [81, 88],\n    \"min_format\": [81],\n    \"max_format\": [88],\n    \"description\": \"My compatible datapack\"\n  }\n}\n```\n\n### 1.21.9 \u002F 1.21.10\n\n```json\n{\n  \"pack\": {\n    \"min_format\": [88, 0],\n    \"max_format\": [88, 0],\n    \"description\": \"My Custom Datapack v1.0\"\n  }\n}\n```\n\n### 1.21.11\n\n```json\n{\n  \"pack\": {\n    \"min_format\": [94, 1],\n    \"max_format\": [94, 1],\n    \"description\": \"My Custom Datapack v1.0\"\n  }\n}\n```\n\n### 26.3\n\n```json\n{\n  \"pack\": {\n    \"min_format\": [121, 0],\n    \"max_format\": [121, 0],\n    \"description\": \"My Custom Datapack v1.0\"\n  }\n}\n```\n\n---\n\n## Function Tags (load \u002F tick)\n\nThe engine recognizes the `minecraft:load` and `minecraft:tick` tags, so these\nfiles must use the `minecraft` namespace. A `load.json` or `tick.json` in a\ncustom namespace is a valid custom tag name, but it has no automatic behavior.\n\n### `data\u002Fminecraft\u002Ftags\u002Ffunction\u002Fload.json`\n```json\n{\n  \"values\": [\n    \"\u003Cnamespace>:setup\"\n  ]\n}\n```\n\n### `data\u002Fminecraft\u002Ftags\u002Ffunction\u002Ftick.json`\n```json\n{\n  \"values\": [\n    \"\u003Cnamespace>:tick\"\n  ]\n}\n```\n\n### `data\u002F\u003Cnamespace>\u002Ffunction\u002Fsetup.mcfunction`\n```mcfunction\n# Runs once on \u002Freload\nscoreboard objectives add deaths deathCount\nscoreboard objectives add kills playerKillCount\ntellraw @a {\"text\":\"[MyPack] Loaded!\",\"color\":\"green\"}\n```\n\n### `data\u002F\u003Cnamespace>\u002Ffunction\u002Ftick.mcfunction`\n```mcfunction\n# Runs every tick — KEEP THIS SHORT\n# Only put fast, targeted operations here\nexecute as @a[scores={deaths=1..}] run function mypack:on_death_check\n```\n\n---\n\n## Commands and Function Syntax\n\n### Execute subcommands (datapack-specific patterns)\n```mcfunction\n# Chained execute — common datapack pattern for conditional per-player logic\nexecute as @a[gamemode=!spectator] at @s if block ~ ~-1 ~ #minecraft:logs run give @s minecraft:apple\n\n# store result into score (bridge between NBT world and scoreboard state)\nexecute store result score @s mypack.health run data get entity @s Health\n\n# in: run logic in another dimension\nexecute in minecraft:the_nether run say This runs in the Nether\n```\n\n### Storage NBT (datapack-specific global state)\n```mcfunction\n# Storage is the datapack-native key-value store — persists across \u002Freload\ndata modify storage mypack:data config.difficulty set value \"hard\"\ndata get storage mypack:data config.difficulty\n\n# Copy live entity data into storage for macro use or cross-function state\ndata modify storage mypack:log last_player_pos set from entity @s Pos\n```\n\nFor full command syntax, selectors, and scoreboard operations see the\n[Minecraft Wiki — Commands](https:\u002F\u002Fminecraft.wiki\u002Fw\u002FCommands) reference.\nThe `minecraft-commands-scripting` skill covers command-only work in depth.\n\n---\n\n## Macros (1.20.2+)\n\nMacro functions let you pass dynamic arguments to a function.\n\n### Define a macro function (`data\u002Fmypack\u002Ffunction\u002Fgreet.mcfunction`)\n```mcfunction\n# Macro argument: $(name)\n$tellraw @a {\"text\":\"Welcome $(name)!\",\"color\":\"gold\"}\n$scoreboard players set $(name) points 0\n```\n\n### Call with `run function` + `with`\n```mcfunction\n# Pass values from storage\ndata modify storage mypack:tmp input set value {name:\"Steve\"}\nfunction mypack:greet with storage mypack:tmp input\n\n```\n\n---\n\n## Registry data examples\n\nRead [references\u002Fdata-examples.md](references\u002Fdata-examples.md) when authoring\nadvancements, recipes, loot tables, predicates, or tags. Load only the relevant\nsection and keep existing namespaces and version targets.\n\n## Worldgen Overrides\n\n### Override biome noise (`data\u002Fminecraft\u002Fworldgen\u002Fnoise_settings\u002Foverworld.json`)\nEdit inside an existing copy — do NOT create from scratch without the full JSON.\nGet the vanilla version from the Minecraft jar: `jar xf minecraft.jar data\u002F`.\n\n### Override a biome's spawn costs (through 26.2)\n\nFor 26.3, use the biome's `minecraft:gameplay\u002Fnatural_mob_spawns` environment\nattribute instead; the old top-level `spawn_costs` field was removed.\n```json\n{\n  \"spawn_costs\": {\n    \"minecraft:zombie\": {\n      \"energy_budget\": 0.12,\n      \"charge\": 0.7\n    }\n  }\n}\n```\n\n---\n\n## Installation & Testing\n\nPlace the pack folder or ZIP under the world's `datapacks\u002F` directory, with\n`pack.mcmeta` at its root. Then use these in-game commands:\n\n```text\n\u002Fdatapack list\n\u002Fdatapack enable \"file\u002Fmy-datapack\"\n\u002Fdatapack disable \"file\u002Fmy-datapack\"\n\u002Freload\n```\n\n### Development workflow\n1. Edit `.mcfunction` or `.json` files\n2. Run the bundled validator to catch JSON and path errors before loading:\n   ```bash\n   .\u002Fscripts\u002Fvalidate-datapack.sh --root \u002Fpath\u002Fto\u002Fdatapack\n   ```\n3. If errors, fix and re-validate until clean\n4. Run `\u002Freload` in-game (or `\u002Fminecraft:reload` if a mod intercepts it)\n5. Test with target command (e.g., `\u002Ffunction mypack:setup`, trigger an advancement)\n6. Check `latest.log` for runtime errors (missing references, bad selectors)\n\n---\n\n## Common Errors\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| `Unknown or invalid command` | Syntax error in function | Check whitespace, selector, trailing space |\n| `Datapack did not load` | Invalid JSON in any file | Validate with `jq . \u003C file.json` |\n| `pack metadata mismatch` | Wrong `pack_format` or `min_format` \u002F `max_format` values | Update `pack.mcmeta` for the exact Minecraft release |\n| Function not running on tick | Missing engine tick tag or wrong namespace | Check `data\u002Fminecraft\u002Ftags\u002Ffunction\u002Ftick.json` |\n| Macro error | `$` line but no `with` | Provide `with storage\u002Fentity\u002Fblock` |\n\n## Validator Script\n\nUse the bundled validator script before shipping a datapack update:\n\n```bash\n# Run from the installed skill directory (for example `.codex\u002Fskills\u002Fminecraft-datapack`):\n.\u002Fscripts\u002Fvalidate-datapack.sh --root \u002Fpath\u002Fto\u002Fdatapack\n\n# Strict mode treats warnings as failures:\n.\u002Fscripts\u002Fvalidate-datapack.sh --root \u002Fpath\u002Fto\u002Fdatapack --strict\n```\n\nWhat it checks:\n- JSON validity for `pack.mcmeta` and `data\u002F**\u002F*.json`\n- Legacy pluralized path mistakes for loot tables, functions, and block\u002Fitem\u002Ffunction tags\n- `data\u002Fminecraft\u002Ftags\u002Ffunction\u002Fload.json` and `tick.json` references resolve to local `.mcfunction` files\n- custom-namespace `load.json` and `tick.json` names, which are valid but do not run automatically\n\n---\n\n## References\n\n- Minecraft Wiki — Data Pack: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FData_pack\n- Minecraft Java Edition 1.21.9 release notes: https:\u002F\u002Fwww.minecraft.net\u002Fen-us\u002Farticle\u002Fminecraft-java-edition-1-21-9\n- Minecraft Wiki — Function: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FFunction_(Java_Edition)\n- Minecraft Wiki — Commands: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FCommands\n- Pack format history: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FPack_format\n- NBT format: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FNBT_format\n- Predicate conditions: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FPredicate\n- Loot table format: https:\u002F\u002Fminecraft.wiki\u002Fw\u002FLoot_table\n\n- [Mojang: Java Edition 26.3](https:\u002F\u002Fwww.minecraft.net\u002Fen-us\u002Farticle\u002Fminecraft-java-edition-26-3)\n",{"name":5,"description":7},"main","22d61ce6b7a0c5f215008824aa6b94ecc73f2a43","plugins\u002Fminecraft-codex-skills\u002Fskills\u002Fminecraft-datapack",11,"https:\u002F\u002Fgithub.com\u002FJahrome907\u002Fminecraft-agent-skills","https:\u002F\u002Fgithub.com\u002FJahrome907","joe-o.com","Product engineer building field tools, workflow automation, and polished web applications.","2026-10-30 08:19:45",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add Jahrome907\u002Fminecraft-agent-skills --skill minecraft-datapack",{"tool":51,"command":52},"bunx","bunx skills add Jahrome907\u002Fminecraft-agent-skills --skill minecraft-datapack",{"tool":54,"command":55},"pnpm","pnpm dlx skills add Jahrome907\u002Fminecraft-agent-skills --skill minecraft-datapack","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJahrome907\u002Fminecraft-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fminecraft-codex-skills\u002Fskills\u002Fminecraft-datapack\u002FSKILL.md",true,[59,65,71],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fdata-examples.md","REFERENCE","参考文档",5645,"https:\u002F\u002Fgithub.com\u002FJahrome907\u002Fminecraft-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fminecraft-codex-skills\u002Fskills\u002Fminecraft-datapack\u002Freferences\u002Fdata-examples.md",{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"scripts\u002Fjq-shim.mjs","SCRIPT","脚本",10261,"https:\u002F\u002Fgithub.com\u002FJahrome907\u002Fminecraft-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fminecraft-codex-skills\u002Fskills\u002Fminecraft-datapack\u002Fscripts\u002Fjq-shim.mjs",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Fvalidate-datapack.sh",10027,"https:\u002F\u002Fgithub.com\u002FJahrome907\u002Fminecraft-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fminecraft-codex-skills\u002Fskills\u002Fminecraft-datapack\u002Fscripts\u002Fvalidate-datapack.sh",[76,92,97,109,117,124],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":31},"01M6D2TV8CBAMB70CEC19VMVX5","minecraft-ci-release","Fixture with valid workflow YAML and a warning-only glob pattern.","https:\u002F\u002Fgithub.com\u002FJahrome907\u002Fminecraft-agent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fvalidators\u002Fci-release\u002Fwarn-only\u002FSKILL.md",[],[83,19,84,85,86,87,88,89,90,91],"minecraft ci release","ci","release","fixture","pattern","only","yaml","workflow","valid",{"skillNo":93,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":31},"01M6D2TR1N9TNJPTRB66WDCY8X","https:\u002F\u002Fgithub.com\u002FJahrome907\u002Fminecraft-agent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fvalidators\u002Fci-release\u002Fvalid\u002FSKILL.md",[],[91],{"skillNo":98,"name":78,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":107,"publishedAt":31},"01M6D2TNBM97CCTYFCDKCFQ4AR","Fixture for a secretless workflow that passes strict validation.","https:\u002F\u002Fgithub.com\u002FJahrome907\u002Fminecraft-agent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fvalidators\u002Fci-release\u002Fsecretless-strict\u002FSKILL.md",[102],{"categoryNo":103,"categoryName":104,"taxonomyType":105,"taxonomyTypeDesc":106},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[83,19,84,85,86,108,90],"validation",{"skillNo":110,"name":111,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":115,"publishedAt":31},"01M6D2TJ9FX4FH1TMGKQPYNZQX","non-workflow-yaml","https:\u002F\u002Fgithub.com\u002FJahrome907\u002Fminecraft-agent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fvalidators\u002Fci-release\u002Fnon-workflow-yaml\u002FSKILL.md",[114],{"categoryNo":103,"categoryName":104,"taxonomyType":105,"taxonomyTypeDesc":106},[116,89,90],"non workflow yaml",{"skillNo":118,"name":78,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":31},"01M6D2TFE807BSXTEREYPWFY3G","Fixture with a mutable remote action reference.","https:\u002F\u002Fgithub.com\u002FJahrome907\u002Fminecraft-agent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fvalidators\u002Fci-release\u002Fmutable-action\u002FSKILL.md",[],[83,19,84,85,123,86],"reference",{"skillNo":125,"name":78,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":31},"01M6D2TBYJ0SM3B79908DH9ECE","Fixture with valid multiline flow collections in workflow YAML.","https:\u002F\u002Fgithub.com\u002FJahrome907\u002Fminecraft-agent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fvalidators\u002Fci-release\u002Fmultiline-flow\u002FSKILL.md",[],[83,85,19,84,90,89,130,86,131,91],"flow","collections"]