agentsclimarketplace

Minecraft nbt

Skill woyxiang/skills/skills/minecraft-nbt

Agent Skills

Install
npx -y skills add woyxiang/skills --skill minecraft-nbt

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

To understand Minecraft NBT (Named Binary Tag) format. Use when: (1) user references NBT, SNBT, or Named Binary Tag, (2) user works with Minecraft commands using data tags (curly-brace syntax), (3) user mentions .dat, .nbt, level.dat, or Minecraft save files, (4) user needs to parse, generate, or validate NBT/SNBT data, (5) user asks about NBT tag types like TAG_Byte, TAG_Compound, etc., (6) code or context contains NBT-format binary data or SNBT strings

SKILL.md

5.3 KB, as published. Nobody here has run it

Minecraft NBT Format

Named Binary Tag (NBT) is the tree-structured data format used by Minecraft to store game data in save files and to pass structured data in commands.

Detection

File patterns: *.dat, *.nbt, level.dat, *.snbt Keywords: NBT, SNBT, Named Binary Tag, TAG_Byte, TAG_Compound, TAG_List, TAG_End SNBT patterns: Curly-brace data in Minecraft commands (e.g., {Health:20f,Inventory:[...]}) Binary patterns: GZip-compressed files containing tag ID bytes (0x00-0x0C) Contexts: Minecraft commands (/data, /execute, /summon, /give), save file parsing

Routing

When you need to...Read
Understand what NBT is and how it's usedbasics.md
Work with SNBT (the string/text format used in commands)snbt.md
Parse or write binary NBT databinary-format.md
See real-world NBT examples from Minecraft commandsexamples.md

Two Faces of NBT

NBT exists in two forms:

  1. Binary NBT — The on-disk format used in save files (.dat, .nbt, chunk data). A tree of typed tags with numeric IDs, usually GZip-compressed.
  2. SNBT (Stringified NBT) — The text format used in Minecraft commands and data generators (.snbt files). Human-readable JSON-like syntax.

Quick Reference

Tag Types (Binary IDs)

IDTagPayload
0TAG_EndNone (marks end of compound)
1TAG_Byte1 byte, signed
2TAG_Short2 bytes, signed, big-endian
3TAG_Int4 bytes, signed, big-endian
4TAG_Long8 bytes, signed, big-endian
5TAG_Float4 bytes, IEEE 754 binary32
6TAG_Double8 bytes, IEEE 754 binary64
7TAG_Byte_ArrayInt size + bytes
8TAG_StringUnsigned short size + UTF-8 bytes
9TAG_ListByte tag ID + int size + payloads
10TAG_CompoundFully formed tags until TAG_End
11TAG_Int_ArrayInt size + int payloads
12TAG_Long_ArrayInt size + long payloads

SNBT Type Suffixes

TypeSuffixExample
Byteb/B34B, -20b
Shorts/S31415s
Int(none) or i/I31415926
Longl/L31415926l
Floatf/F3.14f
Double(none) or d/D3.1415926

Key SNBT Rules

  • Compound keys can be unquoted if they match [a-zA-Z0-9_\-.+]+ and don't start with a digit/-/./+
  • String values can be unquoted with same rules; otherwise use "..." or '...'
  • Arrays vs Lists: [B;1b,2b,3b] is a byte array; [1b,2b,3b] is a list — they are different types
  • Heterogeneous lists: SNBT allows [1, "abc"]; when saved to binary NBT, non-compound entries become compounds with empty-key {"":value}
  • Numbers: Support hex (0x), binary (0b), E notation, underscore separators, signedness suffixes (u/s)
  • Boolean: NBT has no boolean — true/false in SNBT become 1b/0b

Key Binary Rules

  • Java Edition: All multi-byte numbers are big-endian
  • Bedrock Edition: All multi-byte numbers are little-endian
  • TAG_End has no name (just a single 0x00 byte)
  • Root tag is always a compound (Java) or compound/list (Bedrock), usually with empty string name
  • Nesting limit: 512 levels deep for List and Compound
  • Files: Usually GZip-compressed; some are uncompressed or zlib-compressed

Partial Matching (Testing)

When testing NBT with commands like /execute if data or target selector nbt=:

  • Compounds: Extra tags in target still match (subset match). {} matches anything.
  • Lists: Order and count ignored — as long as every requested element is present, it matches. Empty list only matches empty list.
  • Arrays (byte/int/long): Order and count ARE checked.
  • Types must match exactly: 1 (int) ≠ 1d (double)
  • Namespaces required: "stone""minecraft:stone"

Java vs Bedrock

FeatureJavaBedrock
EndiannessBig-endianLittle-endian
level.datGZip-compressedUncompressed + 8-byte header
Heterogeneous listsSupported in SNBTN/A

Dependencies

No external tools required. For working with NBT files, common tools include:

  • NBTExplorer / NBT Studio — GUI NBT file viewer/editor
  • webNBT — Online NBT viewer
  • Vanilla data generator — Converts .snbt.nbt

Validation Patterns

When validating SNBT:

  1. Check that all tags have a valid type suffix
  2. Verify compound keys are properly quoted if they contain special characters
  3. Ensure arrays use the correct prefix (B;, I;, L;)
  4. Confirm numbers are within their type's range
  5. Check for balanced brackets and braces
  6. Verify escape sequences in strings are valid
  7. Ensure namespaces are present in resource location strings when testing matches

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.