Minideas

Idea 5 of 15 · Claude Code

Working while you’re away

Run it from scripts, on a schedule or on pull requests, then check what it did.

>_@claudein a scriptclaude -pon a schedulein the cloudin GitHubin pull requestsnobody watching, so rules and checks matter more
1 / 4

Headless, scheduled and GitHub runs

Claude Code can run with nobody at the keyboard: from a script or an automated pipeline (claude -p), as a task scheduled in the cloud (/schedule), or in GitHub, where it answers when someone writes @claude in a pull request. With nobody watching, permissions and hooks matter even more.

$ git diff main | claude -p "find typos" > report.txtthe diffclaude -preport.txtexit code 0a script can check it--allowedToolswhat it may do alone
2 / 4

claude -p: Claude in a script

claude -p runs one prompt without the interactive session: pipe input in, and it prints the answer and exits, with exit code 0 on success. Nobody is there to approve steps, so list what it may do with --allowedTools. Add --output-format json when another program reads the result.

Fix discount total #52-++Applies thediscounttwice here.comments on the exact lines
3 / 4

Reviews on pull requests

Claude can review code too. Run /code-review in a session for a check before you push, or have an admin switch on Code Review, so every pull request on GitHub is reviewed automatically, with comments on the exact lines.

Fixed! The discount is nowapplied only once.Show me the proof:the failing test now passesthe full diff?what it couldn’t checkthe less you watched, the more you check
4 / 4

Verify the result

Claude can say “Fixed!” just as confidently when the fix doesn’t work. Don’t take its word: ask to see the failing test that now passes, the full diff, and what it couldn’t check. The less you watched it work, the more carefully you check.

Swipe the card, or use the arrow keys.

Go deeper

Each card stack gives you the idea. These open resources go into the detail.

Notes on the Claude Partner Network learning path on Anthropic Academy.