feat: label CLI invocations with caller and skill (blocked on the next CLI release) - #31
Open
ziyiunity wants to merge 1 commit into
Open
feat: label CLI invocations with caller and skill (blocked on the next CLI release)#31ziyiunity wants to merge 1 commit into
ziyiunity wants to merge 1 commit into
Conversation
Every `unity command` example in a skill that drives the Editor now passes `--caller plugin --skill <name>`, and unity-cli states the rule so it applies to invocations no example covers. CLI-951 added the two flags and CLI-1152 made `--caller plugin` survive normalization rather than folding to `other`. Rebuilt on top of the unity-cli refresh (#36), which replaced that skill's SKILL.md wholesale, and extended to migrate-birp-to-urp and generate-editor-search-query, which landed after this branch was first written and also invoke `unity command`.
ziyiunity
force-pushed
the
feat/attribute-cli-invocations
branch
from
September 8, 2026 19:15
46ecea3 to
14c9fb7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every
unity commandexample in a skill that drives the Editor now passes--caller plugin --skill <name>, andunity-clistates the rule so it applies to the invocations no example covers:Why
A CLI call made by this plugin is otherwise indistinguishable from one a user typed, so plugin usage cannot be told apart from CLI usage generally, and per-skill usage cannot be seen at all. The two flags carry that on the command line, which is the only place it can travel: by the time the CLI starts, nothing in the process, the args, or the environment records that a skill produced the call.
Coverage
All eight skills that invoke
unity command:unity-cli,audio-setup-mixers,optimize-audio,optimize-web,sprite-editor,urp-postprocessing,migrate-birp-to-urp,generate-editor-search-querynew-unity-projectandunity-package-managementdrive the CLI too, but throughunity installandunity projects, which do not take these flags — so their usage stays invisible to this. Worth knowing before reading any per-skill numbers.Blocked on
The next CLI release, not on a code change. Both halves are merged and sitting in
[Unreleased]:--callerand--skilltounity command.--caller pluginfolding toother, which it did on the first implementation.Merging before that release ships would break these eight skills: the released CLI (
1.0.0-beta.8) rejects--calleras an unknown option.How To Test/Validate
Against a CLI built from
dev, with a connected Editor:The command behaves exactly as it does without the flags. To see the labels reach analytics, point the CLI at a local collector with
UNITY_CLI_INTERNAL_ANALYTICS_URLand checkcallerandskillon thecommand executedevent. Note that CLI analytics resolves to theanonymousconsent row, so that row has to be opted in for anything to be sent.