Categories Overview
| Category | Best For | Complexity |
|---|---|---|
| Testing | Adding tests, improving coverage | Simple to Medium |
| Data Analysis | Processing data, generating reports | Simple to Medium |
| Web Scraping | Extracting data from websites | Medium |
| Code Review | Analyzing PRs, finding issues | Simple |
| Bug Fixing | Diagnosing and fixing errors | Medium |
| Feature Development | Building new functionality | Medium to Complex |
For in-depth guidance on specific use cases, see our Use Cases section which includes detailed workflows for Code Review, Incident Triage, and more.
Task Complexity Guidance
Before starting, assess your task’s complexity: Simple tasks (5-15 minutes):- Single file changes
- Clear, well-defined requirements
- Existing patterns to follow
- Multiple file changes
- Some discovery required
- Integration with existing code
- Architectural changes
- Multiple components
- Requires iteration
Start with simpler tutorials to build familiarity with OpenHands before tackling complex tasks.
Best Use Cases
OpenHands excels at:- Repetitive tasks: Boilerplate code, test generation
- Pattern application: Following established conventions
- Analysis: Code review, debugging, documentation
- Exploration: Understanding new codebases
Example Tutorials by Category
Testing
Tutorial: Add Unit Tests for a Module
Goal: Achieve 80%+ test coverage for a service module Prompt:- Analyzes the UserService class
- Identifies untested code paths
- Creates test file with comprehensive tests
- Mocks dependencies appropriately
- Runs tests to verify they pass
- Provide existing test files as examples
- Specify the testing framework
- Mention any mocking conventions
Tutorial: Add Integration Tests for an API
Goal: Test API endpoints end-to-end Prompt:Data Analysis
Tutorial: Create a Data Processing Script
Goal: Process CSV data and generate a report Prompt:- Creates a Python script with proper structure
- Implements data loading with validation
- Calculates requested metrics
- Generates formatted report
- Creates and saves visualizations
Tutorial: Database Query Analysis
Goal: Analyze and optimize slow database queries Prompt:Web Scraping
Tutorial: Build a Web Scraper
Goal: Extract product data from a website Prompt:- Specify rate limiting requirements
- Mention error handling expectations
- Request logging for debugging
Code Review
For comprehensive code review guidance, see the Code Review Use Case page. For automated PR reviews using GitHub Actions, see the PR Review SDK Guide.
Tutorial: Security-Focused Code Review
Goal: Identify security vulnerabilities in a PR Prompt:Tutorial: Performance Review
Goal: Identify performance issues in code Prompt:Bug Fixing
For production incident investigation and automated error analysis, see the Incident Triage Use Case which covers integration with monitoring tools like Datadog.
Tutorial: Fix a Crash Bug
Goal: Diagnose and fix an application crash Prompt:- Analyzes the stack trace
- Reviews recent changes
- Identifies the null reference issue
- Implements a defensive fix
- Creates test to prevent regression
Tutorial: Fix a Memory Leak
Goal: Identify and fix a memory leak Prompt:Feature Development
Tutorial: Add a REST API Endpoint
Goal: Create a new API endpoint with full functionality Prompt:- Creates route handler following existing patterns
- Implements validation middleware
- Creates or updates the service layer
- Adds error handling
- Generates API documentation
- Creates comprehensive tests
Tutorial: Implement a Feature Flag System
Goal: Add feature flags to the application Prompt:Contributing Tutorials
Have a great use case? Share it with the community! What makes a good tutorial:- Solves a common problem
- Has clear, reproducible steps
- Includes example prompts
- Explains expected outcomes
- Provides tips for success
- Create a detailed example following this format
- Test it with OpenHands to verify it works
- Submit via GitHub pull request to the docs repository
- Include any prerequisites or setup required
These tutorials are starting points. The best results come from adapting them to your specific codebase, conventions, and requirements.

