Workflows
Print mode for quick review
Use -p flag for fast, non-interactive one-shot answers.
Goal
Get a quick answer or analysis without entering an interactive session.
Outcome: Fast, scriptable output for common questions, reviews, and transformations.
ProductivityReview
BasicSteps
1
Ask a question about a file
Pipe a file into Claude for instant analysis.
cat src/auth.ts | claude -p "explain what this file does"2
Summarize a git diff
Get a readable summary of recent changes.
git diff HEAD~1 | claude -p "write a commit message for these changes"3
Check a config file
Validate or explain a configuration.
cat .eslintrc.json | claude -p "are there any issues with this config?"4
Use in a script
Chain print mode into shell scripts.
echo "$ERROR_LOG" | claude -p "is this a known error and how do I fix it?"