Skip to content

fix: Slim down and deduplicate agent skill files, add repository map#1876

Merged
hatayama merged 7 commits into
v3-betafrom
refactor/skill-md-improvements
Jul 20, 2026
Merged

fix: Slim down and deduplicate agent skill files, add repository map#1876
hatayama merged 7 commits into
v3-betafrom
refactor/skill-md-improvements

Conversation

@hatayama

@hatayama hatayama commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

Agent-facing skill files (SKILL.md) had grown uneven: the largest one loaded ~33KB of dense prose on every invocation, three input-simulation skills carried near-identical pause-point guidance, and one real documentation gap hid an existing tool feature. This PR restructures them using the existing references/ on-demand pattern and records repository structure facts that agents kept rediscovering from scratch.

Changes

  • screenshot: document --annotate-raycast-grid and --raycast-layer-mask in the Parameters table. Both flags exist in default-tools.json and the annotated-elements reference assumes them, but SKILL.md never mentioned them, so an agent reading only SKILL.md could not discover the 3D collider annotation flow. Align the --elements-only requirement text with the schema.
  • pause-point: split the ~33KB SKILL.md into a ~19KB core plus three on-demand references (captured-variables.md, watch-expressions.md, condition-triggered-pause.md). No information removed; the core keeps the workflow, line placement, and safety rules with explicit read-this-when pointers.
  • simulate-keyboard / simulate-mouse-input / simulate-mouse-ui: collapse the three near-identical Pause Point Inspection sections and output-field blocks down to tool-specific notes plus a pointer to the uloop-pause-point skill. Drop the $ARGUMENTS placeholder from simulate-keyboard (no other skill uses it; arguments are appended automatically when absent, and non-Claude targets receive the file verbatim).
  • execute-dynamic-code: compress the intro paragraphs that restated pause-point semantics, and move Windows/PowerShell quoting details to references/shell-quoting.md.
  • AGENTS.md: add a coarse Repository Map section and name the skill source paths and regenerate command in the Generated Skill Files section, which previously said "regenerate through the normal workflow" without naming it.

Validation

  • .claude/ and .agents/ copies regenerated with dist/darwin-arm64/uloop skills install --claude --agents; verified byte-identical to sources including the new references/ files.
  • uloop compile passed with 0 errors / 0 warnings; Unity generated the required .meta files for the new files under FirstPartyTools (tilde folder CliOnlyTools~ needs none).
  • Markdown/docs-only change: no Go/C# source touched, so no protocol version bump, release trigger stamps, or check-go-cli.sh run is required.

Review in cubic

hatayama added 4 commits July 20, 2026 23:01
…shot skill

The flags exist in the tool schema and the annotated-elements reference
assumes them, but the skill's Parameters table never mentioned them, so
an agent reading only SKILL.md could not discover the 3D collider
annotation flow. Also align the elements-only requirement text with the
schema (annotate-elements OR annotate-raycast-grid).
SKILL.md had grown to ~33KB of dense prose, all loaded on every skill
invocation. Move the deep-dive material to on-demand references while
keeping the core workflow, line placement, and safety rules inline:

- references/captured-variables.md: snapshot timing, scopes, preview
  caps, Unity object values, evidence-source trade-offs, raw capture API
- references/watch-expressions.md: evaluation rules and lifetime
- references/condition-triggered-pause.md: dynamic-code watcher pattern

Core SKILL.md keeps compact summaries with explicit read-this-when
pointers, shrinking it to ~19KB with no information removed.
The three simulate-* skills each carried a near-identical Pause Point
Inspection section and four near-identical pause-point output field
descriptions, and execute-dynamic-code restated pause-point semantics
that the uloop-pause-point skill already owns. Keep only the
tool-specific notes and point at that skill for the shared semantics.

