---
title: "David Crawshaw's AI Prompt for Nightly Upstream Rebase Automation"
source: "Simon Willison 博客（Atom）"
source_tier: "t2"
url: "https://simonwillison.net/2026/Aug/3/david-crawshaw/#atom-everything"
permalink: "https://feed.astralor.com/items/itm_4395e81e84cb079ecc4484de"
published: "2026-08-03T16:15:27.000Z"
score: 70
channel: "ai"
tags: ["AI Agent","cron","Prompt Engineering","Software Maintenance"]
---

# David Crawshaw's AI Prompt for Nightly Upstream Rebase Automation

## AI commentary

> This piece is valuable because it turns an AI prompt into a reusable DevOps pattern. For developers maintaining forks or downstream branches, nightly auto-rebase saves a lot of time. It's a must-bookmark for anyone doing open source work.

## At a glance

David Crawshaw has proposed a minimal but effective AI prompt that instructs an agent to set up a nightly cron job: fetch the latest upstream changes for a given software project and rebase all local modifications on top of the upstream branch. After the rebase, the agent should verify that the software still builds and passes tests. This prompt is a prime example of using large language models to automate tedious maintenance tasks, freeing developers from repetitive integration work. It is particularly valuable for maintainers of forks or downstream projects that must continuously track upstream development, and it demonstrates how simple, well-scoped instructions can turn an AI assistant into a reliable DevOps helper.

## Key points

- Uses cron to schedule automatic fetching of upstream changes.
- Rebase local branches on top of upstream to stay in sync.
- Automatically verifies the software works to catch regressions.
- The prompt serves as a template for AI-driven DevOps automation.

## Full text

Set up a nightly cron job that executes the prompt: fetch upstream changes to the &lt;software&gt; and rebase all local changes on top of upstream. Check that the software works …

---

Verify against the original before citing; curated by Astral Feed: https://feed.astralor.com/items/itm_4395e81e84cb079ecc4484de
