Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 64 additions & 64 deletions content/.metadata.json

Large diffs are not rendered by default.

147 changes: 62 additions & 85 deletions content/anthropic-blog/claude-code.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Claude Code is intentionally low-level and unopinionated, providing close to raw

This post outlines general patterns that have proven effective, both for Anthropic's internal teams and for external engineers using Claude Code across various codebases, languages, and environments. Nothing in this list is set in stone nor universally applicable; consider these suggestions as starting points. We encourage you to experiment and find what works best for you!

_Looking for more detailed information? Our comprehensive documentation at [claude.ai/code](https://claude.ai/redirect/website.v1.33c33977-ff7a-4ee3-a942-4474e8555f53/code)_ _covers all the features mentioned in this post and provides additional examples, implementation details, and advanced techniques._
_Looking for more detailed information? Our comprehensive documentation at [claude.ai/code](https://claude.ai/redirect/website.v1.f63ff586-18e6-4793-91d8-2209484351f7/code)_ _covers all the features mentioned in this post and provides additional examples, implementation details, and advanced techniques._

1. Customize your setup
-----------------------
Expand Down
58 changes: 19 additions & 39 deletions content/claude-code-docs/sdk/sdk-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

> Build custom AI agents with the Claude Code SDK

## SDK Options

The Claude Code SDK is available in multiple forms to suit different use cases:

* **[Headless Mode](/en/docs/claude-code/sdk/sdk-headless)** - For CLI scripts and automation
* **[TypeScript SDK](/en/docs/claude-code/sdk/sdk-typescript)** - For Node.js and web applications
* **[Python SDK](/en/docs/claude-code/sdk/sdk-python)** - For Python applications and data science

## Why use the Claude Code SDK?

Built on top of the agent harness that powers Claude Code, the Claude Code SDK provides all the building blocks you need to build production-ready agents:
Expand Down Expand Up @@ -29,14 +37,6 @@ Here are some example agent types you can create:
* Customer support agents that resolve technical issues
* Content creation assistants for marketing teams

## SDK Options

The Claude Code SDK is available in multiple forms to suit different use cases:

* **[Headless Mode](/en/docs/claude-code/sdk/sdk-headless)** - For CLI scripts and automation
* **[TypeScript SDK](/en/docs/claude-code/sdk/sdk-typescript)** - For Node.js and web applications
* **[Python SDK](/en/docs/claude-code/sdk/sdk-python)** - For Python applications and data science

## Core Concepts

### Authentication
Expand All @@ -50,6 +50,17 @@ The SDK also supports authentication via third-party API providers:

For detailed configuration instructions for third-party providers, see the [Amazon Bedrock](/en/docs/claude-code/amazon-bedrock) and [Google Vertex AI](/en/docs/claude-code/google-vertex-ai) documentation.

### Full Claude Code Feature Support

The SDK provides access to all the default features available in Claude Code, leveraging the same file system-based configuration:

* **Subagents**: Launch specialized agents stored as Markdown files in `./.claude/agents/`
* **Hooks**: Execute custom commands configured in `./.claude/settings.json` that respond to tool events
* **Slash Commands**: Use custom commands defined as Markdown files in `./.claude/commands/`
* **Memory (CLAUDE.md)**: Maintain project context through `CLAUDE.md` files that provide persistent instructions and context

These features work identically to their Claude Code counterparts by reading from the same file system locations.

### System Prompts

System prompts define your agent's role, expertise, and behavior. This is where you specify what kind of agent you're building.
Expand All @@ -66,37 +77,6 @@ Control which tools your agent can use with fine-grained permissions:

Extend your agents with custom tools and integrations through MCP servers. This allows you to connect to databases, APIs, and other external services.

## Common Use Cases

### Automated Testing and CI/CD

Create agents that run tests, analyze results, and fix issues automatically in your CI/CD pipeline.

### Code Review and Security Audits

Build agents that review pull requests for security vulnerabilities, code quality, and compliance.

### Incident Response

Deploy SRE agents that diagnose production issues, analyze logs, and suggest fixes.

### Documentation Generation

Create agents that generate and maintain documentation based on your codebase.

### Data Analysis

Build agents that analyze data, generate reports, and create visualizations.

## Best Practices

* **Use JSON output format** for programmatic parsing of responses
* **Handle errors gracefully** - check exit codes and implement retry logic
* **Use session management** for maintaining context in multi-turn conversations
* **Implement timeouts** for long-running operations
* **Respect rate limits** when making multiple requests
* **Test thoroughly** before deploying to production

## Related Resources

* [CLI Reference](/en/docs/claude-code/cli-reference) - Complete CLI documentation
Expand Down
Loading