agentleFS
XenoneqqXenoneqq/unity-ai-skills/skills/unity-skill-package-setup/SKILL.md

unity-skill-package-setup

Skill1 starsChanged 2 months agoMITView on GitHub

Wire a Unity project up to these skills: install the plugin at project scope, write a CLAUDE.md and AGENTS.md that route each kind of work to the right skill and make every handed-over task offer to run through `unity-manage-work`, check the repo's .gitignore and scene merge setup, install the Unity CLI's Pipeline package so skills can drive a running editor, offer ProBuilder for a 3D game, scan what is already there, generate a STRUCTURE.md describing the real project layout, and scaffold the standard asset folders. Use when: "/unity-skill-package-setup", "set this project up for Claude", "link these skills to my Unity project", "add a CLAUDE.md for this Unity project", "scaffold the asset folders", or opening a Unity project that has no CLAUDE.md.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 4 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run once per project. Everything it writes lives in the user's Unity repo, so nothing here happens without asking — you are creating …

    line 17
  2. Distinctive:

    Check, report, and let the user decide.

    line 52
  3. Very specific:

    Read references/git-hygiene.md.

    line 73
  4. Very specific:

    Ask first — it writes .claude/settings.json, a tracked file everyone who clones inherits.

    line 92
  5. Very specific:

    If the user would rather keep it personal, drop --scope project — then the skills are theirs alone and the generated CLAUDE.md still …

    line 103
  6. Very specific:

    Ask first. It adds com.unity.pipeline to Packages/manifest.json and packages-lock.json, tracked files the whole team inherits, and it is an …

    line 122
  7. Very specific:

    Do both in the same closed window so the user closes the editor once.

    line 156
  8. Very specific:

    Read references/folder-scaffold.md for the default tree, what each folder is for, and the mechanics.

    line 163
  9. Distinctive:

    Create only what is missing: Never move or rename an existing folder here — that breaks references.

    line 166
  10. Very specific:

    Read references/first-run-scan.md and run it before writing STRUCTURE.md.

    line 178
  11. Very specific:

    Read references/project-memory.md for the content.

    line 213
  12. Very specific:

    The task rule: when the user hands over a task, offer to run it through unity-manage-work before starting, and only proceed directly if …

    line 219
  13. Distinctive:

    Never commit and never push from this skill.

    line 246

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Unity skill package setup

Run once per project. Everything it writes lives in the user's Unity repo, so nothing here happens without asking — you are creating tracked files and a folder layout the whole team inherits.

Safe to re-run: every step checks what is already there and adds only what is missing.

FileRead it when
references/git-hygiene.mdChecking .gitignore and scene merging (Step 3).
references/folder-scaffold.mdCreating the asset folders (Step 6).
references/first-run-scan.mdReading what the project already is (Step 7).
references/project-memory.mdWriting CLAUDE.md and AGENTS.md (Step 9).

1. Find the project and see what already exists

