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.
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).
How to use it
- Copy the prompt above.
- Replace every [bracket] with your own details (or fill in the blanks on AgentPlaybook Real Estate, which remembers your answers for the next prompt).
- 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
- Do not change production behavior unless a tiny seam is required for testing, and call that out in the PR.
- A human reviews and merges.
Check yourself
- 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. How prompt injection works →
- 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.
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.
Want to make this prompt even better? Grade it with the free prompt grader or build your own with the AI prompt generator.
32 copy-paste agent prompts (PDF) plus 5 new prompts every week.
Get it free