Skip to content

fix: Make PowerShell multiline code guidance clearer#1355

Merged
hatayama merged 2 commits into
v3-betafrom
feature/improve-windows-multi-line-code
Jun 16, 2026
Merged

fix: Make PowerShell multiline code guidance clearer#1355
hatayama merged 2 commits into
v3-betafrom
feature/improve-windows-multi-line-code

Conversation

@hatayama

@hatayama hatayama commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Clarifies that PowerShell 7 users can pass multiline dynamic-code snippets directly with a single-quoted here-string.
  • Keeps --code-file guidance for Windows PowerShell 5.1 and launchers that cannot preserve inline code exactly.

User Impact

  • Users who want a bash heredoc-like workflow in PowerShell can now find the equivalent pattern immediately.
  • The guidance makes it clearer when --code is enough and when --code-file is still the safer option.

Changes

  • Updated the execute-dynamic-code skill parameter guidance.
  • Moved the PowerShell here-string example earlier in the PowerShell automation reference.
  • Regenerated the tracked Claude Code and .agents skill copies from the source skill files.

Verification

  • git diff --check
  • rg -n "here-string|code-file|old .*cmd|PowerShell 5.1|native Go" Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill .claude/skills/uloop-execute-dynamic-code .agents/skills/uloop-execute-dynamic-code -S
  • Checked source and generated skill file hashes match.
  • Not run: Unity compile, because this changes only Markdown skill guidance.

Review in cubic

Explain that PowerShell 7 here-strings can pass multiline snippets directly to --code without a temporary file, while keeping --code-file guidance for Windows PowerShell 5.1 and launchers that do not preserve inline code exactly.
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 45552a1b-93f1-4fbb-bfb8-4ec5bf778ab1

📥 Commits

Reviewing files that changed from the base of the PR and between d36b1f1 and 5ed87cf.

📒 Files selected for processing (6)
  • .agents/skills/uloop-execute-dynamic-code/SKILL.md
  • .agents/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md
  • .claude/skills/uloop-execute-dynamic-code/SKILL.md
  • .claude/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md
  • Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/references/playmode-automation-powershell.md
✅ Files skipped from review due to trivial changes (2)
  • Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/references/playmode-automation-powershell.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • .agents/skills/uloop-execute-dynamic-code/SKILL.md
  • .agents/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md
  • .claude/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md

📝 Walkthrough

Walkthrough

Updates PowerShell shell-quoting and --parameters JSON object-literal documentation for uloop execute-dynamic-code across three mirrored skill locations. The --code quoting bullet and --parameters guidance in each SKILL.md are refined, and each playmode-automation-powershell.md is expanded with here-string patterns, updated native launcher check wording, and revised multi-line snippet recommendations.

Changes

PowerShell Quoting and Parameters Documentation Updates

Layer / File(s) Summary
SKILL.md shell-quoting and --parameters documentation
.agents/skills/uloop-execute-dynamic-code/SKILL.md, .claude/skills/uloop-execute-dynamic-code/SKILL.md, Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/SKILL.md
The --code Shell quoting bullet is updated across all three locations to describe PowerShell 7 multiline here-string usage and Windows PowerShell 5.1 double-quote escaping or --code-file fallback. The --parameters {} guidance is revised to specify passing a shell-quoted JSON object literal, document parameters["paramX"] access, and explicitly forbid JSON string values.
playmode-automation-powershell.md comprehensive guidance expansion
.agents/skills/.../references/playmode-automation-powershell.md, .claude/skills/.../references/playmode-automation-powershell.md, Packages/.../Skill/references/playmode-automation-powershell.md
PowerShell Quoting Notes section is expanded across all three mirrored files: adds single-quoted here-string (@' ... '@) patterns with inline --code examples, updates native launcher check text to reference an old .cmd shim and the uloop install + fresh terminal requirement, clarifies --parameters to require JSON object literals (not strings), and changes multi-line C# snippet guidance to recommend using here-string variables for preparing or reusing snippets in PowerShell 7. The combination guidance is updated to reference pairing multi-line code with multi-line JSON object literals.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • hatayama/unity-cli-loop#947: The main PR's edits to PowerShell quoting and --parameters JSON-literal guidance in playmode-automation-powershell.md and SKILL.md build directly on the PowerShell-focused PlayMode automation documentation introduced by this PR.
  • hatayama/unity-cli-loop#847: Both PRs update the uloop execute-dynamic-code documentation—particularly the --parameters {} behavior and associated shell/PowerShell quoting guidance—with overlapping changes to parameter access patterns.
  • hatayama/unity-cli-loop#1302: Both PRs update uloop execute-dynamic-code skill documentation, though this PR focuses specifically on shell-quoting and JSON object-literal --parameters guidance rather than execution workflow constraints.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: clarifying PowerShell multiline code guidance, which is the core focus of updates across all modified documentation files.
Description check ✅ Passed The description is directly related to the changeset, explaining the motivation, user impact, and specific changes made to PowerShell multiline code guidance across multiple skill documentation files.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/improve-windows-multi-line-code

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 and usage tips.

@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: 1

🤖 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 `@Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/SKILL.md`:
- Around line 28-29: The `--parameters` flag documentation is inconsistent
across multiple files: the SKILL.md files state to pass an object instead of a
JSON string, but the PowerShell examples in playmode-automation-powershell.md
references contradict this by using JSON strings. First, clarify the
documentation at lines 28-29 in
Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/SKILL.md,
.agents/skills/uloop-execute-dynamic-code/SKILL.md, and
.claude/skills/uloop-execute-dynamic-code/SKILL.md to explicitly specify the
canonical form for `--parameters`. Then, update the PowerShell parameter
examples at lines 76-128 in
Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/references/playmode-automation-powershell.md,
.agents/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md,
and
.claude/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md
to use the same form as documented in the SKILL.md files, ensuring all
invocation examples are consistent.
🪄 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: 7fcc57e8-5417-4974-a8be-4c78015c8273

📥 Commits

Reviewing files that changed from the base of the PR and between 0e5ee2c and d36b1f1.

📒 Files selected for processing (6)
  • .agents/skills/uloop-execute-dynamic-code/SKILL.md
  • .agents/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md
  • .claude/skills/uloop-execute-dynamic-code/SKILL.md
  • .claude/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md
  • Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/references/playmode-automation-powershell.md

Comment thread Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/Skill/SKILL.md Outdated

@cubic-dev-ai cubic-dev-ai Bot 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.

1 issue found across 6 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@hatayama hatayama changed the title chore: Make PowerShell multiline code guidance clearer fix: Make PowerShell multiline code guidance clearer Jun 16, 2026
Align the PowerShell skill guidance with the CLI object parameter contract and use the current Unity object lookup API in the new multiline example.
@hatayama hatayama merged commit 3571823 into v3-beta Jun 16, 2026
6 checks passed
@hatayama hatayama deleted the feature/improve-windows-multi-line-code branch June 16, 2026 06:49
@github-actions github-actions Bot mentioned this pull request Jun 16, 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