assets-refresh

assets-refresh is a skill for Claude Code, Codex from IvanMurzak/Unity-MCP. It costs 49 tokens per session (552 once invoked), scanned A, original, Apache-2.0.

A Unity editor tool that refreshes the AssetDatabase, Unity's index of project files and assets. It can also trigger script recompilation when C# files change outside Unity.

In plain words
What is it for?
Use it after changing Unity project files through the filesystem or another tool. It is also useful when you need to force C# scripts to recompile and wait for the result.
Why use it?
It makes Unity notice files added or edited externally and reports whether processing or compilation succeeded. This avoids working with stale assets or scripts.

Skill for Claude CodeCodex

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/ivanmurzak/unity-mcp/assets-refresh
Any agent
npx skills add IvanMurzak/Unity-MCP --skill assets-refresh
Clone the repo
git clone --depth 1 https://github.com/IvanMurzak/Unity-MCP

Made for: Claude Code, Codex.

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 assets-refresh

README.md
[![agentmods](https://agentmods.dev/badge/skills/ivanmurzak/unity-mcp/assets-refresh.svg)](https://agentmods.dev/skills/ivanmurzak/unity-mcp/assets-refresh)
Your own site
<a href="https://agentmods.dev/skills/ivanmurzak/unity-mcp/assets-refresh"><img src="https://agentmods.dev/badge/skills/ivanmurzak/unity-mcp/assets-refresh.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 552 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.00049 $0.00552
Opus 5 $0.00024 $0.00276
Sonnet 5 $0.00010 $0.00110
Haiku 4.5 $0.00005 $0.00055

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

Security

Grade A, and why

assets-refresh 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.

Unity-MCP-Plugin/.claude/skills/assets-refresh/SKILL.md · 81 lines

How it starts

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

Assets / Refresh

Refreshes the AssetDatabase. Use it if any file was added or updated in the project outside of Unity API. Use it if need to force scripts recompilation when '.cs' file changed.

Inputs

  • optionsImportAssetOptions flag (default ForceSynchronousImport).
  • requestId — required for processing-mode responses; the tool returns Processing immediately and delivers a follow-up completion when compilation finishes.

Behavior

Runs AssetDatabase.Refresh(options). If EditorApplication.isCompiling is true after the refresh, schedules a post-compilation notification and returns a Processing response. If compilation already failed (EditorUtility.scriptCompilationFailed), returns Success with the compilation error details. Otherwise returns a plain Success.

How to Call

unity-mcp-cli run-tool assets-refresh --input '{
  "options": "string_value"
}'

For complex input (multi-line strings, code), save the JSON to a file and use:

unity-mcp-cli run-tool assets-refresh --input-file args.json

Or pipe via stdin (recommended):

unity-mcp-cli run-tool assets-refresh --input-file - <<'EOF'
{"param": "value"}
EOF

Troubleshooting

If unity-mcp-cli is not found, either install it globally (npm install -g unity-mcp-cli) or use npx unity-mcp-cli instead. Read the /unity-initial-setup skill for detailed installation instructions.

Input

Name Type Required Description
options any No Asset import options.

Input JSON Schema

{
  "type": "object",
  "properties": {
    "options": {
      "$ref": "#/$defs/UnityEditor.ImportAssetOptions"
    }
  },
  "$defs": {
    "UnityEditor.ImportAssetOptions": {
      "type": "string",
      "enum": [
        "Default",
        "ForceUpdate",
        "ForceSynchronousImport",
        "ImportRecursive",
        "DontDownloadFromCacheServer",
        "ForceUncompressedImport"
      ]
    }
  }
}

Read the full file on GitHub · 81 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 · 81 lines · 49 tokens per session scan A 0ca72af3a909

Subscribe to this mod's changes

assets-refresh is a skill published in the GitHub repository IvanMurzak/Unity-MCP (4,079 stars, last pushed 10d ago), licensed Apache-2.0. It adds 49 tokens to every session and 552 once invoked, about $0.0002 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-30.