Skip to content

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

Merged
andresbayon merged 11 commits into
mainfrom
unity-cli/add-new-project-workflow
Jul 9, 2026
Merged

Add new-unity-project + unity-package-management skills; new-project workflow & references for unity-cli#25
andresbayon merged 11 commits into
mainfrom
unity-cli/add-new-project-workflow

Conversation

@andresbayon

@andresbayon andresbayon commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Status — initial version, iterate from feedback

This ships the first version of the new-project commands/skills. The end-to-end path works, but the game-creation workflow depth isn't guaranteed complete (none of us are game-workflow experts), so this is deliberately a v1 we expect to refine from real usage. Known, intentional follow-ups are listed under "Deferred" and "Not yet validated" below — happy to file them as issues after merge.

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.
  2. unity-package-management (new skill). Headless UPM installs via the C# PackageManager.Client API (the -quit gotcha, add/remove/upgrade, registry search, headless .meta save) + 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. Narrowed unity-cli's description so it no longer competes on the greenfield "new game" trigger; kept the bootstrap workflow (the recipe new-unity-project delegates to) with a note 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.
  • The disambiguation keeps the two skills from a trigger tug-of-war.

Source control is a user choice (not defaulted)

Both the workflow and the orchestrator now present Git (GitHub/GitLab, with --git-lfs for asset-heavy games) and Unity Version Control (--vcs uvcs, which handles large binaries natively — no LFS) as parallel options and ask the user which they want, rather than nudging everyone toward Git LFS.

Deferred from #24 (intentional)

  • Game-skeleton scaffolding (asmdef, GameManager, gameplay scripts, SceneScaffolder). @ewhittom flagged it as the weakest step ("mocked primitives… need better access to pre-made assets"). new-unity-project stops at a clean, running, empty-but-wired project and points the user to iterate. 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. 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> (UVCS uses Unity sign-in, no token).
  • .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 internal URLs/services; diff scanned clean of emoji / zero-width / variation-selector characters.
  • On piped installers: the only curl … | bash / irm … | iex is the pre-existing official Unity CLI installer (Step 1 of unity-cli, over HTTPS from Unity's CDN) — not added by this PR. Everything this PR adds avoids piping to a shell (e.g. the Unity .gitignore via curl -o, and read-only registry queries in unity-package-management).

Not yet validated (worth a human pass)

  • The C# scripts in unity-package-management (PackageInstaller async -quit, PackageSearch, ProjectSaver.SaveAll) haven't been run end-to-end here.
  • 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 Outdated
Comment thread skills/unity-cli/SKILL.md Outdated
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 3 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>
Previously both skills nudged toward Git LFS for asset-heavy games without
mentioning Unity Version Control (UVCS), which handles large binaries natively
(no LFS) and is often the better fit for art-heavy projects/teams. The CLI
already supports --vcs uvcs, so let the user choose:
- unity-cli bootstrap workflow: present Git (GitHub/GitLab, + --git-lfs) and
  UVCS (--vcs uvcs, --vcs-region) as parallel options with examples.
- new-unity-project Step 4: ask the user which VCS they want rather than
  assuming Git LFS.

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

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

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

Comment thread skills/unity-cli/references/auth-license-cloud.md Outdated
Comment thread skills/unity-cli/references/editors-install.md Outdated
Comment thread skills/unity-cli/references/projects-templates.md Outdated
Comment thread skills/unity-cli/references/config-hub.md Outdated
Comment thread skills/unity-cli/references/build-run-test.md Outdated
Comment thread skills/unity-cli/references/diagnostics-maintenance.md Outdated
Comment thread skills/unity-cli/references/integration-advanced.md Outdated
Comment thread skills/new-unity-project/SKILL.md Outdated
Comment thread skills/unity-cli/SKILL.md
Comment thread skills/new-unity-project/SKILL.md Outdated
…din)

- Fix empty H1 in all 7 unity-cli reference files (a printf helper never
  received the title arg, so each rendered "#  — unity-cli command reference").
- new-unity-project: use --no-initial-commit when publishing via --vcs so the
  CLI doesn't commit before packages/.meta exist, and make Step 6's first
  commit VCS-aware (Git vs UVCS check-in; avoid double-commit).
- unity-cli bootstrap: note modules can be added later (not irreversible), show
  feeding --git-token-stdin from a secret store, and mention --no-initial-commit.

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

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

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

Comment thread skills/unity-package-management/SKILL.md Outdated
Comment thread skills/unity-package-management/references/select-packages.md Outdated
Round-2 Copilot review, both concrete:
- The Editor log for the direct-Editor package run is the `-logFile -` stdout,
  not `unity logs` (which reads the CLI's own log) — corrected the pointer.
- Registry discovery used `curl -s`, which exits 0 on a 404 and pipes an error
  page into python; switched to `curl -fsSL` so HTTP errors fail loudly.

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

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment thread skills/unity-cli/references/projects-templates.md
Round-3 Copilot review: projects create / link vcs use --git-namespace /
--git-repo, while projects clone uses --vcs-namespace / --vcs-repo. Both are
correct per the CLI; documented the difference to prevent copy/paste errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@andresbayon andresbayon merged commit 69c5e1d into main Jul 9, 2026
3 checks passed
@andresbayon andresbayon deleted the unity-cli/add-new-project-workflow branch July 9, 2026 13:29
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.

3 participants