Skip to content

docs(skill): prefer --output flag over shell redirection - #1097

Open
yingjiexu2002 wants to merge 1 commit into
alibaba:mainfrom
yingjiexu2002:docs-skill-output-flag
Open

docs(skill): prefer --output flag over shell redirection#1097
yingjiexu2002 wants to merge 1 commit into
alibaba:mainfrom
yingjiexu2002:docs-skill-output-flag

Conversation

@yingjiexu2002

@yingjiexu2002 yingjiexu2002 commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

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 review natively 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.

  • Register --output / -o in the Argument handling catalog, with an upgrade gate for older CLIs (on unknown flag: --output, stop the review and ask the user before upgrading with @latest; never fall back to redirection or plain stdout silently)
  • Switch the Output mode guidance to --output, and align the Gotchas reminder with it
  • Add an unknown flag: --output Troubleshooting entry that mirrors the gate

Documentation only, no code changes.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional changes)
  • Documentation update
  • CI / Build / Tooling

How Has This Been Tested?

  • make test passes locally
  • Manual testing (describe below)

Verified 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 --output for 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

  • My code follows the project's coding style (go fmt, go vet)
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly (if applicable)
  • I have signed the CLA

Related Issues

Follow-up to #852 (the --output flag).

@github-actions

Copy link
Copy Markdown
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.
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