Every morning, let an agent find freshly merged code that lacks tests, add coverage that matches your style, run the tests and open a PR for review: AI agent prompt

In the same Cursor Automations announcement, Cursor describes a daily chore agent: each morning it reviews recently merged code, spots areas that need test coverage, follows existing conventions when adding tests, avoids changing production behavior unless necessary, runs the relevant test targets, then opens a pull request. Teams use the same automation style for weekly change digests and Slack bug-report triage into Linear.

CodingMorning test coverage agentintermediate

The prompt

1. Create a weekday morning automation (Cursor Automations, Claude scheduled task, or CI cron) with access to your repo and permission to open PRs, not to merge them.
2. Scope it to code merged in the last 24–48 hours on your main branch.
3. Instruct it: "Find new or changed code paths with weak or missing tests. Add tests that match our existing style and frameworks. Do not change production behavior unless a tiny seam is required for testing, and call that out in the PR. Run the relevant test targets. Open one PR per coherent area with a short summary of what is covered."
4. Require the PR description to list commands run and any flaky failures.
5. A human reviews and merges. After a week, add paths or packages the agent should ignore (generated code, vendor, flaky suites).
Open in ChatGPT Open in Claude Perplexity Download as agent skill (SKILL.md)

How to use it

  1. Copy the prompt above.
  2. Replace every [bracket] with your own details (or fill in the blanks on AgentPlaybook Real Estate, which remembers your answers for the next prompt).
  3. Paste it into Cursor Automations or Claude/ChatGPT scheduled coding agent, GitHub/GitLab, your test runner and review the answer before you use it.

Works with: Cursor Automations or Claude/ChatGPT scheduled coding agent, GitHub/GitLab, your test runner

Real-world example: cursor.com/blog/automations

Featured in: AI prompts to summarize meetings, notes, documents and reports · AI prompts for writing SOPs, reports, policies and checklists

Before you use it: what to check

Already built into this prompt

Check yourself

Using an AI agent? Download this prompt as a SKILL.md agent skill with these checks built in, or get the .zip for Claude.ai. How to install skills.

Share:Post on XLinkedInFacebookRedditWhatsApp
</> Embed this prompt on your site

Paste this HTML into your blog or website. It's a plain card with no tracking scripts that links back to this prompt.

Want to make this prompt even better? Grade it with the free prompt grader or build your own with the AI prompt generator.

Get the free Solo Founder Stack pack

32 copy-paste agent prompts (PDF) plus 5 new prompts every week.

Get it free

More Coding prompts

Ship a small feature as a PRFeatures · intermediateBuild a simple internal toolNo-code apps · beginnerAutomation script for a boring taskScripts · beginnerCommit & PR assistantGit workflow · intermediateFix a failed pipelineCI fixes · intermediateCheckpointed long task setupLong-running tasks · intermediate

See all Coding prompts →

Related prompts from other teams

Human handoff summaryCustomer Support · intermediateAccount research briefSales · beginnerCall notes to follow-up emailSales · beginner · worked exampleWeekly newsletter drafterContent · beginner · worked example