PV=$(find . -path '*/ProjectSettings/ProjectVersion.txt' -not -path '*/Library/*' -print -quit)
ROOT=$(dirname "$(dirname "$PV")")           # the Unity project
REPO=$(git rev-parse --show-toplevel)        # the repo — often one level up
echo "unity project: $ROOT"
echo "repo root    : $REPO"
ls "$REPO/CLAUDE.md" "$REPO/AGENTS.md" "$REPO/STRUCTURE.md" "$REPO/.claude/settings.json" 2>/dev/null
ls -d "$ROOT/Assets"/*/ 2>/dev/null

CLAUDE.md, AGENTS.md and STRUCTURE.md go at the repo root, not the Unity project root, because that is where Claude Code reads them. They often differ — a Unity project frequently sits one directory down.

If any of those files already exist, read them before writing anything. Never overwrite a file someone wrote by hand. Show the user what you would add and let them choose: merge the new sections in, or leave it alone.

2. Preflight the project

Check, report, and let the user decide. Do not fix these silently — each one rewrites or reconfigures their project:

  • Serialization mode. m_SerializationMode: 2 in ProjectSettings/EditorSettings.asset. Anything else and scenes and prefabs are unmergeable binary. This is the single most valuable thing to fix at setup time — but flipping it re-serializes every asset in the project, so it is the user's call and it wants its own commit.
  • Editor version, from ProjectVersion.txt. It decides which path the other skills use: 6.0+ can drive a running editor, older is batch mode only.
  • Render pipeline — Built-in, URP or HDRP. It changes what a material or a shader asset fundamentally is, so it belongs in the generated CLAUDE.md. Read the graphics settings and the package manifest.
  • Assembly definitions. Count the .asmdef files. None means every script change recompiles the whole project, which is the difference between a two-second and a forty-second edit loop and taxes every batch run and every worker. Report it — adding them restructures compilation and is a task of its own, not a setup step.

Report all of it in one message rather than asking four times.

3. Git hygiene

Read references/git-hygiene.md. Two things decide whether this repo is workable at all.

.gitignore — check what git actually does, with git check-ignore, not what the file says. Library/, Temp/, Obj/, Logs/, Build/, MemoryCaptures/ and UserSettings/ must be ignored; every asset and every .meta under Assets/, at any depth must be tracked.

An ignored .meta is the highest-priority finding this skill can produce: assets arrive without their GUIDs on a fresh clone and every reference to them silently breaks. Say so plainly and before anything else.

Show additions to an existing .gitignore; never replace one. Offer Unity's standard template only when the file is missing entirely.

Scene merging — offer to wire up Unity's YAML-aware merge tool via .gitattributes. Ask first: it adds a tracked file and changes git config. Note that the .gitattributes half is shared but the git config half is per-clone, so each teammate runs it themselves.

4. Install the plugin at project scope

Ask first — it writes .claude/settings.json, a tracked file everyone who clones inherits.

claude plugin marketplace add Xenoneqq/unity-ai-skills --scope project
claude plugin install unity-ai-skills@unity-ai-skills --scope project

That commits the marketplace and the enabled plugin to the repo and copies nothing, so the whole team gets the skills and claude plugin update keeps them current. Say that the resulting .claude/settings.json should be committed.

If the user would rather keep it personal, drop --scope project — then the skills are theirs alone and the generated CLAUDE.md still documents the routing for everyone else.

5. Connect the editor CLI

The other skills drive the editor fastest through the Unity CLI's Pipeline package, which lets them run C# against a running editor instead of booting one in batch mode per change. Installing it is a one-time step per project, so it belongs here rather than in the middle of someone's task.

It needs the unity CLI and an editor 6.0 or newer. On an older project, skip this step and say the other skills will use batch mode. Without the CLI, say so and point the user at Unity's documentation for installing it; do not install it for them.

command -v unity && unity pipeline list --json --no-banner
grep -n '"com.unity.pipeline"' "$ROOT/Packages/manifest.json" || echo "pipeline package not installed"

Ask first. It adds com.unity.pipeline to Packages/manifest.json and packages-lock.json, tracked files the whole team inherits, and it is an experimental package.

The install has to run with the project closed. Unity reads the manifest when it loads the project, and the install refuses a project an editor has open, failing with PIPELINE_MANIFEST_WRITE_FAILED. If unity pipeline list shows an editor on this project, ask the user to save and close it themselves. Never close it for them: unity close exits without saving. Then install into the Unity project, which is not always the repo root:

unity pipeline install --project-path "$ROOT"
grep -n '"com.unity.pipeline"' "$ROOT/Packages/manifest.json"

The grep is the check that it landed. When the user next opens the project, unity pipeline list shows the editor with Pipeline available. unity-scene-habits has what the connected path can do and how to read its results.

ProBuilder, for a 3D game

unity-level-design blocks levels out best with ProBuilder: textures line up across walls of any length, doorways are real openings, and a person can push faces around afterwards. It is a 3D tool, so ask whether the game is 3D rather than deciding it. Detect a guess first and put it in the question:

grep -oE '"com\.unity\.(probuilder|feature\.2d|2d\.[a-z.]+)"' "$ROOT/Packages/manifest.json"

2D packages suggest a 2D game, but many 3D projects carry them too, which is why this is a question and not a rule. If the game is 3D and ProBuilder is missing, offer it in the same question, with the cost in one line: its meshes serialize into prefabs, so their files grow.

It is a package decision like Pipeline, and it installs the same way, with the project closed. Do both in the same closed window so the user closes the editor once. unity-scene-habits' references/batch-mode.md has the Package Manager recipe; the package id is com.unity.probuilder. A declined offer is fine: the level skill falls back to primitives. Record the answer, and Pipeline's, in the generated CLAUDE.md, so no later skill asks again.

6. Scaffold the asset folders

Read references/folder-scaffold.md for the default tree, what each folder is for, and the mechanics. The two that matter:

  • Create only what is missing. Never move or rename an existing folder here — that breaks references. Restructuring an existing project is a task in its own right, not a setup step.
  • Empty folders do not survive git. Mark each one with a .gitkeep. Files and folders starting with . are ignored by Unity's importer, so a .gitkeep needs no .meta and never appears in the project window — which makes it the only scaffold marker that does not create asset churn.

Show the user the tree you propose before creating any of it. A project with its own established layout keeps its own layout; adopt their names rather than imposing these.

7. Scan what is already there

Read references/first-run-scan.md and run it before writing STRUCTURE.md. A project adopting these skills has years of decisions in it; the scan reads them so the generated files describe the project rather than an ideal.

It is read-only — it changes nothing. Run the independent lookups as parallel read-only agents, and exclude third-party folders first or imported packages will dominate every ranking.

It produces three things: findings ordered by what hurts soonest, a backlog the user can hand straight to unity-manage-work, and the folder list STRUCTURE.md has to cover.

8. Write STRUCTURE.md

The structure file is the project's record of where things go, the thing CLAUDE.md points at when deciding where a new asset belongs, and the file unity-file-structure-habits checks the tree against. Generate it from the scan in Step 7 and what is actually on disk — never from the template — so it describes the project, including the folders that do not fit the scaffold.

Keep the folder list as a table, one row per folder, path first. That is the contract: it stays readable for a person and parseable for a drift check. Prose paragraphs describing the layout cannot be checked against anything.

PathWhat belongs there
Assets/Prefabs/Prefab assets, grouped by kind
Assets/Scripts/<Feature>/Runtime C# for one feature

Around the table: where scenes live and which are contested, the assembly definitions and what each covers, and the third-party folders that are off-limits.

Say in the file that it is expected to grow, that new categories are added as the project gains them rather than invented up front, and that a folder missing from the table is a gap in the table rather than a misplaced folder.

9. Write CLAUDE.md and AGENTS.md

Read references/project-memory.md for the content. In short, the generated CLAUDE.md carries:

  • A one-paragraph description of the project, the editor version, and the path to the Unity project if it is not the repo root.
  • The routing table — which skill covers which kind of work, so the right one fires without the user naming it.
  • The task rule: when the user hands over a task, offer to run it through unity-manage-work before starting, and only proceed directly if they decline.
  • The project's own hard rules: prefab-first, never hand-edit .unity/.prefab/.meta, every asset committed with its meta, and a pointer to STRUCTURE.md for where things go.

AGENTS.md covers the same ground for tools that read that filename instead. Write it as a short file that points at CLAUDE.md rather than duplicating it — two copies of the same rules drift.

10. Verify and report

ls "$REPO/CLAUDE.md" "$REPO/AGENTS.md" "$REPO/STRUCTURE.md"
git -C "$REPO" status --short

Then tell the user, in this order:

  1. Anything broken that they must decide on, first: an ignored .meta, serialization not set to Force Text, UserSettings/ committed, a missing editor version, no licence.
  2. What you created, and what you left alone because it already existed. Say whether the Pipeline package went in, was already there, or was skipped and why, and the same for ProBuilder.
  3. The backlog from the scan — the real work the project needs, ordered, and the offer to run it through unity-manage-work.
  4. That nothing is committed. Suggest it as its own commit — setup is not a feature change and should not ride along with one.

Never commit and never push from this skill.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.