# Ship code with AI

> The full SDLC with three Anthropic-and-friends tools. Claude (chat) scopes the change so the diff stays small. Claude Code, the terminal agent, writes and edits across files without copy-pasting context. CodeRabbit reviews every PR, Claude turns its findings into patches, and the human reviewer only sees clean diffs.

Source: https://aistack.sh/stack/ship-code-with-ai
Category: Code · Workflow
Level: Beginner
Last verified by a human: 2026-05-05

## The tools

### Claude — Scope + plan + fix

- Pricing: Free · $20/mo Pro · $100/mo Max 5x · $200/mo Max 20x · Sonnet API $2/$10 per M tokens (input/output)
- Site: https://claude.ai
- Why this one: Use the chat surface for the parts that need human judgment: scoping, debating tradeoffs, turning a CodeRabbit comment into a sharp patch. Long context holds the whole plan + relevant files.
- Swap in instead: ChatGPT, Gemini
- More: https://aistack.sh/tool/claude

### Claude Code — Autonomous multi-file edits

- Pricing: Bundled with Claude Pro $20/mo · Max $100-200/mo · API metered
- Site: https://claude.com/code
- Why this one: Once the plan is locked, hand the implementation to Claude Code. It runs in your repo, reads the file system, executes commands, and edits files in place — no per-turn paste loop. Skills + hooks let you encode local conventions.
- Swap in instead: Codex, Cursor
- More: https://aistack.sh/tool/claude-code

### CodeRabbit — Automated PR review

- Pricing: Free for OSS · $30/mo per dev Essentials ($24 billed annually) · $60/mo Team · $90/mo Advanced
- Site: https://coderabbit.link/aistacksh
- Why this one: Runs on every push without configuration. Reads the diff in context of the whole repo, leaves inline comments tagged by severity, and ships a 1-paragraph PR summary. Free tier covers OSS; $30/dev/mo for private repos, or $24 billed annually.
- Swap in instead: Claude
- More: https://aistack.sh/tool/coderabbit

## Monthly cost

### $0/mo — Solo OSS maintainer (small)

- Claude: Free tier
- Claude Code: Free with Claude tier
- CodeRabbit: Free (OSS)

### $50/mo — Indie team, 1 to 3 devs, private repo (medium)

- Claude: $20 (covers Claude Code)
- Claude Code: Bundled
- CodeRabbit: $30/dev

### $270/mo — 5-dev startup, daily PRs, Max plans (heavy)

- Claude: $20
- Claude Code: $100 Max plan (heavy use)
- CodeRabbit: $150 (5 devs)

## Workflow

### 1. Scope the change with Claude (Claude)

Drop the ticket or 1-paragraph problem statement into Claude. Get back a plan: files to touch, edge cases, the smallest viable diff.

**Prompt: Scope a change from a ticket**

```
I need a plan, not code yet, for the following change.

Ticket / problem statement:
"""
{{paste ticket or 1-paragraph description}}
"""

Repo context:
- Language / framework: {{e.g. TypeScript + Next.js 16 App Router}}
- Where the change probably lives: {{e.g. lib/auth, app/api/billing}}
- Constraints I care about: {{e.g. no schema migration this week, must stay backwards compatible with v1 clients}}

Output, in this order:
1. **Restated problem** in 2 sentences (so I can confirm we're solving the right thing).
2. **Files to touch** as a bulleted list with a 1-line "why" each.
3. **Smallest viable diff** in 5 to 8 bullets describing the change.
4. **Edge cases** the diff has to handle (3 to 5 specific ones).
5. **What I should NOT change** to keep the PR small.

If the request is ambiguous, ask 1 to 2 specific clarifying questions before the plan.
```

### 2. Hand the plan to Claude Code (Claude Code)

Drop into your repo, run `claude`, and feed it the plan from step 1. Claude Code reads the relevant files itself, makes edits in place, runs your tests, and iterates on failures. No copy-paste loop.

**Prompt: Kickoff prompt for Claude Code**

```
Implement the plan below. You have file system access in this repo.

Plan:
"""
{{paste the plan from step 1}}
"""

Rules:
- Smallest viable diff. No drive-by refactors, no rename-while-you're-there.
- Match the existing code style: imports, naming, error handling. Read 2 to 3 nearby files before introducing a pattern that's new to this repo.
- No new dependencies unless the plan explicitly called for one.
- If you add a test, place it next to the existing tests and match their style.
- Run the test command before reporting done. If a test fails, fix it before stopping.

When done: print a 2-line summary of what changed and the list of files touched.
```

### 3. Open the PR (CodeRabbit)

Push your branch, open the PR. CodeRabbit posts a 1-paragraph summary plus inline comments within ~60 seconds. Findings come tagged: bug, security, performance, style.

### 4. Triage the findings (CodeRabbit)

Skim CodeRabbit's summary first; it surfaces the high-signal issues. Resolve trivial style nits in bulk. The bug, security, and perf comments earn a real fix.

### 5. Apply fixes with Claude (Claude)

For each non-trivial finding, paste the CodeRabbit comment plus the file region into Claude. Get the patch back, test it locally, push.

**Prompt: Turn a CodeRabbit finding into a patch**

```
You are fixing a code review finding.

CodeRabbit comment:
"""
{{paste the inline comment, including the line number and severity}}
"""

The file the comment is on (full file or the relevant 80-line region):
"""
{{paste file region}}
"""

Repo context:
- Language / framework: {{e.g. TypeScript + Next.js 16 App Router}}
- Test framework: {{e.g. Vitest, Jest, none}}
- Style conventions worth preserving: {{e.g. server components default, no class components}}

Output, in this order:
1. **Diagnosis** — one sentence. What is actually wrong, and why CodeRabbit flagged it.
2. **Patch** — a unified diff against the file region above. Minimal change. No drive-by refactors.
3. **Test** — if the change is non-trivial, the test that would have caught it (in the project's test framework). Skip if the project has no test setup.
4. **Reply for the PR** — 1 to 2 sentences I can paste under the CodeRabbit comment to resolve it.

Do not modify code outside the diff. Do not invent imports.
```

