Community10 min min read

How to Contribute to OpenClaw Open Source Community in 2026

Complete guide to contributing to OpenClaw - from setting up your development environment to submitting your first PR. Learn code standards, PR workflow, and community guidelines.

10xClaw
10xClaw
March 23, 2026

How to Contribute to OpenClaw Open Source Community in 2026

OpenClaw thrives because of contributors like you. Whether you're fixing bugs, adding features, improving documentation, or helping others in the community, every contribution matters. This guide walks you through everything you need to know.

Getting Started

Prerequisites

Before contributing, ensure you have:

  • Git installed and configured
  • Node.js 18+ and npm 8+
  • Python 3.10+ (for Python SDK contributions)
  • A GitHub account
  • Basic understanding of TypeScript/Python
  • Setting Up Your Development Environment

  • Fork the repository
  • ```bash

    Visit https://github.com/openclaw/openclaw and click "Fork"

    ```

  • Clone your fork
  • ```bash

    git clone https://github.com/YOUR_USERNAME/openclaw.git

    cd openclaw

    ```

  • Add upstream remote
  • ```bash

    git remote add upstream https://github.com/openclaw/openclaw.git

    ```

  • Install dependencies
  • ```bash

    For TypeScript/JavaScript SDK

    npm install

    For Python SDK

    cd python-sdk

    pip install -e ".[dev]"

    ```

  • Run tests to verify setup
  • ```bash

    TypeScript

    npm test

    Python

    pytest

    ```

    Code Standards

    TypeScript/JavaScript

    We follow strict coding standards to maintain code quality:

    ```typescript

    // ✅ Gar naming, proper types, error handling

    async function executeAgentTask(

    task: Task,

    options: ExecutionOptions

    ): Promise {

    if (!task.description) {

    throw new ValidationError('Task description is required')

    }

    try {

    const result = await this.agent.execute(task, options)

    return {

    status: 'completed',

    output: result,

    timestamp: new Date()

    }

    } catch (error) {

    logger.error('Task execution failed', { task, error })

    throw new ExecutionError(`Failed to execute task: ${error.message}`)

    }

    }

    // ❌ Bad: Unclear naming, no types, poor error handling

    async function doStuff(t, opts) {

    const r = await this.agent.execute(t, opts)

    return r

    }

    ```

    Key principles:

  • Use TypeScript strict mode
  • Prefer `async/await` over callbacks
  • Always handle errors explicitly
  • Use descriptive variable names
  • Add JSDoc comments for public APIs
  • Keep functions under 50 lines
  • Maximum nesting depth: 4 levels
  • Python

    ```python

    ✅ Good: Type hints, docstrings, proper error handling

    from typing import Optional

    from openclaw.types import Task, TaskResult

    from openclaw.exceptions import ValidationError, ExecutionError

    async def execute_agent_task(

    task: Task,

    options: Optional[ExecutionOptions] = None

    ) -> TaskResult:

    """

    Execute an agent task with the given options.

    Args:

    task: The task to execute

    options: Optional execution configuration

    Returns:

    TaskResult containing execution output and metadata

    Raises:

    ValidationError: If task is invalid

    ExecutionError: If execution fails

    """

    if not task.description:

    raise ValidationError("Task description is required")

    try:

    result = await self.agent.execute(task, options)

    return TaskResult(

    status="completed",

    output=result,

    timestamp=datetime.now()

    )

    except Exception as error:

    logger.error(f"Task execution failed: {error}", extra={"task": task})

    raise ExecutionError(f"Failed to execute task: {error}")

    ❌ Bad: No types, no docstring, poor error handling

    async def do_stuff(t, opts=None):

    r = await self.agent.execute(t, opts)

    return r

    ```

    Key principles:

  • Use type hints everywhere
  • Follow PEP 8 styleuide
  • Write docstrings for all public functions
  • Use `async/await` for I/O operations
  • Prefer explicit over implicit
  • Keep functions focused and small
  • Testing Requirements

    All contributions must include tests. We maintain 80%+ code coverage.

    Unit Tests

    ```typescript

    // TypeScript (Vitest)

    import { describe, it, expect, vi } from 'vitest'

    import { Agent } from '../src/agent'

    describe('Agent', () => {

    it('should execute simple tasks successfully', async () => {

    const mockLLM = vi.fn().mockResolvedValue({

    content: 'Task completed'

    })

    const agent = new Agent({ llm: mockLLM })

    const result = await agent.execute({ description: 'Simple task' })

    expect(result.status).toBe('completed')

    expect(mockLLM).toHaveBeenCalledTimes(1)

    })

    it('should handle execution failures gracefully', async () => {

    const mockLLM = vi.fn().mockRejectedValue(new Error('API error'))

    const agent = new Agent({ llm: mockLLM })

    await expect(

    agent.execute({ description: 'Failing task' })

    ).rejects.toThrow('API error')

    })

    })

    ```

    ```python

    Python (pytest)

    import pytest

    from openclaw import Agent

    from openclaw.exceptions import ExecutionError

    @pytest.mark.asyncio

    async def test_agent_executes_simple_tasks():

    """Agent should execute simple tasks successfully."""

    mock_llm = AsyncMock(return_value={"content": "Task completed"})

    agent = Agent(llm=mock_llm)

    result = await agent.execute({"description": "Simple task"})

    assert result.status == "completed"

    assert mock_llm.call_count == 1

    @pytest.mark.asyncio

    async def test_agent_handles_failures():

    """Agent should handle execution failures gracefully."""

    mock_llm = AsyncMock(side_effect=Exception("API error"))

    agent = Agent(llm=mock_llm)

    with pytest.raises(ExecutionError, match="API error"):

    await agent.execute({"description": "Failing task"})

    ```

    Integration Tests

    ```typescript

    describe('Agent Integration Tests', () => {

    it('should complete real tasks end-to-end', async () => {

    const agent = new Agent({

    apiKey: process.env.OPENCLAW_API_KEY

    })

    const result = await agent.execute({

    description: 'Calculate 15% tip on $50',

    maxSteps: 5

    })

    expect(result.status).toBe('completed')

    expect(result.output).toContain('7.50')

    }, 30000) // Longer timeout for real API calls

    })

    ```

    Pull Request Workflow

    1. Create a Feature Branch

    ```bash

    git checkout -b feature/your-feature-name

    Or for bug fixes

    git checkout -b fix/bug-description

    ```

    2. Make Your Changes

  • Write code following our standards
  • Add tests for new functionality
  • Update documentation if needed
  • Run linters and formatters
  • ```bash

    TypeScript

    npm run lint

    npm run format

    Python

    black .

    flake8 .

    mypy .

    ```

    3. Commit Your Changes

    We use Conventional Commits:

    ```bash

    Format: ():

    git commit -m "feat(agent): add parallel tool execution"

    git commit -m "fix(api): handle rate limit errors correctly"

    git commit -m "docs(readme): update installation instructions"

    git commit -m "test(agent): add tests for error handling"

    ```

    Types:

  • `feat`: New feature
  • `fix`: Bug fix
  • `docs`: Documentation changes
  • `test`: Adding or updating tests
  • `refactor`: Code refactoring
  • `perf`: Performance improvements
  • `chore`: Maintenance tasks
  • 4. Push and Create PR

    ```bash

    git push origin feature/your-feature-name

    ```

    Then visit GitHub and click "Create Pull Request".

    PR Template

    ```markdown

    Description

    Brief description of what this PR does.

    Type of Change

  • [ ] Bug fix
  • [ ] New feature
  • [ ] Breaking change
  • [ ] Documentation update
  • Testing

  • [ ] Unit tests added/updated
  • [ ] Integration tests added/updated
  • [ ] All tests passing locally
  • Checklist

  • [ ] Code follows project style guidelines
  • [ ] Self-review completed
  • [ ] Comments added for complex logic
  • [ ] Documentation updated
  • [ ] No new warnings generated
  • Related Issues

    Closes #123

    ```

    5. Code Review Process

  • Automated checks run: Linting, tests, coverage
  • Maintainer review: Usually within 48 hours
  • Address feedback: Make requested changes
  • Approval: Once approved, maintainers will merge
  • Tips for faster reviews:

  • Keep PRs focused and small (< 400 lines)
  • Write clear descriptions
  • Respond promptly to feedback
  • Be open to suggestions
  • Contribution Ideas

    Good First Issues

    Look for issues labeled `good-first-issue`:

  • Documentation improvements
  • Adding examples
  • Fixing typos
  • Writing tests
  • Improving error messages
  • Feature Contributions

    Before starting major features:

  • Check existing issues - Someone might already be working on it
  • Open a discussion - Propose your idea in GitHub Discussions
  • Get feedback - Wait for maintainer approval
  • Create an issue - Document the feature plan
  • Start coding - Once approved
  • Documentation

    Documentation is always welcome:

  • API documentation: JSDoc/docstrings
  • Guides: How-to articles
  • Examples: Real-world use cases
  • Translations: Help translate docs
  • Bug Reports

    Found a bug? Help us fix it:

    ```markdown

    Bug Description

    Clear description of the bug.

    To Reproduce

  • Step 1
  • Step 2
  • See error
  • Expected Behavior

    What should happen.

    Actual Behavior

    What actually happens.

    Environment

  • OS: macOS 14.0
  • Node: 18.17.0
  • OpenClaw: 1.2.3
  • Additional Context

    Any other relevant information.

    ```

    Community Guidelines

    Code of Conduct

    We are committed to providing a welcoming and inclusive environment:

  • Be respectful: Treat everyone with respect
  • Be constructive: Provide helpful feedback
  • Be patient: Remember everyone was a beginner once
  • Be inclusive: Welcome diverse perspectives
  • Communication Channels

  • GitHub Issues: Bug reports and feature requests
  • GitHub Discussions: Questions and general discussion
  • Discord: Real-time chat and community support
  • Twitter: Updates and announcements
  • Getting Help

    Stuck? Here's how to get help:

  • Check documentation: Most questions are answered there
  • Search existing issues: Your question might already be answered
  • Ask in Discussions: For general questions
  • Join Discord: For real-time help
  • Recognition

    We value all contributions:

  • Contributors list: All contributors are listed in README
  • Release notes: Significant contributions are highlighted
  • Swag: Active contributors receive OpenClaw swag
  • Maintainer status: Consistent contributors may become maintainers
  • Advanced Topics

    Becoming a Maintainer

    Maintainers have commit access and help guide the project:

    Requirements:

  • 10+ merged PRs
  • 3+ months of consistent contributions
  • Deep understanding of codebase
  • Demonstrated good judgment
  • Community involvement
  • Responsibilities:

  • Review PRs
  • Triage issues
  • Guide contributors
  • Maintain code quality
  • Release Process

    Maintainers follow this process for releases:

  • Update version in `package.json`/`pyproject.toml`
  • Update CHANGELOG.md
  • Create release branch
  • Run full test suite
  • Create GitHub release
  • Publish to npm/PyPI
  • Announce on social media
  • Conclusion

    Contributing to OpenClaw is rewarding and helps thousands of developers worldwide. Whether you're fixing a typo or adding a major feature, your contribution matters.

    Ready to contribute? Check out our good first issues and join our Discord community.

    Resources

  • GitHub Repository
  • Documentation
  • Discord Community
  • Code of Conduct
  • #OpenClaw#Open Source#Contributing#Community#Development
    Get Started

    Ready to Optimize Your AI Strategy?

    Get your free AI audit and discover optimization opportunities.

    START FREE AUDIT