Also move execute-dynamic-code's Windows/PowerShell quoting details to
references/shell-quoting.md, and drop the $ARGUMENTS placeholder from
simulate-keyboard: no other skill uses it, arguments are appended
automatically when absent, and non-Claude targets receive the file
verbatim where the placeholder is never substituted.
Agents kept rediscovering the same structural facts from scratch every
session (where skill sources live, how to regenerate the .claude/.agents
copies, which folders need .meta files, which Go module owns what).
Record them once at directory granularity: a coarse Repository Map
section, plus the concrete source paths and regenerate command in the
Generated Skill Files section, which previously said "regenerate through
the normal workflow" without naming it.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Documentation-only changes reorganize pause-point and dynamic-code guidance into references, add screenshot raycast-grid documentation, clarify input interruption semantics, and expand repository maintenance instructions.

Changes

Pause-point documentation

Layer / File(s) Summary
Pause-point overview guidance
.agents/skills/uloop-pause-point/SKILL.md, .claude/skills/uloop-pause-point/SKILL.md, Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md
Overview pages link to detailed captured-variable, watch-expression, and condition-trigger references.
Captured-variable semantics
*/uloop-pause-point/references/captured-variables.md, Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/references/captured-variables.md
References define capture timing, scopes, rendering, Unity object metadata, payload filtering, live APIs, lifecycle, and freshness fields.
Condition-triggered pauses
*/uloop-pause-point/references/condition-triggered-pause.md
References document update watchers, id-scoped pauses, CLI awaiting, cleanup, marker modes, and timing constraints.
Watch expressions
*/uloop-pause-point/references/watch-expressions.md
References document registration, evaluation, history, errors, duplicate IDs, clearing, limits, and lifetime.

Dynamic-code execution documentation

Layer / File(s) Summary
Dynamic-code guidance and shell references
*/uloop-execute-dynamic-code/SKILL.md, Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/SKILL.md, */references/shell-quoting.md
Dynamic-code pages redirect pause-point details to references and centralize shell, JSON parameter, Windows multiline, and --code-file guidance.

Screenshot annotation documentation

Layer / File(s) Summary
Raycast-grid annotation contract
*/uloop-screenshot/SKILL.md, Packages/src/Editor/FirstPartyTools/Screenshot/Skill/SKILL.md
Screenshot documentation adds raycast-grid options, layer masks, broadened --elements-only conditions, and raycast-layer output fields.

Input skill documentation

Layer / File(s) Summary
Keyboard interruption guidance
*/uloop-simulate-keyboard/SKILL.md, Packages/src/Editor/FirstPartyTools/SimulateKeyboard/Skill/SKILL.md
Keyboard guidance consolidates pause interruption semantics, press-edge reporting, hit metadata, and cleanup instructions.
Mouse input interruption guidance
*/uloop-simulate-mouse-input/SKILL.md, Packages/src/Editor/FirstPartyTools/SimulateMouseInput/Skill/SKILL.md
Mouse-input guidance clarifies bookkeeping, cleanup, nullable metadata, hit ordering, and latest-hit identification.
Mouse UI interruption guidance
*/uloop-simulate-mouse-ui/SKILL.md, Packages/src/Editor/FirstPartyTools/SimulateMouseUi/Skill/SKILL.md
Mouse UI guidance explains pointer-dispatch timing and consolidates interruption output fields.

Repository maintenance guidance

Layer / File(s) Summary
Repository map and generated-skill procedure
AGENTS.md
Repository responsibilities, source locations, regeneration commands, and tracked generated outputs are documented.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main documentation cleanup and repository map additions.
Description check ✅ Passed The description matches the documented changes and objectives in the changeset.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/skill-md-improvements

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…inter

The Warning/MatchingLogs and Generation/EnabledAtUtc explanations moved
to references/captured-variables.md, but the pointer sentence in the
core SKILL.md did not list them as a reason to read the reference, so an
agent seeing those fields had no breadcrumb to the moved guidance.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Around line 88-91: Update the regeneration instructions to avoid presenting
dist/darwin-arm64/uloop as universally executable. Document the command as a
macOS ARM-specific example and provide the appropriate locally built uloop
binary invocation for contributors on Linux, Windows, and Intel macOS, while
preserving the existing source and tracked-target guidance.

