minecraft-datapack
Skill0 starsChanged 55 days agoMITView on GitHub
Write Minecraft Java Edition datapacks — functions, tags, recipes, advancements, loot tables, predicates, pack.mcmeta — that load and behave correctly on the first try. Use when asked to create or change a datapack, write .mcfunction files, add a recipe/advancement/loot table/tag, or fix a pack that loads but does nothing. Java Edition only; Bedrock behavior packs are not covered.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- Liremant/minecraft-datapack-skilltheir own version, first seen Oct 20, 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
- Liremant/minecraft-datapack-skill★ 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, 4 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
If you catch yourself guessing — a command name, an item id, a pack_format number, whether a feature existed then — stop and look it up.
- Very specific: line 33
Target Minecraft version: Read pack.mcmeta if the pack exists.
- Very specific: line 48
always: 00-index.md → the structure.md section you need
- Distinctive: line 51
before writing syntax you are not certain about: reference/version-gates.md
- Distinctive: line 53
before the pre-flight review: reference/pitfalls.md
- Very specific: line 84
Write complete files. A placeholder like "description": "TODO" is fine.
- Distinctive: line 89
Before running anything, re-read your own pack as a reviewer would and walk the checklists:
- Very specific: line 108
Run it from the skill directory or use the absolute path shown in the <skill_resources> block of this skill.
- Distinctive: line 115
Read every diagnostic. The validator is not fail-fast: one run lists all of them, by file and line, each with the fix.
“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
Authoring Minecraft datapacks
Your job is a datapack the game loads and runs on the first attempt. The enemy is trial and error: every mistake found inside the game costs a launch, a world load, and one error at a time. So the whole method is look it up, write it once, verify statically once.
The budget
These are limits, not aspirations.
| Limit | Why |
| Zero Minecraft launches | You cannot run the game here. The user runs it, once, at the end. |
| At most 2 validator runs | One after writing, one after a batch fix. If you need a third, stop and report what is still failing. |
| Zero throwaway scripts to "test a snippet" | The validator already parses the snippets. A scratch script is a second, worse validator. |
| Zero invented syntax, ids, or version numbers | Everything comes from reference/ or the wiki. |
If you catch yourself guessing — a command name, an item id, a pack_format
number, whether a feature existed then — stop and look it up. A guess feels free
and costs a rewrite.
Phase 0 — Decide, once
Answer all four before writing a file. Changing them halfway invalidates work.
- Target Minecraft version. Read
pack.mcmetaif the pack exists. Otherwise ask, or default to the latest release inreference/data/versions.json→latest_release, and say so. This decides the format number and, on the 1.21 boundary, the folder names. - Namespace. Lowercase
a-z0-9_.-, e.g.mypack. Used in folder names and in every id. - What the pack does, in one sentence per feature.
- The file list. Namespace, functions, tags, and registry files. Write it
down before creating anything; this is what
/reloadwill load.
Phase 1 — Read only what you need
The reference files are deliberately separate. Read the rows that match the task in reference/00-index.md and stop:
- always:
00-index.md→ thestructure.mdsection you need - any
.mcfunction: reference/functions.md - any registry JSON: reference/registries.md
- before writing syntax you are not certain about: reference/version-gates.md
- before the pre-flight review: reference/pitfalls.md
Three machine-readable tables exist so you can look up a fact instead of
recalling it: reference/data/versions.json (version ↔ pack format),
reference/data/commands.json (does this command exist, since when),
reference/data/registries.json (is this a registry directory, what keys are
required).
Phase 2 — Write the tree
For a new pack, start with the scaffolder. It writes pack.mcmeta with the
right format fields for the target, the load/tick entry points, and the folder
names that match that version's era — the three things most often gotten wrong:
node "<skill base directory>/scripts/new-pack.mjs" "<pack folder>" --namespace mypack --mc 1.21.8Omit --mc to target the newest release. It never overwrites without --force.
For an existing pack, or beyond the skeleton, copy shapes from templates/
rather than composing from scratch — they are already in the era-correct form. In
this order, because each step depends on the previous one:
pack.mcmeta— the format number fromversions.json, nothing from memory.data/minecraft/tags/function/load.jsonandtick.json— the entry points. These two files must be in theminecraftnamespace or nothing runs.- The functions those tags name, then everything they reference.
- Registry JSON: recipes, advancements, loot tables, predicates, tags.
- A
README.mdin the pack only if the user asked; it does not load.
Write complete files. A placeholder like "description": "TODO" is fine; a
half-written command is not, because the pack fails to load and hides the rest.
Phase 3 — Pre-flight, in your head
Before running anything, re-read your own pack as a reviewer would and walk the checklists:
- the function checklist at the end of reference/functions.md
- the top-15 list at the start of reference/pitfalls.md
- the era questions in
reference/version-gates.md — especially: does the
target version use
functions/orfunction/, and does it need item components?
This pass catches most of what the validator would report, and it is the reason one run is usually enough.
Phase 4 — Validate once, fix in one batch
node "<skill base directory>/scripts/validate.mjs" "<pack folder>" --json "$env:TEMP\pack-report.json"Run it from the skill directory or use the absolute path shown in the
<skill_resources> block of this skill. <pack folder> is the directory that
contains pack.mcmeta. Add --mc 1.26.3 to pin the target version when
pack.mcmeta is missing or being repaired.
Then:
- Read every diagnostic. The validator is not fail-fast: one run lists all of them, by file and line, each with the fix.
- Apply all fixes in one batch. Do not fix one error and re-run — that converts one run into ten.
- Re-run at most once. Exit code 0 means no errors;
MC-REF-010(an unreferenced function) andMC-REF-012(no load/tick tag) are worth reading even at 0, because they describe a pack that loads and then does nothing. - Anything still failing after two runs: report it as a blocker with the exact diagnostic text. Do not start guessing again.
The validator's severities are deliberate. An error is something the game rejects. A warning is something that is legal but almost certainly not what was meant. Neither substitutes for the game: it cannot know whether a scoreboard objective is declared by another pack, or whether an id exists in vanilla.
Phase 5 — Hand off
Give the user, in this order:
- The file tree you created, as a tree.
- Where to put it:
<world>/datapacks/<pack folder>/. - What to run in game:
/reload, then/datapack list, then/function <namespace>:<entry>for each entry point so a failure shows up immediately. - What you could not verify statically, stated plainly. "The recipe unlocks correctly, but I cannot confirm the advancement shows its toast" is worth more than a confident claim.
What this skill deliberately does not do
- Bedrock Edition behavior packs. Different format entirely.
- Custom world generation, dimensions, biomes, enchantments. Real formats,
large cross-referenced schemas, not reloadable with
/reload. If the task needs them, say so and work from the wiki's自定义世界生成pages rather than from memory. pack.pngor any binary asset. Tell the user where it goes instead of generating bytes.- Trusting the validator over the wiki. The tables in
reference/data/are a derived snapshot. When a table and the wiki disagree, the wiki is right — say so and use the wiki's value.
Reference
- Structure and
pack.mcmeta: https://zh.minecraft.wiki/w/数据包 - Functions: https://zh.minecraft.wiki/w/Java版函数
- Commands: https://zh.minecraft.wiki/w/命令/execute,
/data,/scoreboard - Selectors: https://zh.minecraft.wiki/w/目标选择器
- Registry formats: 配方, 战利品表, 进度定义格式, 谓词, Java版标签
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.

