minecraft-commands-scripting
Skill165 starsChanged 8 months agoMITView on GitHub
Write and debug Minecraft Java 26.x and 1.21.x commands, selectors, execute chains, scoreboards, NBT, and RCON scripts. Use for command-only work; use minecraft-datapack for complete datapack structures.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- AIKUSAN/minecraft-agent-skills-bundleedited, first seen Oct 3, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- AIKUSAN/minecraft-agent-skills-bundle★ 416% same
Wrote their own version · 0
None found.
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.
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- minecraft-ci-releaseSkill
- minecraft-commands-scriptingSkill
- minecraft-datapackSkill
- minecraft-essentials-opsSkill
- minecraft-imagegenSkill
- minecraft-moddingSkill
- minecraft-multiloaderSkill
- minecraft-plugin-devSkill
- minecraft-resource-packSkill
- minecraft-server-adminSkill
- minecraft-testingSkill
- minecraft-worldedit-opsSkill
- minecraft-world-generationSkill
- minecraft-ci-releaseSkill
- minecraft-datapackSkill
- minecraft-essentials-opsSkill
- minecraft-imagegenSkill
- minecraft-moddingSkill
- minecraft-multiloaderSkill
- minecraft-plugin-devSkill
- minecraft-resource-packSkill
- minecraft-server-adminSkill
- minecraft-testingSkill
- minecraft-worldedit-opsSkill
- minecraft-world-generationSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Before editing, inspect the exact Minecraft version and execution context (chat, function, command block, or RCON).
- Distinctive: line 31
Use the cheat sheets when you need fast command recall without scanning this whole skill file.
- Distinctive: line 38
Use references/command-reference.md for the relevant command family.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Minecraft Commands & Scripting Skill
Before editing, inspect the exact Minecraft version and execution context (chat, function, command block, or RCON). Keep the requested scope and use only the relevant examples. Check current release notes for version-sensitive syntax.
Command Syntax Conventions
<required>— required argument[optional]— optional argument(a|b|c)— choose one...— repeating / multiple- Coordinates:
~= relative offset,^= local (look-direction)
Routing Boundaries
Use when: the task is raw command chains, scoreboards, selector logic, or RCON command scripting.Do not use when: creating or editing full datapack structures and registries (minecraft-datapack).Do not use when: behavior depends on Java plugin or mod code (minecraft-plugin-dev/minecraft-modding).
Bundled References And Examples
- Execute cheat sheet:
references/execute-cheat-sheet.md - Selector cheat sheet:
references/selector-cheat-sheet.md - Example scripts:
scripts/examples/arena-countdown.mcfunction,scripts/examples/stopwatch-podium.mcfunction,scripts/examples/rcon-backup-warning.sh(one-time setup commands are called out in comments when needed)
Use the cheat sheets when you need fast command recall without scanning this whole skill file. Copy and adapt the example scripts as needed.
Command reference
Use references/command-reference.md for the relevant command family. It includes version boundaries for item components, attributes, text events, gamerules, and 26.x world clocks. Do not run example blocks as a batch; each demonstrates a separate operation.
RCON Scripting
Connect to a Minecraft server remotely using RCON (enable in server.properties):
# server.properties
enable-rcon=true
rcon.password=your_password
rcon.port=25575RCON is unencrypted. Keep the port bound to a trusted private network, VPN, or localhost, and inject the password through a protected secret rather than a command-line argument.
Bash RCON script (using mcrcon)
#!/usr/bin/env bash
set -euo pipefail
: "${MCRCON_PASS:?inject MCRCON_PASS from a protected secret}"
export MCRCON_HOST="${MCRCON_HOST:-127.0.0.1}"
export MCRCON_PORT="${MCRCON_PORT:-25575}"
restore_saves() {
mcrcon "save-on" >/dev/null || true
}
trap restore_saves EXIT INT TERM
# Send command
mcrcon "say Server backup starting in 5 minutes"
sleep 300
mcrcon "save-off"
mcrcon "save-all flush"
# Backup world
rsync -av /path/to/server/world/ /backups/world_$(date +%Y%m%d_%H%M%S)/
mcrcon "save-on"
trap - EXIT INT TERM
mcrcon "say Backup complete!"Python RCON
import os
from mcrcon import MCRcon
with MCRcon("localhost", os.environ["MCRCON_PASS"], port=25575) as mcr:
response = mcr.command("list")
print(response)
# "There are 3 of a max of 20 players online: Steve, Alex, Notch"
players = response.split(": ")[1].split(", ") if ": " in response else []
print(f"Online players: {players}")Common Scripting Patterns
First-join setup (load and tick functions)
# load.mcfunction: create the objective
scoreboard objectives add initialized dummy
# tick.mcfunction: detect players who have not been initialized
execute as @a unless score @s initialized matches 1 run function mypack:on_first_join
# on_first_join.mcfunction
scoreboard players set @s initialized 1
give @s minecraft:stone_sword
give @s minecraft:bread 16
tellraw @s {"text":"Welcome! Here's a starter kit.","color":"green"}Death counter + respawn
# tick.mcfunction — check deaths
execute as @a[scores={deaths=1..}] run function mypack:on_death
# on_death.mcfunction (separate file)
scoreboard players reset @s deaths
scoreboard players add @s total_deaths 1Proximity detection
# Check if any player is within 5 blocks of a location
execute if entity @a[x=10,y=64,z=10,distance=..5] run function mypack:player_nearbyMath tricks (no fractions in scoreboards)
# Multiply @s.value by 1.5 using integer math (×3 then /2)
scoreboard players operation @s result = @s value
scoreboard players operation @s result *= #three constants
scoreboard players operation @s result /= #two constants
# Set #two and #three on load:
# scoreboard players set #two constants 2
# scoreboard players set #three constants 3References
- Minecraft Wiki — Commands: https://minecraft.wiki/w/Commands
- Minecraft Wiki — Target selectors: https://minecraft.wiki/w/Target_selectors
- Minecraft Wiki — NBT format: https://minecraft.wiki/w/NBT_format
- Minecraft Wiki — Raw JSON text: https://minecraft.wiki/w/Raw_JSON_text_format
- Minecraft Wiki — Scoreboard: https://minecraft.wiki/w/Scoreboard
- Execute command wiki: https://minecraft.wiki/w/Commands/execute
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.