In `@Packages/src/Editor/FirstPartyTools/Screenshot/Skill/SKILL.md`:
- Around line 27-28: Remove the claim that --raycast-layer-mask hits are limited
by Camera.main.cullingMask; document that the option narrows clustering by the
specified physics layers and defaults to Physics.DefaultRaycastLayers when
omitted. Apply this update in
Packages/src/Editor/FirstPartyTools/Screenshot/Skill/SKILL.md,
.agents/skills/uloop-screenshot/SKILL.md, and
.claude/skills/uloop-screenshot/SKILL.md at lines 27-28, regenerating the latter
copies from the source.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f4df8706-2c50-404d-9444-3ad71f278a93

📥 Commits

Reviewing files that changed from the base of the PR and between af50cf4 and 03a467f.

⛔ Files ignored due to path filters (2)
  • Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/references.meta is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/references/shell-quoting.md.meta is excluded by none and included by none
📒 Files selected for processing (31)
  • .agents/skills/uloop-execute-dynamic-code/SKILL.md
  • .agents/skills/uloop-execute-dynamic-code/references/shell-quoting.md
  • .agents/skills/uloop-pause-point/SKILL.md
  • .agents/skills/uloop-pause-point/references/captured-variables.md
  • .agents/skills/uloop-pause-point/references/condition-triggered-pause.md
  • .agents/skills/uloop-pause-point/references/watch-expressions.md
  • .agents/skills/uloop-screenshot/SKILL.md
  • .agents/skills/uloop-simulate-keyboard/SKILL.md
  • .agents/skills/uloop-simulate-mouse-input/SKILL.md
  • .agents/skills/uloop-simulate-mouse-ui/SKILL.md
  • .claude/skills/uloop-execute-dynamic-code/SKILL.md
  • .claude/skills/uloop-execute-dynamic-code/references/shell-quoting.md
  • .claude/skills/uloop-pause-point/SKILL.md
  • .claude/skills/uloop-pause-point/references/captured-variables.md
  • .claude/skills/uloop-pause-point/references/condition-triggered-pause.md
  • .claude/skills/uloop-pause-point/references/watch-expressions.md
  • .claude/skills/uloop-screenshot/SKILL.md
  • .claude/skills/uloop-simulate-keyboard/SKILL.md
  • .claude/skills/uloop-simulate-mouse-input/SKILL.md
  • .claude/skills/uloop-simulate-mouse-ui/SKILL.md
  • AGENTS.md
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/references/captured-variables.md
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/references/condition-triggered-pause.md
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/references/watch-expressions.md
  • Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/references/shell-quoting.md
  • Packages/src/Editor/FirstPartyTools/Screenshot/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/SimulateKeyboard/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/SimulateMouseInput/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/Skill/SKILL.md

Comment thread AGENTS.md Outdated
Comment thread Packages/src/Editor/FirstPartyTools/Screenshot/Skill/SKILL.md
hatayama added 2 commits July 20, 2026 23:24
V3 talks to the Unity Editor over local IPC — a Unix domain socket on
macOS/Linux and a named pipe on Windows (BridgeTransportEndpoint) — and
no TCP code path remains. The overview sentence was a leftover from the
v2 architecture.
dist/darwin-arm64/uloop only exists on macOS ARM; tell contributors on
other platforms to substitute their platform binary, matching the
existing Native Go CLI Validation guidance.
@hatayama hatayama changed the title docs: Slim down and deduplicate agent skill files, add repository map fix: Slim down and deduplicate agent skill files, add repository map Jul 20, 2026
@hatayama
hatayama merged commit 6bf4f76 into v3-beta Jul 20, 2026
7 checks passed
@hatayama
hatayama deleted the refactor/skill-md-improvements branch July 20, 2026 14:42
@github-actions github-actions Bot mentioned this pull request Jul 20, 2026
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