> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usebench.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Repositories

> Choose what Bench scans and switch between projects.

## Copy this into your coding agent

Paste into Cursor, Codex, Claude Code, or another coding agent in your project.

```text theme={null}
Help me scan this repository in Bench using https://docs.usebench.ai/guides/repositories.
Identify its GitHub repository and branch. If Bench MCP is connected, check access
and scan that branch; otherwise tell me the exact connection step to complete.
Show the detected systems, source locations and gaps. Do not start an evaluation.
```

<Steps>
  <Step title="Connect GitHub">Choose **Connect GitHub** and grant access to the repositories you want to test. Bench does not need every repository in your account.</Step>
  <Step title="Choose a repository and branch">Open **Repositories**, choose the repository, then select its branch and start a scan. A connection is not the same as a completed scan.</Step>
  <Step title="Open your systems">After scanning, open **AI systems**. Use the repository selector to change projects. Your selected repository stays selected as you navigate.</Step>
</Steps>

No repository? Choose **Add AI system → Upload prompts** and add a text, Markdown,
JSON or YAML file. Select the model those prompts use.

Previously scanned targets appear first, marked **Scanned · main**, for example.
Click the branch to choose another branch or an open pull request. Your saved
target stays selected when you return. Scanning `dev` creates a separate row and
systems; it does not replace `main`. A scan with no detected systems still appears.

Use the repository picker to view all branches or one specific target. Systems,
findings and evaluation history follow that selection. Choose **Scan again** to
refresh the selected target.

## Check a pull request

Choose a pull request from **Branch or pull request**. Bench scans its head commit
and retains it separately as **PR #42**, for example. Findings and evaluations
belong to that PR target, so later source changes do not rewrite older results.
This checks the selected source snapshot; it does not post a GitHub Check,
merge the PR, or automatically run the entire application.

For execution evidence, run [real app tests](/sdk/system-evaluation) against
that same revision. To propose another code change, scan the PR's source branch
first. Listing PRs requires GitHub access to read pull requests; you can still scan
an accessible source branch if PR listing is unavailable.

## Background refresh

Scanned GitHub repository/branch pairs are checked about every ten minutes. Bench
reruns discovery when the source SHA changes and preserves your system identity
and manual context. The interval depends on service availability and backlog;
failed checks back off before retrying. Refresh happens in the background.
Uploaded prompts do not have a GitHub refresh schedule.

A scan can remove a source warning when its evidence disappears. It does not prove
a production fix or start unrestricted application execution. Automatic real app
testing requires a separately enabled [real app test setup](/sdk/system-evaluation).

## Manage access

Use **Manage GitHub access** to change the GitHub App's repository permissions.
Removing an AI system in Bench does not delete code or revoke the GitHub App.
Historical context can contain evidence from removed components. A restricted
API key must cover those repositories too. Legacy evidence with unverified
repository history requires a signed-in owner's review.

See [framework support](/guides/framework-support) for recognition limits and
[your first bench](/quickstart) for the next step.
