Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/code-onigiri/mc-modding-skill/minecraft-mixinnpx skills add code-onigiri/mc-modding-skill --skill minecraft-mixingit clone --depth 1 https://github.com/code-onigiri/mc-modding-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/code-onigiri/mc-modding-skill/minecraft-mixin)<a href="https://agentmods.dev/skills/code-onigiri/mc-modding-skill/minecraft-mixin"><img src="https://agentmods.dev/badge/skills/code-onigiri/mc-modding-skill/minecraft-mixin.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00111 | $0.01200 |
| Opus 5 | $0.00056 | $0.00600 |
| Sonnet 5 | $0.00022 | $0.00240 |
| Haiku 4.5 | $0.00011 | $0.00120 |
Grade A, and why
minecraft-mixin scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
概要
Mixin は既存クラスの動作を変更する強力なツール。Forge/NeoForge に同梱済み(追加依存不要)。
✅ やるべきこと(優先順位順)
- @Inject を最優先 — 元のコードを破壊しない。他Modとの競合が最も少ない。
- @Unique を徹底 — Mixin内で追加するフィールド・メソッドには必ず付与。名前衝突を防ぐ。
- Interface Mixin(@Accessor/@Invoker)は安全 — 元のコードを書き換えない。競合リスク極低。
- Constructorへの@InjectはTAIL/RETURNのみ可能 — HEADや他位置への注入は不可。
- Compatibility Level: Forge 1.20.1 →
JAVA_17, NeoForge 1.21.1 →JAVA_21 - 他Modのクラスに注入する際は@Pseudoを必ず付与 — クラスが存在しない場合のクラッシュを防ぐ。
- 開発時は
locals = LocalCapture.CAPTURE_FAILHARD— 即座にエラー検知。リリース時はCAPTURE_FAILSOFTに切替。
❌ やってはいけないこと
- @Overwrite / @Redirect は極力避ける — 同じ箇所を他Modも書き換えると互換性破壊。どうしても必要な場合のみ
priorityで順序制御。 - @Shadow したフィールドに
finalを付けない —@Final @Mutable @Shadowを使うこと。Mixinコンパイル時にエラーになる。 method = "target()V"のシグネチャを間違えない — 戻り値・引数・修飾子は必ず正確に記述。間違えるとMixin apply failedで起動時クラッシュ。- CallbackInfoReturnableのジェネリクス型を間違えない — 戻り値の型と一致しないと注入失敗。
- Mixin Configの
packageと実際のパッケージを一致させる — 不一致はClassNotFoundExceptionの原因。 mods.toml/neoforge.mods.tomlの[[mixins]]を忘れない — 忘れるとMixinが一切適用されない。build.gradleの jar manifest にMixinConfigsを含める — ないと配布用jarでMixinが読み込まれない。- run引数に
-mixin.config=mixins.<modid>.jsonを含める — ないと開発環境でもMixinが読み込まれない。
開発ワークフロー
- 1.
build.gradleにMixin設定追加(jar manifestのMixinConfigs、run引数の-mixin.config=mixins.<modid>.json) - 2.
mods.toml/neoforge.mods.tomlに[[mixins]]追加 - 3.
src/main/resources/mixins.<modid>.json作成(Mixin Config) - 4. Mixinクラスを
src/main/java/.../mixin/に作成 - 5. ターゲットメソッドのシグネチャを確認(obf/name/mapping)
- 6.
runClientで動作確認。Mixin apply failedが出たらシグネチャ見直し
詳細リファレンス
| トピック | ファイル | 読むタイミング |
|---|---|---|
| セットアップ(build.gradle, mods.toml, mixin config) | references/SETUP.md | 最初に1回 |
| Injector一覧(@Inject, @Redirect, @Overwrite, @ModifyArg/Args/Variable...) | references/INJECTORS.md | コード挿入・変更が必要な際 |
| Helper/Utility(@Shadow, @Accessor, @Invoker, @Unique, @Slice, @Pseudo, @Dynamic) | references/HELPERS.md | フィールドアクセス・命名・競合回避 |
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 54 lines · 111 tokens per session scan A 01827cd6d7cb
minecraft-mixin is a skill published in the GitHub repository code-onigiri/mc-modding-skill (2 stars, last pushed 2mo ago), licensed MIT. It adds 111 tokens to every session and 1,200 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
exec-inspect
Verifies a Minecraft Java Edition build in-world after each phase — checks the plan was carried out as specified, that the result fits the world cleanly (no dangling edges, blocked paths, or unintended overrides), and proposes concrete course corrections. Use after every major phase of executing a build plan, as the…
exec-plan
Captures build requirements for a Minecraft Java Edition world, interviews the user to resolve ambiguity, and produces a detailed, fully-resolved build plan that a small model can execute mechanically. Use when starting a new Minecraft build or feature, or when a build request must be turned into a concrete plan…
exec-worker
Executes a detailed Minecraft build plan step by step — placing, filling, cloning blocks and stamping structures exactly as specified, with no redesign or improvisation. Use to carry out a plan.toon produced by exec-plan once it is detailed enough to follow mechanically. Part of the minecraft-builder workflow.
system-redstone
Designs, plans, and verifies complex redstone and mechanical contraptions in a live Minecraft Java Edition world — item sorters, hidden and piston doors, automatic farms, mob-spawner collectors, minecart networks and roller coasters, water and bubble elevators, note-block music, traps, and decorative machines.…
design-city
Designs and blueprints whole cities and city districts in a live Minecraft Java Edition world — real-world replicas (modern and historical), pop-culture replicas, and original cities. Plans the urban fabric — district zoning, street hierarchy, transit, walls, and reused vernacular building modules — and defers every…
exec-blueprint
Turns a Minecraft build plan into named, reusable structure definitions saved inside the world, so build elements can be placed, copied, and iterated later without any external state. Use after planning, to create or update the structure library for a build. Part of the minecraft-builder workflow.