tools-unity-scriptable-objects

tools-unity-scriptable-objects is a skill for Claude Code, Codex from tjboudreaux/cc-plugin-unity-gamedev. It costs 23 tokens per session (2,821 once invoked), scanned A, original, MIT.

A guide to using Unity ScriptableObjects, data assets that store shared information outside a scene, for game data and configuration.

In plain words
What is it for?
Use it for item, ability, and character definitions; game settings; shared runtime data; event systems; and lookup of data by identifier.
Why use it?
It helps keep shared definitions and settings separate from scene objects, making systems easier to reuse and connect.

Skill for Claude CodeCodex

Part of the unity-gamedev plugin — 21 skills shipped together

Install

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.

agentmods
npx agentmods add skills/tjboudreaux/cc-plugin-unity-gamedev/tools-unity-scriptable-objects
Any agent
npx skills add tjboudreaux/cc-plugin-unity-gamedev --skill tools-unity-scriptable-objects
Clone the repo
git clone --depth 1 https://github.com/tjboudreaux/cc-plugin-unity-gamedev

Made for: Claude Code, Codex.

Or install unity-gamedev, the plugin that ships this one along with the rest of its 21 skills.

Wrote 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.

agentmods badge for tools-unity-scriptable-objects

README.md
[![agentmods](https://agentmods.dev/badge/skills/tjboudreaux/cc-plugin-unity-gamedev/tools-unity-scriptable-objects.svg)](https://agentmods.dev/skills/tjboudreaux/cc-plugin-unity-gamedev/tools-unity-scriptable-objects)
Your own site
<a href="https://agentmods.dev/skills/tjboudreaux/cc-plugin-unity-gamedev/tools-unity-scriptable-objects"><img src="https://agentmods.dev/badge/skills/tjboudreaux/cc-plugin-unity-gamedev/tools-unity-scriptable-objects.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,821 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00023 $0.02821
Opus 5 $0.00012 $0.01411
Sonnet 5 $0.00005 $0.00564
Haiku 4.5 $0.00002 $0.00282

Measured 4d ago against content hash ff77cd3edd99, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tools-unity-scriptable-objects 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 4d 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.

skills/tools-unity-scriptable-objects/SKILL.md · 521 lines

How it starts

The opening of the file, as written. The whole thing — 521 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Unity ScriptableObjects

Overview

ScriptableObjects are data containers that exist outside the scene hierarchy, ideal for configuration, shared data, and decoupling systems.

When to Use

  • Game configuration and settings
  • Item/ability/character definitions
  • Shared runtime data
  • Event systems
  • Dependency injection alternatives

Basic Patterns

Data Definition

[CreateAssetMenu(fileName = "NewItem", menuName = "Game/Item Definition")]
public class ItemDefinition : ScriptableObject
{
    [Header("Basic Info")]
    public string Id;
    public string DisplayName;
    [TextArea] public string Description;
    public Sprite Icon;
    
    [Header("Stats")]
    public ItemRarity Rarity;
    public int MaxStackSize = 99;
    public int BaseValue;
    
    [Header("Gameplay")]
    public bool IsConsumable;
    public bool IsEquippable;
    public EquipmentSlot EquipSlot;
    
    // Runtime lookup optimization
    private static Dictionary<string, ItemDefinition> s_Lookup;
    
    public static ItemDefinition GetById(string id)
    {
        if (s_Lookup == null)
        {
            BuildLookup();
        }
        return s_Lookup.TryGetValue(id, out var item) ? item : null;
    }
    
    private static void BuildLookup()
    {
        s_Lookup = new Dictionary<string, ItemDefinition>();
        var items = Resources.LoadAll<ItemDefinition>("Items");
        foreach (var item in items)
        {
            s_Lookup[item.Id] = item;
        }
    }
}

Database Pattern

[CreateAssetMenu(fileName = "ItemDatabase", menuName = "Game/Item Database")]
public class ItemDatabase : ScriptableObject
{
    [SerializeField] private List<ItemDefinition> _items = new();
    
    private Dictionary<string, ItemDefinition> _lookup;
    
    public IReadOnlyList<ItemDefinition> AllItems => _items;
    
    public void Initialize()
    {
        _lookup = new Dictionary<string, ItemDefinition>();
        foreach (var item in _items)
        {
            if (item != null && !string.IsNullOrEmpty(item.Id))
            {
                _lookup[item.Id] = item;
            }
        }
    }
    
    public ItemDefinition GetItem(string id)
    {
        if (_lookup == null) Initialize();
        return _lookup.TryGetValue(id, out var item) ? item : null;
    }
    
    public IEnumerable<ItemDefinition> GetItemsByRarity(ItemRarity rarity)
    {
        return _items.Where(i => i.Rarity == rarity);
    }
    
#if UNITY_EDITOR
    [ContextMenu("Collect All Items")]
    private void CollectItems()
    {
        _items.Clear();
        var guids = UnityEditor.AssetDatabase.FindAssets("t:ItemDefinition");
        
        foreach (var guid in guids)
        {
            var path = UnityEditor.AssetDatabase.GUIDToAssetPath(guid);
            var item = UnityEditor.AssetDatabase.LoadAssetAtPath<ItemDefinition>(path);
            if (item != null && item != this)
            {
                _items.Add(item);
            }
        }
        
        UnityEditor.EditorUtility.SetDirty(this);
    }
#endif
}

Read the full file on GitHub · 521 lines

Changes

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.

  1. 4d ago First seen · 521 lines · 23 tokens per session scan A ff77cd3edd99

Subscribe to this mod's changes

tools-unity-scriptable-objects is a skill published in the GitHub repository tjboudreaux/cc-plugin-unity-gamedev (8 stars, last pushed 6mo ago), licensed MIT. It adds 23 tokens to every session and 2,821 once invoked, about $0.0001 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.