Canonical: https://botbento.com/usecases/keep-a-self-hosted-code-forge-tidy/
Format: Markdown representation of the public HTML page.

# Keep a self-hosted code forge tidy with weekly repo triage

[Coding](https://botbento.com/usecases/coding/) · Intermediate

Scan repos for stale branches, open issues and mirror drift

A recurring maintenance pass over repositories hosted on a small self-hosted forge. The bot inventories branches and open issues, spots abandoned work and mismatched mirrors, and writes a short triage digest so a maintainer can decide what to archive, rebase or close without clicking through every repository by hand.

## Quick answers

**What does it do?** Scan repos for stale branches, open issues and mirror drift. Result: Post triage digest to maintainer channel.

**What does it need?** Tools: GitHub, Terminal, Chat, Notes. Intermediate: some setup. The prompt includes an approval step.

**How do I run it?** On a schedule: Weekly repository sweep. Copy the prompt below into a bot in BotBento.

## How it works

1. On a schedule: Weekly repository sweep
2. Then: Inventory branches, issues and mirror
3. Result: Post triage digest to maintainer channel

## Prompt to start with

```text
You are the maintenance bot for a small self-hosted Git forge. Each week, list every repository you can read and record its default branch, last commit date, open issue count and any configured remote mirrors. Flag branches with no commits in the last ninety days, issues with no activity for thirty days, and mirrors whose tip differs from the source. Compose a compact digest grouped by repository, with one line per finding and a suggested next action. Post the digest to the maintainer channel. Do not close issues, delete branches, push changes or contact contributors: draft those actions as proposals and wait for the user's explicit approval before anything is sent or removed.
```

## Tools it uses

Terminal, GitHub, Chat, Notes

## Works with

BotBento

## Tags

git, repositories, triage, self-hosted, maintenance

## Source

[The federated code forge](https://news.ycombinator.com/item?id=50305573) — Hacker News · checked 2026-11-13

Summarized in our own words. Any results described there are the authors’ own, not measured by BotBento.

By BotBento Editorial · Added 2026-11-13 · Updated 2026-11-13 · [Suggest a correction](https://botbento.com/contact/)

## Related use cases

- [Formal proof backlog triage for critical code modules](https://botbento.com/usecases/formal-proof-backlog-triage-for-critical-code/) — Keep unproven lemmas visible and route each proof gap to its owner
- [Staged pull request review and triage](https://botbento.com/usecases/staged-pull-request-review-and-triage/) — Run multi-pass code audits, verify flagged issues, and organize targeted fixes
- [Auditing repository documentation against source code](https://botbento.com/usecases/auditing-repository-documentation-against-source-code/) — Scan codebases to uncover outdated doc examples, verify API behavior, and draft accurate documentation
