Skip to content
unity-skills logo

Unity Skills

unity-skills

Unity Editor automation via REST API — create scripts, analyze scenes, manage assets, control editor, orchestrate workflows, run batch jobs, and route by Unity version. Triggers: Unity, Unity Skills, in Unity, automate Unity, Unity editor automation, create Unity script, scene summary, analyze Un...

SKILL.md

Full skill instructions

Unity Skills

Use this skill when the user wants to automate the Unity Editor through the local UnitySkills REST server.

Schema: query only when unsure

The schema is the canonical source for exact skill names, parameters, defaults, and returns — but you do not need it for every call. For common read-only or simple write calls whose parameters you already know, call directly; query schema only when a skill name or signature is uncertain.

  • unity_skills.get_skill_schema() / GET /​skills/​schema — full schema (large: ~578 KB for all skills). Fetch at most once per session and reuse it; do not re-pull before every call.
  • GET /​skills?category=<Category> — returns a manifest (lightweight: mode / approvalBehavior / parameters per skill), not the full schema. Use it to scope by category. Note: /​skills/​schema itself does not currently filter by category.

Use module SKILL.md files for routing guidance, guardrails, and minimal examples, not as the canonical source of exact signatures.

Current snapshot: 750 REST skills, 51 functional source modules, 68 module documentation directories (49 REST/​module docs + 19 advisory docs), Unity 2022.3+, default timeout 15 minutes.

Python helper: unity-skills/​scripts/​unity_skills.py

Operating Mode (v1.9.0+)

Operating mode is a server-side permission gate, configured in Window > UnitySkills > Server and persisted in EditorPrefs per-machine. It is not an AI routing policy and cannot be switched via chat or REST — chat-side trigger words no longer apply.

Boot Handshake

On session start (or before the first skill call), call GET /​health and read:

  • currentMode — "approval" / "auto" / "bypass"
  • panelApprovalRequired — only meaningful under Approval; selects the grant channel
  • pendingCount — outstanding grant requests

Three Modes (aligned with Claude Code permission modes)

Factory default: a fresh install starts in Auto; an upgraded install (any pre-existing UnitySkills_* pref) starts in Bypass. It never defaults to Approval. The "Claude Code 类比" column below is only a mental model, not the factory default — always read /​health.currentMode before acting.

ModeClaude Code 类比(心智对照,非默认)FullAuto skillAuto-detected NeverInSemi skill
Approval≈ default / planFirst call returns MODE_RESTRICTED; run the grant protocol belowMODE_FORBIDDEN
Auto≈ acceptEditsExecutes directly (audit written); you must self-assess sensitive casesMODE_FORBIDDEN
Bypass≈ bypassPermissionsExecutes directlyExecutes directly (only ConfirmationToken still gates high-risk)

NeverInSemi is derived automatically by IsForbiddenInSemi() — there is no manual marker. See "Skill Mode Annotation" below.

Approval Mode Grant Protocol

Approval grants are single-shot one-step execution: a successful /​permission/​grant call runs the original skill server-side and returns the result in the same response. You do not retry the skill after grant. Grants are not persisted — calling the same skill a second time will hit MODE_RESTRICTED again and must go through grant again. If the user wants permanent bypass for a skill, direct them to the Allowlist (see below).

On MODE_RESTRICTED, branch on details.approvalChannel:

Dialog channel ("dialog", default — panelApprovalRequired = false)

  1. Tell the user in chat: "要调用 <skill> 来 <目的>,参数 <argsSummary>,请求码 #<token 前 6 位>,是否允许?"
  2. After explicit user consent, call POST /​permission/​grant { skill, token, args } once
  3. On success, the response contains { ok: true, executed: true, skill, result: <Execute output> } — the skill has already run server-side. Consume result directly; do not call the original skill endpoint again

