minecraft-datapack
Skill0 starsChanged 47 days agoMITView on GitHub
Write, debug, review, and modernize Minecraft Java Edition data packs — mcfunction commands, /execute chains, scoreboards, markers, display entities, NBT/SNBT, predicates, advancements, tags, loot tables, item components, worldgen, and pack.mcmeta formats. Use this skill whenever the user mentions data packs, datapacks, mcfunction, /execute, scoreboard objectives, sidebar/HUD, display entities, text_display, item_display, block_display, marker entities, NBT, SNBT, command storage, predicates, advancements, function tags, pack_format, or asks to build any map-making system, minigame, custom UI, hologram, or custom mechanic in Minecraft, even if they do not say "data pack" explicitly. Also use for pack format upgrade questions, for "why does my datapack not work", and for Russian-language requests about датапаки, маркеры, дисплеи, скоардборд/сайдбар, голограммы, кастомные предметы и механики.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- sinsine/minecraft-datapacktheir own version, first seen Oct 11, 2026
- AIKUSAN/minecraft-agent-skills-bundletheir own version, first seen Oct 3, 2026
- Jahrome907/minecraft-agent-skillstheir own version, first seen Mar 27, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- Jahrome907/minecraft-agent-skills★ 217same name
- AIKUSAN/minecraft-agent-skills-bundle★ 4same name
- sinsine/minecraft-datapack★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Ask, or read it from the project: pack.mcmeta format fields, version.json, gradle.properties, a README, or an existing min_format.
- Distinctive: line 37
If the user's version is unknown and they cannot say, write for the version their existing files already target, state that assumption in …
- Very specific: line 98
Read references/pack-structure.md for the full format table, overlays, filters, and zip rules.
- Distinctive: line 122
Never invent a command, subcommand, field, or component: If it is not in the references or a page you fetched, it does not exist.
- Very specific: line 149
Clean up what you spawn: Every summon in a tick loop without an existence guard creates duplicates.
- Distinctive: line 155
Run the bundled checker on the pack root:
- Distinctive: line 199
Every file's full contents (no "..." placeholders in commands or JSON).
- Distinctive: line 210
Treat the user's stated symptom as a hypothesis.
- Distinctive: line 217
Read only what the task needs.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Minecraft Data Pack Engineering
Data packs are a versioned data format, not a stable API. Most wrong answers here come from one of three places: code written for an older pack format, a field name guessed instead of looked up, or a mechanism chosen that cannot do the job (scoreboard polling where an advancement trigger belongs, a display entity where a marker belongs, a marker where a real entity belongs).
Work in this order: pin the version, pick the mechanism, write the files, validate.
Step 1 — pin the target version before writing anything
Ask, or read it from the project: pack.mcmeta format fields, version.json,
gradle.properties, a README, or an existing min_format. If the user gives a
version like "1.21.4" or "26.2", use it exactly; never silently target latest.
Then read references/versioning.md for the format number and the breaking changes
that apply. The features below are the ones that most often produce code that
"looks right" but fails on the user's version:
| Feature | Changed at | Consequence |
Singular data folders (function, not functions) | 1.21 / format 48 | Files load as nothing if plural |
| Item components replace item NBT | 1.20.5 / 41 | {display:{Name:...}} is dead |
| Text components are SNBT in commands, JSON in files | 1.21.5 / 71 | a component wrapped in a quoted string renders literally; a bare {"text":"x"} still parses |
pack.mcmeta uses min_format/max_format | 1.21.9 / 88 | pack_format alone is legacy |
| Gamerules are namespaced snake_case | 1.21.11 / 94.1 | doDaylightCycle → minecraft:advance_time |
/time is per-dimension, world clocks exist | 26.1 / 101.1 | /time set needs of <dimension> off-overworld |
| Block state NBT fields renamed | 26.3 / 121 | Name/Properties → id/properties |
Predicate condition renamed to type | 26.3 / 121 | Old predicate files reject |
If the user's version is unknown and they cannot say, write for the version their existing files already target, state that assumption in the answer, and keep version-sensitive constructs isolated so they are easy to change.
Step 2 — pick the mechanism, not just the command
| Goal | Use | Do not use |
| Repeated logic | .mcfunction + #minecraft:tick | command blocks |
| Per-player state | scoreboard objective, dummy criterion | NBT on players |
| World/global state | data on a marker, or storage | a physical block |
| Position anchor with no visuals | marker entity | armor stand |
| Floating text / HUD / hologram | text_display | named armor stand + CustomNameVisible |
| Beams, auras, rings, custom visuals | particle with count=0 points and velocities | big count bursts for static art |
| Animating particle art | rotate the anchor (tp @s ~ ~ ~ ~N ~) | recomputing positions in commands |
| Rendered block or item | block_display / item_display | falling block / item entity |
| Event detection (mine, craft, kill, travel) | advancement trigger with a reward function | per-tick scoreboard polling |
| Right-click with a custom item | COAS/WFOAS + minecraft.used statistic objective | item_used_on_block (never fires for inert items) |
| Hold-to-charge or consumable | consumable component + using_item / consume_item trigger | tick polling of the use key |
| Clickable spot in the world | interaction entity + player_interacted_with_entity | invisible armor stand |
| Condition shared by many commands | predicate file + /execute if predicate | copy-pasted if chains |
| Cooldown | scoreboard counting down in tick | schedule per player |
| One-shot delay | /schedule function | tick counter |
| Custom item identity | minecraft:custom_data component | display name matching |
| Player-facing UI panel | sidebar objective + numberformat/teams | title spam |
| Overworld looks different | override dimension/overworld biome_source, or individual density_function/overworld/* | replacing the whole noise_settings |
| Compat with other worldgen packs | tags in their namespace + fabric:/neoforge: load conditions | hard-coding assumptions about load order |
Explain the choice in one line when it is non-obvious. Map makers inherit whatever structure you leave behind.
Step 3 — write the pack
Layout (1.21+):
pack.mcmeta
pack.png
data/minecraft/tags/function/{load,tick}.json <- namespace is literally "minecraft"
data/<namespace>/
function/**.mcfunction
tags/function/**.json # your own function tags, referenced as #<namespace>:x
advancement/**.json
predicate/**.json
item_modifier/**.json
loot_table/**.json
recipe/**.json
structure/**.nbt
tags/<registry>/**.json
worldgen/**.json
dimension/**.json
dimension_type/**.jsonpack.mcmeta for 1.21.9+:
{"pack":{"description":"My Pack","min_format":[88,0],"max_format":[88,0]}}For 1.20.2–1.21.8 use "pack_format": N plus optional "supported_formats":[a,b].
Read references/pack-structure.md for the full format table, overlays, filters,
and zip rules.
Mandatory bootstrap — without these two files nothing runs. Both live in the
minecraft namespace, not yours:
data/minecraft/tags/function/load.json
{"values":["<ns>:init"]}data/minecraft/tags/function/tick.json
{"values":["<ns>:tick"]}A file at data/<ns>/tags/function/load.json defines #<ns>:load, which nothing
calls automatically. That is a valid way to group functions, but it is not the
bootstrap.
#minecraft:load runs before any player joins, so it cannot target @a. Create
objectives, storages, and forceload there; put player-facing work in tick.
Hard rules that prevent most broken packs
Never invent a command, subcommand, field, or component. If it is not in the references or a page you fetched, it does not exist. Say so instead of guessing.
Every function file is parsed at load time. One bad line makes the whole file
refuse to load; the error names the file and line. Check /reload output, not just
the code.
/execute context is per-branch and does not leak. as, at, positioned,
rotated, anchored, in apply only to the rest of that chain. A following line
starts from the function's original context. Store what you need.
Forking is the performance budget. as @e, at @e, positioned as @e multiply
branches. Nested forks multiply again (as @e[type=pig] at @e[type=cow] is
pigs × cows). Narrow selectors, fork once, then call a function.
Scoreboards are the only cheap numeric store. Integers only (32-bit), no floats,
no strings. Use storage for structured data and NBT, scoreboard for math and
per-entity counters.
Text component score/nbt/selector resolve once. Writing
{score:{name:"@s",objective:"hp"}} into a text display freezes the current value.
To show live numbers, rewrite the text whenever the value changes.
Display entities are client-visible entities; markers are not. Markers cost
almost nothing and are invisible; displays count toward the entity count and are
culled by view_range. Use markers for logic, displays for pixels.
Clean up what you spawn. Every summon in a tick loop without an existence
guard creates duplicates. Use unless entity @e[tag=...,distance=..N] or a
persistent tag, and provide a stop/uninstall function.
Step 4 — validate before claiming success
Run the bundled checker on the pack root:
python3 scripts/dpcheck.py path/to/pack --mc-version 1.21.9It verifies JSON parsing, pack.mcmeta format fields, folder names for the target
format, function/tag reference resolution, SNBT bracket balance, the load/tick
bootstrap path, and a set of version-mismatch patterns (legacy item NBT, JSON text
components in commands, Name/Properties block states on 26.3+, camelCase
gamerules on 1.21.11+, condition in predicates on 26.3+, item_used_on_block on
inert items). Fix every error before answering; read every warning and either fix it
or say why it is intentional.
Then walk this checklist. Each line is a defect that has actually shipped in a plausible-looking pack:
- Both hooks are at
data/minecraft/tags/function/{load,tick}.json. Aload.jsonin your own namespace runs nothing. - No component is wrapped in a quoted string (
custom_name='{"text":"x"}'), which 1.21.5+ renders literally. A bare{"text":"x"}is valid SNBT and fine. - Every
#minecraft:loadcommand works with no players online. - Every
summonis guarded, and there is auninstall/stopfunction. - Every advancement reward function that must fire more than once ends with
advancement revoke @s only <id>. - Every live number in a display or
numberformat fixedis rewritten when the value changes — not written once. - Every custom item is matched by
custom_data, not by name. - Right-click detection uses the mechanism that actually fires for that item
(
references/right-click.md). - Sidebar rows use non-
#fake holders, fit in 15 rows, and have explicit descending scores. - Objectives referenced by
scores=/if scoreare created inload. - No per-tick entity or block NBT, and no per-tick macros.
Then state the manual check the user must do, because a static checker cannot run
the game: /reload (or restart), then /function <ns>:<entry> and read the log.
List the exact commands to try and what success looks like.
Answer shape
For a build request, deliver:
- The file tree you created.
- Every file's full contents (no "..." placeholders in commands or JSON).
- The install step (zip root must contain
pack.mcmeta, not a wrapping folder). - The in-game verification commands and expected chat/log output.
- Version assumptions and anything you deliberately did not implement.
- What you could not verify statically (no client here), stated as a risk rather than glossed over.
For a debugging request, do not rewrite the pack. Reproduce the failure path: which function runs, under which context, with which selector, and what the log says. Fix the root cause in the shared function rather than every call site.
Treat the user's stated symptom as a hypothesis. "tellraw is broken" is usually a missing executor or a wrong field elsewhere, not a syntax problem. Verify the claim against the file and the version rules before fixing it, and say when the real cause turns out to be different from what was reported.
References
Read only what the task needs; each file is self-contained.
| File | Covers |
references/pack-structure.md | pack.mcmeta, format table, folders, namespaces, overlays, load/tick, zip, experiments |
references/functions.md | .mcfunction syntax, macros, /return, /schedule, execution order, limits, recursion |
references/execute.md | every /execute subcommand, context semantics, forking, store, if variants |
references/scoreboard.md | objectives, criteria, operations, display slots, numberformat, teams, tags, trigger, storage format |
references/markers.md | marker semantics, state storage, idempotent spawning, spatial patterns |
references/displays.md | text_display / item_display / block_display, transformation math, interpolation, culling |
references/particles.md | count=0 semantics, drawing primitives, rotation animation, dust lifetimes, performance |
references/text-components.md | SNBT components, score/nbt/selector, styling, click/hover, resolution timing |
references/nbt-snbt.md | SNBT types, quoting, NBT paths, storage, /data, entity/block NBT, cost model |
references/selectors.md | selector variables and arguments, sorting, nbt=, predicate=, pitfalls |
references/predicates-advancements.md | predicate types, entity predicates, advancement triggers, event detection |
references/tags.md | tag files, replace/required, registry paths, vanilla tags worth overriding |
references/items.md | item stack syntax, components that matter, item predicates, /give//item//loot |
references/right-click.md | the five right-click detection methods, which one is correct, and their costs |
references/content-registries.md | recipes, loot tables, item modifiers, enchantments, damage types, dialogs, clocks, variants |
references/commands-misc.md | the non-execute commands a pack actually uses, plus limits |
references/worldgen.md | biomes, dimensions, features, structures, environment attributes, multi_noise |
references/worldgen-case-terralith.md | measured anatomy of a production worldgen pack, and which techniques to copy |
references/patterns.md | canonical idioms: init, scheduler, HUD, holograms, raycast, area triggers, cleanup |
references/versioning.md | format numbers, breaking-change digest, migration checklist |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

