Skip to content

Add new-unity-project + unity-package-management skills; new-project workflow & references for unity-cli#25

Open
andresbayon wants to merge 7 commits into
mainfrom
unity-cli/add-new-project-workflow
Open

Add new-unity-project + unity-package-management skills; new-project workflow & references for unity-cli#25
andresbayon wants to merge 7 commits into
mainfrom
unity-cli/add-new-project-workflow

Conversation

@andresbayon

@andresbayon andresbayon commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

What

A self-contained set of skill changes for the "start a new Unity project" journey — replacing the standalone new-unity-project skill in #24 with a cleaner split across a guided orchestrator and two focused reference skills.

Five changes, one PR:

  1. unity-cli — "Bootstrap a new project from scratch" workflow. The CLI-covered path (auth/license → editor + platform modules → template → project → source control → commit), with editor-stream guidance and Git LFS.
  2. unity-package-management (new skill). Headless UPM installs via the C# PackageManager.Client API (the -quit gotcha, add/remove/upgrade, registry search) + a genre/platform/monetization → package reference. Fills a real gap: the unity CLI has no package command.
  3. new-unity-project (new skill). A thin, slash-invocable orchestrator: guided AskUserQuestion flow that backgrounds the multi-minute editor install while it keeps asking, then delegates all mechanics to unity-cli + unity-package-management and hands off monetization. No command reference, no game skeleton.
  4. unity-cli refactor. Split the ~1,493-line (~15.5k-token) SKILL.md — the command catalog was ~78% of it and loaded on every trigger — into a lean ~311-line (~3.5k-token) SKILL.md (install, flags, env vars, exit codes, a command index table, common workflows) plus 7 lazy-loaded references/ files.
  5. unity-clinew-unity-project disambiguation. Now that the orchestrator exists, narrowed unity-cli's description so it no longer competes on the greenfield "new game" trigger (it keeps "create projects" as a plain CLI capability and points greenfield requests at new-unity-project). Kept the bootstrap workflow — it's the recipe new-unity-project delegates to and also serves direct-CLI users — and added a note at its top pointing to the guided skill.