Panel channel ("panel", when panelApprovalRequired = true)

  1. Tell the user in chat: "要调用 <skill> 来 <目的>,请到 Window > UnitySkills 面板的 Pending Grant Requests 点 [Approve](请求码 #<token 前 6 位>)"
  2. Do not call /​permission/​grant yet — calling it before the user clicks Approve returns GRANT_PENDING_APPROVAL
  3. Poll GET /​permission/​status?token=<token> to observe the request state (look at focus.approvedByPanel)
  4. Once the user has pressed Approve in the panel, call POST /​permission/​grant { skill, token, args } once — this takes the Granted branch and triggers one-step execution, returning { ok: true, executed: true, skill, result }. Consume result directly; do not call the original skill endpoint again

Note: panel approval no longer auto-routes the result back to the AI. The Approve click only flips the request into the Granted state; AI must follow up with one /​permission/​grant call to fetch the execution result.

On MODE_FORBIDDEN: the skill is auto-classified as NeverInSemi (Delete / Domain Reload / Play Mode / high-risk). It is callable only under Bypass, or if the user has explicitly added it to the Allowlist (see below). Do not attempt the grant flow — tell the user the action requires Bypass mode, an Allowlist entry, or offer an alternative skill.

Allowlist (user-managed permanent bypass)

The Allowlist is a user-managed permanent whitelist of skill names, configured in Window > UnitySkills > Server settings drawer (Allowlist Skills section / + Add Skill button). It is independent of Approval grants:

  • Allowlisted skills execute directly under any mode — the server skips the Approval/​MODE_RESTRICTED gate
  • An Allowlist entry overrides MODE_FORBIDDEN for that skill (covers Delete / MayEnterPlayMode / MayTriggerReload / RiskLevel="high"). This is intentional: the user has explicitly opted in
  • Allowlist does NOT bypass the high-risk ConfirmationToken gate. When RequireConfirmation is enabled (Settings drawer → Runtime → Require Confirmation), high-risk skills still require the _confirm token two-step handshake even if allowlisted — Allowlist only covers the mode/​approval channel, not the per-call safety confirmation
  • The list is opaque to the AI: allowlisted skills look like normal successful calls, never returning MODE_RESTRICTED
  • The AI should not call /​permission/​allowlist/​add on its own initiative. Only call it when the user has explicitly authorized a session-scoped bulk add (e.g. "把这几个 skill 加白名单方便我后面批量调"); otherwise direct the user to add entries through the panel
  • Allowlist endpoints: GET /​permission/​allowlist / POST /​permission/​allowlist/​add / POST /​permission/​allowlist/​remove (body {skill} or {all: true})

The previous GrantedSkills semantics ("after one grant the skill is permanently auto-allowed") has been removed. Grants are now single-shot. Permanent allow == Allowlist; one-shot approval == grant.

Auto Mode Self-Assessment

Under Auto, FullAuto skills run directly. You must pause and confirm with the user in chat when any of the following apply:

  • Batch operation touching ≥ 5 objects
  • Prefab apply / scene-level mutation / asset overwrite
  • Dry-run shows irreversible changes (deletes, overrides, cascading edits)

This confirmation is a chat-level check (explain plan + risk + ask), independent of the server-side mode gate. The server will not stop you in Auto — the audit log records the call regardless.

Relationship with ConfirmationTokenService

Mode authorization (persistent, per-skill) and ConfirmationToken (single-shot, per-call) are orthogonal:

  • Mode check runs first; if allowed, the existing confirmation gate may still issue CONFIRMATION_REQUIRED with a dry-run for RiskLevel=high or Operation.Delete skills
  • Granted skills still flow through ConfirmationToken when triggered — continue using the original dry-run → user consent → retry with _confirm loop
  • Neither replaces the other

Skill Mode Annotation

The REST surface (~750 skills) is partitioned by [UnitySkill] Mode and runtime metadata. Use schema endpoints for the canonical list:

AnnotationCountSource
SkillMode.SemiAuto~270Manually annotated. Covers read-only / query / analyze skills across script / perception / scene / editor / asset / workflow / debug / console and most modules' info / list / get / find skills
Auto-detected NeverInSemi~75-79IsForbiddenInSemi() derives purely from Operation.Delete, MayEnterPlayMode, MayTriggerReload, RiskLevel="high" (no fallback list)
SkillMode.FullAuto (default)remainderUnannotated skills (write / mutate by default). Approval requires grant; Auto / Bypass execute directly

