Code review

7. Code Review
Course: Claude Code 101
Notes
Code Review Claude Code has a few built-in features that make your git workflow faster.
Review with a Subagent Before you push a PR, ask Claude to use a subagent to review your changes. The subagent runs in its own context window with fresh eyes — it doesn't carry the bias of the main agent that just spent the session writing the code. When creating a code-reviewer subagent, restrict it to read-only tools — a reviewer should flag issues, not edit files.
The /commit-push-pr Skill
The /commit-push-pr skill handles the commit, push, and PR creation all in one step. Instead of doing each manually, just run the skill and Claude takes care of it. If you have a Slack MCP server configured with channels listed in your CLAUDE.md, it will automatically post the PR link to your team's channel.
Session Linking with --from-pr
When Claude creates a PR through gh pr create, the session gets linked to that PR automatically. If you need to come back to it later — maybe to address review comments or fix a failing build — run:
claude --from-pr <PR_NUMBER>
This picks up right where you left off.
Recap: Use a subagent for an unbiased code review before pushing. Use /commit-push-pr to handle the full commit-to-PR flow in one step. And use --from-pr to resume work on a PR later.