Why (vs. #24)

As discussed in review (@ewhittom), a single broad orchestration skill overlapped unity-cli and buried the flow. Splitting by capability keeps each skill discoverable and non-overlapping:

  • The CLI recipe lives in unity-cli (where there was no getting-started flow).
  • Package installation isn't a CLI operation but is a reusable capability → its own skill.
  • The guided experience @ewhittom liked (explicit /new-unity-project + useful questions + running installs in parallel with the conversation) lives in a thin orchestrator that delegates, not duplicates.
  • The refactor addresses the "buried in a very long doc" concern and cuts per-trigger tokens, which matters now that new-unity-project delegates into unity-cli.
  • The disambiguation keeps the two skills from a trigger tug-of-war: new-unity-project owns "start a new game," unity-cli owns the CLI mechanics, with a signpost between them.

Deliberately deferred from #24

  • Game-skeleton scaffolding (asmdef, GameManager, gameplay scripts, SceneScaffolder). @ewhittom flagged it as the weakest step ("mocked primitives… need better access to pre-made assets"). Generic genre scaffolding is hard to make good; shipping it now would bless throwaway output. new-unity-project stops at a clean, running, empty-but-wired project and points the user to iterate from there. Revisit when there's real pre-made-asset access.

Refactor safety

  • All 32 command sections move verbatim; heading sets are identical (diff empty) and line accounting balances exactly (1,197 body lines + 7×8 header lines = 1,253). The index table keeps the full command surface + descriptions in-context so nothing is hidden. Fixed the cross-references the split/disambiguation touched.

README

Fixed the stale table (it listed only 1 of the 4 existing skills) and added new-unity-project and unity-package-management.

Security

Consistent with the #21 credential hardening:

  • Source-control tokens use --git-token-stdin only — never --git-token <pat>.
  • .gitignore is downloaded to a file (curl -o), never piped to a shell; package skill uses read-only HTTPS registry queries only.
  • No secret literals, no curl | sh, no internal URLs/services; diff scanned clean of emoji / zero-width / variation-selector characters.

Not yet validated (worth a human pass)

  • The C# scripts in unity-package-management (the async -quit pattern) haven't been run end-to-end here — worth a real headless test.
  • new-unity-project's background-install ordering is best confirmed with a live run.

Relationship to #24

Supersedes #24 entirely. Suggest closing it; deferring to maintainers.

🤖 Generated with Claude Code

Fold the CLI-covered path from the proposed new-unity-project skill (#24)
into the existing unity-cli skill instead of shipping a second, overlapping
skill. A single discoverable skill is easier for users to find than two that
overlap on project creation.

- Add a "Bootstrap a new project from scratch" workflow (auth+license →
  editor+platform modules → template → project → source control → commit),
  hardened to the skill's existing credential posture: --git-token-stdin only,
  and the .gitignore is downloaded to a file, never piped to a shell.
- Reference the dedicated skills (implement-in-app-purchases,
  levelplay-unity-integration, build-live-game) for monetization/backend, and
  note that UPM packages are managed in-Editor — out of scope for the CLI.
- Mention project bootstrapping in the skill description for discoverability.
- Fix the stale README table, which listed only 1 of the 4 existing skills.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 8, 2026 12:29
@andresbayon andresbayon requested a review from a team as a code owner July 8, 2026 12:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a “Bootstrap a new project from scratch” getting-started workflow to the existing unity-cli skill (instead of introducing a separate overlapping skill), and updates repository docs so the available skills list is accurate and more discoverable.

Changes:

  • Expanded unity-cli skill description to explicitly include project bootstrapping/creation.
  • Added a new “Bootstrap a new project from scratch” workflow under Common workflows in unity-cli/SKILL.md.
  • Fixed/expanded the root README skills table to list all existing skills (and refreshed the unity-cli description).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
skills/unity-cli/SKILL.md Adds a new end-to-end project bootstrap workflow and updates the skill description for discoverability.
README.md Updates the “Available skills” table to list all current skills and align the unity-cli description.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/unity-cli/SKILL.md
Comment on lines +1320 to +1322
Take an idea to a running, version-controlled project using only the CLI. Decide the **target
platforms first** — they determine which Editor modules you install in step 2, and a project
created without the right module can't build for that platform.
Comment thread skills/unity-cli/SKILL.md Outdated
Comment on lines +1352 to +1355
unity projects create "MyGame" --path ~/UnityProjects \
--editor-version lts --template com.unity.template.3d \
--vcs github --git-namespace my-org --git-repo my-game \
--git-visibility private --git-default-branch main --git-token-stdin
andresbayon and others added 2 commits July 8, 2026 14:34
…rkflow

Fold in the two in-scope items from the new-unity-project proposal (#24) that
belong in the source-control and editor-selection steps:
- Git LFS for asset-heavy projects (both the --git-lfs one-step flag and the
  manual git lfs track path for a local repo).
- A one-line LTS vs. Tech vs. beta/alpha trade-off so agents know when to
  reach past the default LTS.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…API)

The Unity CLI has no package-management command, so this fills that gap with a
focused, reusable skill — distinct from unity-cli and usable against any
project, not just new ones. Piled from the package portions of the proposed
new-unity-project skill (#24), cleaned up and made standalone:

- SKILL.md: the -quit gotcha (why direct Editor invocation, not `unity run`),
  the AddAndRemove installer (add/remove/upgrade in one pass), a Client.Search
  discovery script, the headless run, and verification.
- references/select-packages.md: genre/look/platform/monetization -> package
  mapping and registry discovery (in-Editor SearchAll + read-only registry curl).

Cross-linked from the unity-cli bootstrap workflow, and added to the README.

Security: read-only registry queries over HTTPS, no curl|bash pipes, no secret
literals, no internal references; scripts live under Editor/ and never ship.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@andresbayon andresbayon changed the title docs(unity-cli): cover new-project bootstrap in the existing skill unity-cli: new-project bootstrap workflow + unity-package-management skill Jul 8, 2026
A thin, slash-invocable composer that gives the guided "idea -> running
project" experience without duplicating the reference skills. It owns the flow
only — questions, ordering, and handoffs — and delegates all mechanics:

- Guided AskUserQuestion flow (concept -> platforms/monetization).
- Backgrounds the multi-minute Editor install while it keeps asking questions,
  so setup overlaps the conversation (the key win over a raw recipe).
- Delegates commands to unity-cli and package installs to
  unity-package-management; hands off monetization to implement-in-app-purchases
  / levelplay-unity-integration / build-live-game.
- Deliberately NO gameplay scaffolding (the weak, throwaway-primitive step) and
  NO command reference (lives in the delegated skills).

Addresses the standalone-skill benefits raised in review (explicit /invocation
+ guided questions + parallel installs) while avoiding the overlap that
motivated folding the recipe into unity-cli.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SKILL.md was ~1,493 lines (~15.5k tokens) and loaded in full on every trigger,
even for a narrow lookup like "install an editor". Split the command catalog
(~78% of the doc) into grouped reference files that load lazily, keeping only
the high-frequency core in SKILL.md.

- SKILL.md (now ~311 lines / ~3.5k tokens): install/verify, global flags, env
  vars, exit codes, a compact command index table (preserves the full command
  surface + descriptions cheaply so nothing is "hidden"), and Common workflows.
- references/: auth-license-cloud, editors-install, projects-templates,
  config-hub, build-run-test, diagnostics-maintenance, integration-advanced.

Content preserved verbatim: all 32 command sections move unchanged; heading
sets are identical and line accounting balances exactly (1,197 body lines +
7x8 header lines). Fixed the one cross-reference the split invalidated.

No behavior change — purely per-trigger token/latency reduction for the common
narrow-lookup case, following the repo's "move long reference material into
separate files" guidance.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@andresbayon andresbayon changed the title unity-cli: new-project bootstrap workflow + unity-package-management skill Add new-unity-project + unity-package-management skills; new-project workflow & references for unity-cli Jul 8, 2026
andresbayon and others added 2 commits July 8, 2026 16:24
Now that the guided orchestrator exists, stop competing with it on triggering
while keeping the shared recipe it delegates to:
- Narrow the description: drop the "bootstrap/create from scratch" greenfield
  intent (that routes to new-unity-project); keep "create projects" as a plain
  CLI capability, and point greenfield requests at new-unity-project.
- Keep the "Bootstrap a new project from scratch" workflow (it's the recipe
  new-unity-project delegates to and serves direct-CLI users) and add a note at
  its top pointing to the guided skill.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
new-unity-project Step 6 pointed to "a headless save" that no skill actually
documented. Add ProjectSaver.SaveAll (synchronous AssetDatabase.Refresh +
SaveAssets, safe via `unity run`) to unity-package-management so new/CI
projects can generate .meta files headlessly, and point Step 6 at it.

Carries over the last useful piece from the original new-unity-project draft
(#24) that wasn't yet covered; the game skeleton remains intentionally deferred.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants