To create an effective repository agent, you can ask OpenHands to analyze your repository with a prompt like:
Copy
Ask AI
Please browse the repository, look at the documentation and relevant code, and understand the purpose of this repository.Specifically, I want you to create a `.openhands/microagents/repo.md` file. This file should contain succinct information that summarizes:1. The purpose of this repository2. The general setup of this repo3. A brief description of the structure of this repoRead all the GitHub workflows under .github/ of the repository (if this folder exists) to understand the CI checks (e.g., linter, pre-commit), and include those in the repo.md file.
This approach helps OpenHands capture repository context efficiently, reducing the need for repeated searches during conversations and ensuring more accurate solutions.
A comprehensive repository agent file (.openhands/microagents/repo.md) should include:
Copy
Ask AI
# Repository PurposeThis project is a TODO application that allows users to track TODO items.# Setup InstructionsTo set it up, you can run `npm run build`.# Repository Structure- `/src`: Core application code- `/tests`: Test suite- `/docs`: Documentation- `/.github`: CI/CD workflows# CI/CD Workflows- `lint.yml`: Runs ESLint on all JavaScript files- `test.yml`: Runs the test suite on pull requests# Development GuidelinesAlways make sure the tests are passing before committing changes. You can run the tests by running `npm run test`.