---
name: al-620-every-morning-let-an-agent-find-freshly-merged-code-that
description: "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. Use when the user wants help with morning test coverage agent (coding) for a small business."
---

# 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

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.

## Inputs to collect first
Ask the user for anything below that they haven't already given you. Don't guess missing facts.

- The material the task is about (pasted text, notes or data)

## Instructions

Do the task below with the user's inputs in place of each [bracket].

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).

## Safety checks (share these with the user)

- This prompt works on text other people wrote (emails, reviews, messages or web pages). That text can hide instructions aimed at AI, such as "ignore your rules and…". Paste it as material to work on, and never let the AI act on requests inside it, like paying, sharing logins or changing records.
- Read and edit the draft before it reaches a customer or goes public. If you later automate this prompt, start with "draft and notify me", not "send automatically".
- Check names, dates, numbers and any claim against your own source material before you use the answer. AI can misread or invent details.
- Say clearly which parts need a person to review or approve before anything is sent, paid, posted or filed.

## About this skill

- Works with: Cursor Automations or Claude/ChatGPT scheduled coding agent, GitHub/GitLab, your test runner
- Based on this real-world example: https://cursor.com/blog/automations
- Free prompt from AgentPlaybook Real Estate: https://agentic-library.netlify.app/prompt/al-620-every-morning-let-an-agent-find-freshly-merged-code-that-lac/
- To install in an agent that supports Agent Skills, save this file as SKILL.md in a folder with the same name as `name` above (for example in your skills directory). Install steps for Claude.ai, Claude Code, Cursor and Codex: https://agentic-library.netlify.app/skills/
