表现
A read-only agent that inspects query performance, blocking sessions, and Performance Advisor findings once per hour.
它在看什么 #
🌐 What it watches
- 运行时间长的会话以及阻塞其他会话的PID
- 跨已保存的每小时测量的查询执行时间回归
- 性能顾问在警告和错误级别的发现
它在项目范围的 Supabase MCP 上使用 get_advisors 和只读的 execute_sql。它不会创建索引、重写查询或取消会话。
🌐 It uses get_advisors and read-only execute_sql on project-scoped Supabase MCP. It does not create indexes, rewrite queries, or cancel sessions.
当它看时 #
🌐 When it watches
Once per hour
Run it on demand after a latency regression or a schema change.
它会输出什么 #
🌐 What it will output
这个提示报告与受影响的查询、会话或对象相关的新发现或变化,并包含调查和验证步骤。它不会在没有可比测量的情况下推断回归,也不会仅基于查询时间建议取消。请参见 什么会触发性能报告。
🌐 This prompt reports new or changed findings with the affected query, session, or object, plus an investigation and verification step. It does not infer a regression without comparable measurements or recommend cancellation based only on query age. See what triggers a performance report.
如果检查无法运行,代理会告诉你缺少什么。清除的检查和未更改的结果不会发出任何提示。
🌐 If a check cannot run, the agent tells you what is missing. Clear checks and unchanged findings stay quiet.
当代理发现问题时,它会在测试框架中报告。把报告发送到你已经处理工作的地方。使用你的测试框架已有的连接。例如,Codex 可以创建一个 Linear 问题。
🌐 When the agent finds an issue, it reports in the harness. Send that report wherever you already triage work. Use the connections your harness already has. For example, Codex can open a Linear issue.
保持 Supabase 项目只读。提交工单只是工作流程中的操作,并不是对项目的修改。
🌐 Keep the Supabase project read-only. Filing a ticket is work in the harness, not a change to the project.
如果你想让每次计划运行都使用那个路由,把它加到提示里就行。
🌐 If you want that routing on every scheduled run, add it to the prompt.
设置代理 #
🌐 Set up the agent
允许代理读取提示中链接的文档。配置你的工具以保存测量数据和警报状态,然后在每次运行时重新加载它们。查询比较需要三个每小时快照;第一次运行仍然可以报告当前的阻塞因素和顾问发现。
🌐 Allow the agent to read the documentation linked in its prompt. Configure your harness to save measurements and alert state, then reload them on each run. Query comparisons need three hourly snapshots; the first runs can still report current blockers and advisor findings.
Create a Claude routine that runs the Performance prompt once per hour.
- Connect the Supabase MCP server with
project_refandread_only=true. - Open Claude routines or run
/schedulein Claude Code. - Name it Performance checks. Paste the prompt. Set the schedule to once per hour.