SemiAuto (read/​query/​analyze) skills are directly callable in every mode and span the modules below; use GET /​skills?category=<Category> for the exact list (write skills in the same modules stay FullAuto):

  • script (read/​list/​get_info/​find_in_file/​get_compile_feedback) · perception (scene_analyze/​context/​health_check/​find_hotspots, project_stack_detect) · scene (get_info/​get_hierarchy/​get_loaded/​find_objects) · editor (get_context/​state/​selection/​tags/​layers) · asset (find/​get_info) · workflow (list/​session_*/​plan — prefer workflow & batch helpers for planning/​preview/​jobs/​rollback) · debug + console (check_compilation/​get_errors/​get_system_info/​get_memory_info/​get_logs)
  • plus most modules' own info / list / get / find skills. Advisory: 19 design-only modules (no REST skills) — see Coding Reference Index below.

Core Rules

  1. If the user specifies a Unity version or editor line, set instance/​version routing first with unity_skills.set_unity_version(...).
  2. BATCH-FIRST — whenever the task touches 2+ objects, use the *_batch variant. Calling the single-object skill in a loop is N round-trips (and 2N under Approval, since each call needs its own grant). Always look for a *_batch form before looping.
  3. For multi-step editor mutations, prefer workflow wrappers instead of free-form mutation sequences.
  4. Script edits, define changes, package changes, some imports, and test template creation can trigger compilation or Domain Reload. Wait and retry on transient unavailability.
  5. test_* skills are async. They return a jobId and must be polled with test_get_result(jobId).

Coding Reference Index

Before writing or refactoring Unity code, load the relevant advisory module first. These are the 19 Documentation only design modules (no REST skills — loadable under any mode) that pin rules to engine source and prevent hallucinated / removed APIs. Load on demand by topic, not all at once.

General coding & architecture — before writing gameplay code or making structural decisions:

ModuleLoad when
project-scoutBefore proposing changes in an existing project — first check Unity version, packages, asmdef, folders, coding patterns
architectureModule boundaries, scene design, SOLID structure, decoupling, refactor direction
script-rolesWhether a class should be a MonoBehaviour, ScriptableObject, plain C# service, or installer
scriptdesignCode review, reducing coupling, improving maintainability, refactoring scripts
patternsChoosing among ScriptableObject / event / state-machine / object-pool / observer designs
testabilityImproving testability, isolating logic out of MonoBehaviour, planning EditMode/​PlayMode tests
asmdefModule boundaries, faster compiles, clearer dependencies, editor/​runtime/​test split
asyncChoosing among Update / coroutine / UniTask / timers, or cleanup & cancellation
inspectorSerializeField usage, Tooltip/​Header organization, validation, Inspector UX
scene-contractsRequired scene objects, component dependencies, bootstrap logic, reference wiring
adrComparing options, choosing among approaches, locking in a design decision
performancePerformance review, frame drops, Update/​allocation/​pooling/​physics optimization
blueprintsStarter structure for a small game (platformer, shooter, runner, puzzle, tower-defense, clicker, card)

Library-specific — before writing code against that library (guards against removed / hallucinated APIs):

ModuleLoad before writing
addressables-designInitializeAsync / LoadAssetAsync / LoadSceneAsync / UpdateCatalogs / AssetReference
dotween-designDOTween.Init / DOMove / Sequence / SetLoops / SetLink / ToUniTask
netcode-designNetworkBehaviour / RPC / NetworkVariable / Spawn
shadergraph-designGraph structure, node chains, SubGraph boundaries, keyword / blackboard layout
unitask-designasync UniTask / UniTaskVoid / PlayerLoopTiming / CancellationToken / WhenAll
yooasset-designResourcePackage / AssetHandle / Downloader / FileSystem / AssetBundleBuilder
yaml-editingHand-editing .unity / .prefab / .asset / .meta / ProjectSettings YAML when REST cannot reach (compile failure, .meta, hidden ProjectSettings fields, merge conflict)

