$ recombobulate _
home / tips / pipe-commands-to-claude-for-quick-analysis
0

Pipe Commands to Claude for Quick Analysis

bagwaa @bagwaa · Mar 11, 2026 · Workflows
pipe-commands-to-claude-for-quick-analysis

The -p flag lets you run Claude as a non-interactive one-shot command — no session, no back-and-forth, just an instant answer piped straight back to your terminal.

# Feed a file directly to Claude
cat app/Models/User.php | claude -p "review this model for security issues"

# Explain a git diff
git diff HEAD~3 | claude -p "summarise these changes in plain English"

# Diagnose test failures
php artisan test 2>&1 | claude -p "explain why these tests are failing and what to fix"

You can also skip the pipe entirely for quick standalone questions:

claude -p "what's the difference between git rebase and git merge --no-ff?"
claude -p "what npm command removes unused packages from node_modules?"

Combine it with other shell tools to build powerful one-liners:

# Prioritise TODO comments across the codebase
grep -rn "TODO" src/ | claude -p "prioritise these TODOs by impact and complexity"

# Redirect from a file instead of piping
claude -p "summarise the key changes in this changelog" < CHANGELOG.md

# Pipe the output into a file
git log --oneline -20 | claude -p "write a release summary" > release-notes.md

The output lands on stdout, so you can pipe it further, redirect it to a file, or combine it with other commands in a script.

-p turns Claude into a shell tool — pipe in, answer out, no session required.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Scan Pending Changes for Security Issues with /security-review

The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.

bagwaa @bagwaa · 1 hour ago
0
Run Setup Scripts on Every Session with the SessionStart Hook

The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.

bagwaa @bagwaa · 1 hour ago
0
Write Property-Based Tests with fast-check and Claude

Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.

bagwaa @bagwaa · 2 hours ago