Skip to content

refactor(unity-cli): split command catalog into references + index#27

Merged
andresbayon merged 1 commit into
unity-cli/add-new-project-workflowfrom
unity-cli-references
Jul 8, 2026
Merged

refactor(unity-cli): split command catalog into references + index#27
andresbayon merged 1 commit into
unity-cli/add-new-project-workflowfrom
unity-cli-references

Conversation

@andresbayon

Copy link
Copy Markdown
Collaborator

What

Splits the unity-cli skill's command catalog into lazy-loaded reference files, keeping a lean SKILL.md with a command index.

Stacked on #26#25. Merge those first; GitHub retargets this to main automatically.

Why

SKILL.md was ~1,493 lines (~15.5k tokens), and the ## Commands catalog alone was ~78% of it. That whole doc loads on every trigger — so "install an editor" also pulls in Android signing flags, the connected-editor pipeline, dev-only commands, MCP config, etc.

Skills load progressively: the SKILL.md body loads in full when triggered, but reference files load only when read. Moving the situational bulk into references cuts the per-trigger baseline for the common narrow-lookup case, and it compounds now that new-unity-project delegates into unity-cli.

Result

  • SKILL.md: ~311 lines (~3.5k tokens) — install/verify, global flags, env vars, exit codes, a compact command index table, and Common workflows.
  • references/ (7 files): auth-license-cloud, editors-install, projects-templates, config-hub, build-run-test, diagnostics-maintenance, integration-advanced.

The index table keeps the full command surface + one-line descriptions in-context cheaply, so the model never misses that a command exists — it just reads the one group file it needs for exact flags. This avoids the main downside of splitting (partial-view answers).

Safety of the move

  • Content preserved verbatim. All 32 command sections move unchanged; the heading sets are identical (diff empty) and line accounting balances exactly (1,197 body lines + 7×8 header lines = 1,253).
  • Fixed the single cross-reference the split invalidated ("see Auth/License above" → the reference file). All references/… links verified to resolve; "below/above" mentions inside each reference point within that same file.
  • No behavior change — purely a token/latency reduction. Follows the repo's own "move long reference material into separate files" guidance in CONTRIBUTING.

🤖 Generated with Claude Code

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 requested a review from a team as a code owner July 8, 2026 14:15
Base automatically changed from new-unity-project to unity-cli/add-new-project-workflow July 8, 2026 14:19
@andresbayon andresbayon merged commit ad2ed39 into unity-cli/add-new-project-workflow Jul 8, 2026
3 checks passed
@andresbayon andresbayon deleted the unity-cli-references branch July 8, 2026 14:19
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.

1 participant