Unity API reference: references/​*.md — official API grouped by topic (2d, 3d, animation, assets, audio, editor, networking, physics, rendering, scripting, shaders, ui, xr, …). Read the relevant file to ground exact signatures instead of guessing.

Load any module via the index: unity-skills/​skills/<module>/​SKILL.md.

Route

  • Module index: unity-skills/​skills/​SKILL.md
  • Script guidance: unity-skills/​skills/​script/​SKILL.md
  • Advisory guidance: load advisory modules on demand from the module index

XR rule: Before calling any xr_* skill in a session, load skills/​xr/​SKILL.md first. XR is reflection-based; wrong property names can fail silently.

More skills from gabrielmoreira

workflow-router logo
gabrielmoreira/agent-skills-mirror

workflow-router

研发工作流入口 - 帮助用户快速进入正确的工作流阶段。 触发关键词: 工作流, 流程, 从哪开始, 帮我, 我该怎么做, 下一步, workflow, 不知道用什么, 新手引导, 怎么用

19 0
View
平台架构知识 logo
gabrielmoreira/agent-skills-mirror

平台架构知识

Periodically refreshed mirror of agents, skills, prompts and instruction files from public repositories.

19 0
View
unity-profiler logo
gabrielmoreira/agent-skills-mirror

unity-profiler

Read-only Unity runtime performance snapshots — FPS, frame time, batches/draw calls, triangles/vertices, memory (total/mono/per-asset), object counts, AssetBundle stats. Exact signatures via GET /skills/schema.

19 0
View
ads-audit logo
gabrielmoreira/agent-skills-mirror

ads-audit

Full multi-platform paid advertising audit with parallel subagent delegation. Analyzes Google Ads, Meta Ads, LinkedIn Ads, TikTok Ads, Microsoft Ads, and Apple Ads accounts via 6 parallel audit agents. Amazon Ads, cross-platform attribution, and server-side tracking are covered by their standalon...

19 0
View
purple-cow-audit logo
gabrielmoreira/agent-skills-mirror

purple-cow-audit

Score product remarkability 1-10 to decide if it's worth promoting. Seth Godin's Purple Cow test. Triggers on: "is this product worth promoting", "should I promote", "product audit", "purple cow", "remarkable product", "is it remarkable", "rate this product", "product quality check", "worth my re...

19 0
View
unity-cleaner logo
gabrielmoreira/agent-skills-mirror

unity-cleaner

Project cleanup and audit — find unused assets, content-hash duplicates, missing references, empty folders, large assets, dependency trees; two-step confirm-token delete. Exact signatures via GET /skills/schema.

19 0
View
skill-manager-guide logo
gabrielmoreira/agent-skills-mirror

skill-manager-guide

**GUIDE SKILL** — Guide to the Skill Manager for Copilot extension. USE FOR: adding/removing skill repos, syncing skills, pushing feedback, configuring sync intervals, troubleshooting sync issues, understanding skill format. DO NOT USE FOR: creating new skills (use skill-creator), creating agents...

19 0
View
configure-nightwatch logo
gabrielmoreira/agent-skills-mirror

configure-nightwatch

Configures Laravel Nightwatch data collection, sampling rates, filtering rules, and redaction policies. Use when setting up Nightwatch, managing data volume, protecting sensitive data (PII), or optimizing event collection for production workloads.

19 0
View
research-and-write logo
gabrielmoreira/agent-skills-mirror

research-and-write

End-to-end workflow: research a topic and then write a LinkedIn post about it. Use this skill whenever the user wants the full pipeline — from a topic idea to a finished LinkedIn post. Triggers on: 'research and write a post about', 'create a LinkedIn post about [topic]', 'I want to post about', ...

19 0
View
AI Tutor Persona logo
gabrielmoreira/agent-skills-mirror

AI Tutor Persona

Periodically refreshed mirror of agents, skills, prompts and instruction files from public repositories.

19 0
View
unity-importer logo
gabrielmoreira/agent-skills-mirror

unity-importer

Asset import settings — texture/audio/model importers, sprite settings, per-platform overrides, and reimport. Exact signatures via GET /skills/schema.

19 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View