Module 7: Integrations: Git, SDK, and Remote Control
Module 7: Integrations — Git, SDK, Remote Control, and more
Module 7: Integrations — Git, SDK, Remote Control, and more
Overview
You've come a long way. You know what Claude Code is, you have it installed, you set up CLAUDE.md to give it persistent memory, you've mastered the Explore → Plan → Code workflow, you built skills and hooks to shape its behavior, and you learned to delegate work with subagents. Claude Code is no longer a generic tool — it's an agent configured for your project, your team, and your workflow.
But so far, Claude Code has been operating in a fairly isolated context: you talk to it, it answers, it runs tasks, and the cycle repeats. What happens when you need Claude Code to interact with the outside world? To make commits in Git? To run programmatically from a Python script? To connect to external APIs? To be controlled from your phone while you're away from your desk?
That's what this module is about: integrations. How Claude Code connects to the development infrastructure you already have — Git, SDKs, CI/CD pipelines, and external tools. It's the bridge between "using Claude Code in the terminal" and "integrating Claude Code into your full stack".
Recent features (March–April 2026)
Claude Code moves fast. These are the most important features shipped in the last 2 months that touch this module:
| Feature | Status | Capsule where it's covered |
|---|---|---|
| Computer Use in Claude Code Desktop | March 2026 | Capsule 05 |
| Computer Use in Claude Code CLI | Research preview (April 2026) | Capsule 05 |
| PR Auto-fix in Claude Code on the Web | March 2026 | Capsule 02 (Git workflows) |
/autofix-pr (PR auto-fix from the terminal) | April 2026 | Capsule 02 |
Transcript search (Ctrl+O + /) | March 2026 | Capsule 04 (Headless/CLI) |
| Native PowerShell tool for Windows | March 2026 (preview) | Capsule 02/04 |
/team-onboarding (package up your setup) | April 2026 | Capsule 04 |
/loop (self-pace or interval) | April 2026 | Capsule 04 |
| Ultraplan (planning CLI ↔ web) | Early preview (April 2026) | Capsule 05 |
| Monitor tool (stream events live) | April 2026 | Capsule 05 |
| Auto Mode (permission classifier) | Research preview (March 2026) | Covered in M05, capsule 05 |
Where you are in the guide
Module 01: What Claude Code is ✅
Module 02: Installation and setup ✅
Module 03: CLAUDE.md and memory ✅
Module 04: Agentic workflow ✅
Module 05: Skills and Hooks ✅
Module 06: Subagents ✅
Module 07: Integrations (Git, SDK, Remote Control) ← YOU ARE HERE
Module 08: Capstone project
Modules 01-03 were configuration: install, configure, provide context. Modules 04-06 were workflow: how to work with Claude Code, customize it, and scale with subagents. This module is connection: how Claude Code plugs into the tools you already use.
Why integrations matter
Claude Code as a component, not an island
A coding agent that only runs in interactive mode has a hard ceiling: it needs you in front of the terminal, typing prompts, approving actions, reviewing results. That works for one-off tasks, but it doesn't scale.
Integrations turn Claude Code from an interactive tool into a programmable component of your stack:
┌──────────────────────────────────────────────────────────────┐
│ WITHOUT INTEGRATIONS │
│ │
│ You ──▶ Terminal ──▶ Claude Code ──▶ Terminal ──▶ You │
│ │
│ (closed loop, manual, synchronous) │
└──────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────┐
│ WITH INTEGRATIONS │
│ │
│ Git ──────────────────▶ Claude Code ◀──── CI/CD pipeline │
│ SDK (Python/TS) ──────▶ Claude Code ◀──── Cron jobs │
│ MCP servers ──────────▶ Claude Code ◀──── Pre-commit hooks │
│ Remote Control ───────▶ Claude Code ◀──── Other agents │
│ │
│ (open ecosystem, programmable, asynchronous) │
└──────────────────────────────────────────────────────────────┘
The 4 dimensions of integration
This module covers 4 dimensions that, together, make Claude Code a complete component:
| Dimension | What it solves | Capsule |
|---|---|---|
| Git | Version control wired into the workflow | 02 |
| SDK | Programmatic access from Python/TypeScript | 03 |
| Headless CLI | Automation with no human in the loop | 04 |
| MCP + Remote | Connection to external tools and remote control | 05 |
Each dimension solves a different problem. Git solves "how do I version Claude Code's work". The SDK solves "how do I use Claude Code from code". Headless mode solves "how do I automate Claude Code in scripts". MCP solves "how do I give Claude Code access to external data and APIs".
What you'll learn in each capsule
Capsule 01 — Module introduction (this capsule)
Context, mental model, and roadmap. You'll understand what integrations are, why they matter, and how they connect Claude Code to your stack.
Capsule 02 — Git workflows
How Claude Code works with Git natively. Semantic commits, branches, Pull Requests with gh, code review over diffs, conflict resolution. Workflow patterns: feature branch, commit-as-you-go, review-before-commit. Conventional commits and good practice.
Capsule 03 — Claude Agent SDK (Python and TypeScript)
Programmatic access to Claude Code. The Claude Agent SDK for Python (claude-agent-sdk) and TypeScript (@anthropic-ai/claude-agent-sdk). The query() function, streaming, structured outputs. When to use the SDK vs interactive mode. Practical scripts for code review, documentation, and batch processing.
A note on naming: It used to be called the "Claude Code SDK". Anthropic renamed it to Claude Agent SDK because the same harness works for building any agent, not just coding agents.
Capsule 04 — Headless mode CLI
The -p flag to run Claude Code without interaction. Output formats (text, json, stream-json). Piping input. Combining with other flags (--model, --max-tokens, --no-permissions). Practical scripts: automated review, docs generator, PR descriptions. Headless vs SDK: when to use which.
Capsule 05 — MCP and Remote Control
Model Context Protocol for connecting Claude Code to external data sources. Basic setup of MCP servers (filesystem, GitHub, databases). Remote Control from your phone (research preview). MCP as the bridge into Guide #5 of this series.
Progression map
Capsule 01 (this one) → Context and mental model
Capsule 02 → Git: version control, integrated
Capsule 03 → SDK: programmatic access
Capsule 04 → Headless CLI: automation
Capsule 05 → MCP + Remote: external connections
Difficulty: ⭐ ──────────────────────────▶ ⭐⭐⭐⭐
Capsules 02-03 are foundational — Git and the SDK are the most-used integrations. Capsule 04 is intermediate — headless mode for automation. Capsule 05 is advanced/exploratory — MCP and Remote Control include experimental features.
Prerequisites
Required knowledge:
- ✅ Module 06 completed (Subagents)
- ✅ Module 04 completed (Explore → Plan → Code workflow mastered)
- ✅ CLAUDE.md configured in your project (Module 03)
- ✅ Claude Code installed and working (Module 02)
For the practice:
- ✅ Git installed and configured (
git --versionworks) - ✅ A Git repository with history (at least 10 commits)
- ✅ Python 3.8+ and/or Node.js 18+ (for the SDK exercises)
- ✅ The
ghCLI installed (for the Pull Request exercises) - ✅ Basic Git knowledge (commits, branches, merge)
Quick check:
Before continuing, make sure you can answer these questions:
- What is a subagent, and how is it different from a skill?
- What are Claude Code's built-in subagents?
- What is the parent-child model in subagents?
Answers
- A subagent is a separate agent with its own context, optimized for a specific task. A skill is a markdown file with instructions that Claude reads on demand. If the task needs instructions → skill. If it needs a dedicated agent that reasons on its own → subagent.
- Explore (read-only analysis), Plan (design without execution), General-purpose (full execution), plus utilities like statusline-setup and claude-code-guide.
- The main agent (parent) spawns subagents (children), delegates tasks to them, receives summarized results, and integrates everything into a coherent answer. Each child gets its own isolated context window.
If you're not ready:
Review these first:
- Module 04: The agentic workflow
- Module 06: Subagents
The mental model: Claude Code as an integration hub
From tool to platform
So far you've seen Claude Code as a tool that takes instructions and runs tasks. With integrations, the model changes:
┌─────────────────────────────────────────────────────────┐
│ CLAUDE CODE AS A HUB │
│ │
│ ┌───────────┐ │
│ │ Git repos │◀───┐ │
│ └───────────┘ │ │
│ │ │
│ ┌──────────┐ ┌────────────────┐ ┌──────────┐ │
│ │ SDK apps │───▶│ Claude Code │◀───│ MCP │ │
│ └──────────┘ │ (the hub) │ │ servers │ │
│ └────────────────┘ └──────────┘ │
│ ▲ ▲ │
│ │ │ │
│ ┌───────────┐ ┌──────────┐ │
│ │ CI/CD │ │ Remote │ │
│ │ pipelines │ │ Control │ │
│ └───────────┘ └──────────┘ │
└─────────────────────────────────────────────────────────┘
Claude Code doesn't just run code — it coordinates across multiple systems. It can read a Git diff, generate a PR description, run tests in CI, connect to a database via MCP, and get your approval from your phone via Remote Control. All from the same session.
The developer analogy
Think about how a senior developer works on a team:
| What a developer does | The Claude Code equivalent |
|---|---|
| Makes commits and PRs | Git workflows (capsule 02) |
| Writes automation scripts | Python/TS SDK (capsule 03) |
| Configures CI/CD pipelines | Headless CLI (capsule 04) |
| Connects to APIs and databases | MCP servers (capsule 05) |
| Checks notifications on their phone | Remote Control (capsule 05) |
A developer doesn't just write code — they wire their work into versioning, automation, and communication systems. Claude Code does exactly the same thing, and this module teaches you how.
How this fits with what you already know
Integrations and CLAUDE.md (Module 03)
Your CLAUDE.md can document the project's integrations:
# Git workflow
- We use conventional commits: feat:, fix:, docs:, test:
- PRs require at least 1 reviewer
- Branch naming: feature/name, fix/name, docs/name
- Merge strategy: squash merge into main
# Automation
- A pre-commit hook runs lint with Claude Code headless
- CI/CD uses the SDK for automated code review
- A Postgres MCP server is connected for debugging queries
Integrations and Hooks (Module 05)
The hooks you learned in Module 05 are a natural connection point:
- A PreToolUse hook that validates Git operations before they run
- A Stop hook that suggests a commit when a task finishes
- A PostToolUse hook that verifies the result of Git operations
Integrations and Subagents (Module 06)
Subagents can use the integrations:
- A General-purpose subagent that runs Git commands in parallel
- A custom subagent that uses the SDK for batch processing
- An Explore subagent that analyzes the Git history
A look at the whole module
To help you picture how the concepts fit together, here's a real scenario that uses all 4 integration dimensions:
The session without integrations
You: There's a bug in checkout. Users report that paying with
an empty cart crashes the app.
Claude Code (no integrations):
→ Reads the checkout code (built-in)
→ Identifies the bug (it doesn't validate an empty cart)
→ Fixes the code (built-in)
→ "Done, the bug is fixed."
...but there's no commit, no PR, no tracking.
If you close the terminal, how do you know what changed?
How do you review it? How do you ship it?
The same session with integrations
You: There's a bug in checkout. Issue #203 on GitHub has the
details. Investigate, fix it, and open a PR.
Claude Code (with integrations):
→ [MCP GitHub] Reads issue #203: "Empty cart causes 500"
→ [MCP Postgres] Verifies: SELECT * FROM orders WHERE cart_items = '[]'
→ [Built-in] Reads the code, identifies the bug
→ [Built-in] Fixes the code, adds a test
→ [Git] git checkout -b fix/empty-cart-checkout
→ [Git] git commit -m "fix(checkout): validate empty cart before payment"
→ [Git] gh pr create --title "fix: validate empty cart" --body "Fixes #203"
PR #87 created. Linked to issue #203. CI runs the tests.
[Remote Control] A notification lands on your phone:
"PR #87 created. Tests passing. Approve the merge?"
The difference isn't just productivity — it's that the work ends up recorded, reviewable, and deployable. Every change has a commit, every fix references an issue, and the whole flow is reproducible.
The practical impact
Without integrations, Claude Code is a developer who works locally and never pushes. With integrations, it's a developer who follows the team's practices: clean commits, PRs with context, automated CI/CD, and full traceability.
Key concepts you'll see
Terminal-native
Claude Code runs Git, SDK scripts, and headless commands directly in the terminal. It doesn't use web APIs or graphical interfaces — everything happens in the same environment where you write code. That's an advantage: if it works in your terminal, it works in CI/CD.
Programmatic access
The SDK and headless mode are two forms of programmatic access, each at its own level of complexity:
Complexity: Low ────────────────────── High
Headless CLI (-p) SDK (Python/TS)
│ │
│ Bash one-liner │ Full script
│ Unix pipe │ Async/await
│ Exit codes │ Try/catch
│ Text or JSON │ Typed objects
MCP: the extension protocol
MCP isn't a tool — it's a protocol. Just as HTTP lets any client talk to any web server, MCP lets any AI agent talk to any data source. Claude Code is an MCP client, and there are dozens of MCP servers available.
The automation spectrum
Integrations form a spectrum of automation:
Manual ─────────────────────────────────────── Automatic
Interactive Headless CLI SDK CI/CD + SDK
(you present) (bash script) (a program) (no human)
You decide where to sit on that spectrum based on the task, the risk, and your confidence.
What you'll build in this module
Across the 5 capsules:
- A complete Git workflow with semantic commits, branches, and PRs
- An SDK script that reviews code programmatically
- A headless script that generates PR descriptions automatically
- A basic MCP configuration to connect to external data
- An understanding of Remote Control and its use cases
By the end of the module, Claude Code will be connected to your development infrastructure, not isolated in a terminal.
Versions and compatibility
This module covers:
- Claude Code 2.0+
- Opus 5 (1M token context window)
- Sonnet 5 (1M token context window)
Features covered:
- ✅ Native Git workflows (commits, branches, PRs)
- ✅ Python SDK (
claude-agent-sdk) - ✅ TypeScript SDK (
@anthropic-ai/claude-agent-sdk) - ✅ Headless mode CLI (
-p,--output-format) - ✅ MCP server configuration
- ⚠️ Remote Control from your phone (research preview, experimental)
A note on change:
Git workflows and the headless CLI are stable features — the concepts aren't going to change. The SDK has an API that may evolve in the details, but the architecture is stable. MCP is in active adoption and the configuration may get adjusted. Remote Control is in research preview and may change significantly. Always check the official documentation to confirm the current syntax.
Connection to the capstone project
In Module 08, you'll build a complete CLI tool with Claude Code. This module's integrations will be part of the workflow:
- Git workflows to version your project with semantic commits
- Headless CLI to automate the project's validations
- SDK (optional) to create automated testing scripts
- MCP (optional) to connect your tool to external data
Mastering integrations doesn't just improve your project — it prepares you for professional workflows where Claude Code is one more component in your development pipeline.
Summary
What you learned in this capsule:
- Integrations turn Claude Code from an interactive tool into a programmable component
- There are 4 dimensions of integration: Git, SDK, Headless CLI, MCP + Remote Control
- Each dimension solves a different problem: versioning, programmatic access, automation, external connection
- Integrations complement the CLAUDE.md, hooks, and subagents from earlier modules
- This module is the bridge between "using Claude Code" and "integrating Claude Code into your stack"
Next capsule: 02 - Git workflows — how Claude Code works with Git for commits, branches, PRs, and code review.
Additional resources
Official documentation
- Git Integration — Using Git with Claude Code
- SDK Documentation — The Python and TypeScript SDKs
- CLI Reference — CLI flags and options, including headless mode
- MCP Setup — Configuring MCP servers
Integrations
- GitHub Actions — Claude Code in CI/CD pipelines
- Headless Mode — Non-interactive execution
- Best Practices — Recommended workflows for integrations