docs(skill): prefer --output flag over shell redirection - #1097
Open
yingjiexu2002 wants to merge 1 commit into
Open
docs(skill): prefer --output flag over shell redirection#1097yingjiexu2002 wants to merge 1 commit into
yingjiexu2002 wants to merge 1 commit into
Conversation
Contributor
|
✅ OpenCodeReview: Review skipped: no items were selected. |
…views Since v1.10.0, `ocr review` supports --output/-o to write results to a file directly, superseding the shell redirection workaround the skill taught for preventing output truncation. Register the flag in the Argument handling catalog, switch the Output mode guidance to --output, align the Gotchas reminder, and add an `unknown flag: --output` Troubleshooting entry. On older CLIs the skill stops the review, asks the user before upgrading, and never falls back to redirection or plain stdout silently.
yingjiexu2002
force-pushed
the
docs-skill-output-flag
branch
from
September 7, 2026 12:34
a8b7df5 to
e787e1f
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.
Description
The agent skill taught shell redirection (
> /tmp/ocr_out.txt 2>&1) as the way to avoid losing review comments to tool-output truncation. Since #852 (v1.10.0),ocr reviewnatively supports--output <path>/-o, which writes results directly to a UTF-8 file and fits agents better than shell redirection.This PR updates the skill in four places, in both the canonical and the plugin mirror copy.
--output/-oin the Argument handling catalog, with an upgrade gate for older CLIs (onunknown flag: --output, stop the review and ask the user before upgrading with@latest; never fall back to redirection or plain stdout silently)--output, and align the Gotchas reminder with itunknown flag: --outputTroubleshooting entry that mirrors the gateDocumentation only, no code changes.
Type of Change
How Has This Been Tested?
make testpasses locallyVerified both SKILL.md copies stay identical except the intentional mirror note, the flag descriptions match the CLI help and the cli-reference docs, and line endings are LF. Also tested end-to-end with Claude Opus 4.6, which followed the updated skill and used
--outputfor the review run. On an older CLI (pre-v1.10.0), the agent stopped the review and asked whether to upgrade instead of silently falling back to stdout.Checklist
go fmt,go vet)Related Issues
Follow-up to #852 (the
--outputflag).