Skip to content
Open
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
51 changes: 51 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Contributing

Thanks for helping improve the Claude Agent SDK for Python.

## Development setup

Install the package with development dependencies:

```bash
pip install -e ".[dev]"
```

To install the pre-push hook used by this repository, run:

```bash
./scripts/initial-setup.sh
```

## Local checks

Run the checks that match your change before opening a pull request:

```bash
# Lint and automatically fix issues
python -m ruff check src/ tests/ --fix

# Format source and tests
python -m ruff format src/ tests/

# Typecheck the SDK package
python -m mypy src/

# Run the test suite
python -m pytest tests/
```

For a focused test run, pass a specific test file:

```bash
python -m pytest tests/test_client.py
```

## Pull request titles

Use a short, descriptive title. Recent pull requests generally follow
Conventional Commits style, such as:

- `fix(query): surface result error text`
- `docs(types): clarify hooks dispatch behavior`
- `deps: bump mcp lower bound`

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ If you're upgrading from the Claude Code SDK (versions < 0.1.0), please see the

## Development

See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, local checks,
and pull request title guidance.

If you're contributing to this project, run the initial setup script to install git hooks:

```bash
Expand Down