### 6. Re-review and merge (CodeRabbit)

Push the fixes; CodeRabbit re-reviews automatically. If it goes quiet, the human reviewer takes over with a clean diff to look at.

## What it produced

**Solo founder, 18-PR week**

From ticket to merged PR averaged 90 minutes (down from a half-day) because Claude scoped the work, Claude Code did the multi-file edits without a paste loop, and CodeRabbit caught the issues before the human reviewer. CodeRabbit alone caught 4 real bugs that week (1 SQL injection, 2 unhandled promise rejections, 1 N+1 query).

## Pitfalls

- **Skipping the plan step** — Jumping straight into Claude Code without the chat-tab plan makes the agent over-scope. Always do the plan first; the diff comes out 30 to 50 percent smaller and the PR is reviewable.
- **Letting Claude Code run unsupervised on first use** — It will happily edit 14 files on a refactor that should have touched 3. Watch the first few diffs go by; tighten the prompt or use hooks to scope its access until you trust the loop in this repo.
- **Treating every CodeRabbit nit as a blocker** — CodeRabbit will leave 30 comments on a 400-line PR. Resolve the trivial style ones in bulk; only spend cycles on bug, security, and perf tags.
- **Skipping the human review** — AI review catches mechanical issues, not product or architecture mistakes. It complements the human reviewer, never replaces them.
- **Auto-applying suggested fixes blindly** — CodeRabbit's suggested patches are usually right but occasionally drop a guard or miss a side effect. Read the diff before clicking commit.

## Verifiable artifacts

- [aistack.sh — this site](https://aistack.sh) — 51 tools, 42 stacks, real backend (Better Auth + Supabase + PostHog). 28+ shipping passes built end-to-end with this stack: Claude scoped each pass, Claude Code did the multi-file edits, CodeRabbit summarized every PR.
- [Source repo](https://github.com/theomarsoliman/aistacksh) — All 40 PRs public. Read CHANGELOG.md for the per-pass record of what each AI tool actually contributed.
- [PR #34 · programmatic-SEO scaffold](https://github.com/theomarsoliman/aistacksh/pull/34) — Multi-file change (combinatorial routes, JSON-LD, RSS). CodeRabbit summary in the PR body, line comments on the diff. Representative of how a single chat-scoped + CC-implemented + CR-reviewed PR moves through this loop.
- [PR #23 · launch blockers (admin role check + tooling)](https://github.com/theomarsoliman/aistacksh/pull/23) — Substantial, security-touching diff. Good example of a CodeRabbit comment turning into a Claude-authored patch (the chat-tab fix loop).

## Recent changes affecting this stack

- **Unified connection management with scopes across CodeRabbit products** (2026-09-10, feature) — Configure external service connectors once, then use scopes to control access across Review, Slack, and Discord. Base and named scopes let security-sensitive repositories or channels be excluded from shared connections, reducing duplicate setup across products. Source: https://docs.coderabbit.ai/changelog
- **Custom Jira issue template configuration for CodeRabbit** (2026-09-10, feature) — Teams can now configure chat.integrations.jira.issue_template to define custom Jira issue structures, ensuring CodeRabbit-created issues follow team standards instead of using default formatting. Source: https://docs.coderabbit.ai/changelog
- **CodeRabbit unified external service configuration with scopes for access control across products** (2026-09-10, feature) — Service configuration is now centralized with a single setup per connector, with scopes controlling usage across repositories and chat platforms. Base scopes define defaults while named scopes can override or exclude access for specific repositories or teams, allowing security-sensitive areas to restrict connector access. Source: https://docs.coderabbit.ai/changelog
- **CodeRabbit supports custom Jira issue templates for team-specific standards** (2026-09-10, feature) — Developers can configure custom Jira issue description structures through the chat.integrations.jira.issue_template setting instead of using CodeRabbit defaults. This ensures created issues match team formatting and field requirements. Source: https://docs.coderabbit.ai/changelog
- **CodeRabbit unifies connector configuration with connections and scopes** (2026-09-10, feature) — Developers can now configure connectors once instead of separately for pull request reviews, Slack, and Discord. Named scopes control which products can use each connector in specific repositories or channels, eliminating duplicate setup and improving security control for sensitive repositories. Source: https://docs.coderabbit.ai/changelog

## Other ways to do this

- [Antigravity (Google)](https://aistack.sh/stack/ship-code-antigravity): Google's AI IDE: Gemini 2M-context inside the editor — $40/mo
- [Claude Code only](https://aistack.sh/stack/ship-code-claude-code): Pure-CLI: scope, plan, write, fix all inside Claude Code — $50/mo
- [Codex (CLI + cloud)](https://aistack.sh/stack/ship-code-codex): OpenAI Codex: terminal CLI for active work, cloud lane for autonomous PRs — $40/mo
- [Cursor (IDE-first)](https://aistack.sh/stack/ship-code-cursor): AI inside the editor, not in a chat tab or terminal — $20/mo
- [Windsurf (Devin Local)](https://aistack.sh/stack/ship-code-windsurf): Cognition's IDE with the Devin Local autonomous-edit agent — $15/mo

---

Curated by alex-w on aistack.sh. Last updated 2026-05-05.
