Dev & DevOpsWorks with any agent

Database slow query report

Finds the slowest queries and suggests indexes.

RunsEvery Tuesday at 9 AM
Cron0 9 * * 2
Works withAny agent, any stack
prompt.txt
Query <pg_stat_statements / slow query log> for the 10 queries with the highest total time this week. For each: the normalized query, calls, mean time, which code path issues it (search the codebase), and a proposed fix: index (with exact CREATE INDEX statement), query rewrite, or caching. Do not run migrations.

Replace anything in <ANGLE BRACKETS> with your own details. Review outputs before letting an agent send, buy or delete anything.

Share on X
How to run this

Works with any agent

Steps

  1. Copy the prompt and fill in the parts in angle brackets.
  2. Paste it into whatever agent you already use: a chat assistant, a coding agent, an automation tool, or a script that calls any model API.
  3. Schedule it (every tuesday at 9 am). Use the agent's own scheduler if it has one, otherwise run it from cron with the expression below.
  4. Give it only the access it needs (inbox, calendar, repo, sheet) and keep sends, purchases and deletes behind your approval.
  5. Review the first two runs, tweak the prompt, then let it run.
Want this running for you?Done-for-you setup, $299. 5 routines wired into your stack in 48 hours.Request setup
Related

Routines that pair well.

The newsletter · The Handoff

One chore a week you never do again.

For founders and solo operators running on AI agents. Each issue hands off one recurring chore with the prompt, the schedule, what can break, and the guardrail. Any agent, any stack. Monday, Wednesday and Friday mornings.

Free. Unsubscribe any time. Browse the archive.

Want this running for you? Done-for-you setup, $299