Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/keunsy/cursor-feedback-gate/feedbackgategit clone --depth 1 https://github.com/keunsy/cursor-feedback-gateWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01023 | $0.01023 |
| Opus 5 | $0.00511 | $0.00511 |
| Sonnet 5 | $0.00205 | $0.00205 |
| Haiku 4.5 | $0.00102 | $0.00102 |
Grade A, and why
FeedbackGate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Feedback Gate Protocol
核心规则
完成用户请求后,禁止直接结束回复。必须调用 feedback_gate_chat MCP 工具打开弹窗,等待用户反馈。只有用户在弹窗中回复 "TASK_COMPLETE"、"Done" 等完成信号后才可结束。
⚠️ 内容分发原则(最常见的误用)
Cursor 主聊天窗口是主要回复通道,Feedback Gate 弹窗只是确认关卡。
- ✅ 主回复(Cursor 聊天窗口):所有工作输出、分析结果、代码变更说明、命令执行结果、详细解释。
- ✅ 弹窗 message:1-2 句话的简短摘要 + 询问是否继续/完成。
- ❌ 绝对禁止:把完整工作结果、代码块、日志输出、长段落放进弹窗 message。
正确示例
# 主回复中:
已完成数据库迁移,新增 users 表,修改了 3 个文件...(完整内容)
# 弹窗 message:
"已完成数据库迁移。需要其他修改吗?"
错误示例
# 主回复中:(空或只有一句话)
# 弹窗 message:
"已完成数据库迁移。以下是变更详情:\n1. 新增 users 表...\n2. 修改了 migration.sql...\n3. 更新了 schema.prisma...\n..."
判断标准:弹窗 message 不应超过 100 字。如果超过,说明内容应该在主回复中。
工作流程
- 执行任务:正常完成用户请求(编码、分析、工具调用等)。
- 在主回复中输出完整结果:所有工作内容写在 Cursor 主聊天窗口。
- 打开 Feedback Gate:调用
feedback_gate_chat,仅传入简短摘要(≤100 字)。 - 处理反馈:收到用户弹窗回复后继续执行,然后再次调用
feedback_gate_chat。 - 循环直到完成:重复步骤 3-4,直到用户发送完成信号。
工具调用格式
- MCP Server:
user-feedback-gate - Tool Name:
feedback_gate_chat - 调用方式:
CallMcpTool(server="user-feedback-gate", toolName="feedback_gate_chat", arguments={...}) - 绝不假设工具不可用。如果调用报错,重试一次后再告知用户。不要因为"找不到"而跳过。
CallMcpTool:
server: "user-feedback-gate"
toolName: "feedback_gate_chat"
arguments:
message: (≤100字的简短摘要 + 提问,如"已完成XX。需要调整吗?")
title: "Feedback Gate" (可选)
context: (可选,用于内部追踪,不展示给用户)
session_id: (首次调用时生成一个随机 UUID,后续所有 re-entry 调用复用同一个值)
workspace_path: (当前项目的绝对路径)
session_id 规则
- 首次调用:生成一个 UUID(如
crypto.randomUUID()或类似方式),作为session_id传入。 - 后续所有调用:复用同一个
session_id,包括 [WAITING] 后的 re-entry 和后续新任务的 feedback gate 调用。 - 一个对话 = 一个 session_id,整个对话生命周期不变。不同的 Cursor agent chat 使用不同的 session_id。
约束
- 每次回复结束前必须调用此工具,无例外。
- 如果工具不可用,告知用户 MCP 服务器可能未运行。
- 运行整个应用(Web 服务器、长期进程等)前需先征得用户确认。
上下文压缩后的恢复
当对话被压缩(context compaction)后,你可能在历史摘要中看到之前的 feedback_gate_chat 调用记录。无论历史中工具调用的状态如何(成功、失败、超时),每次新回复结束时都必须重新调用 feedback_gate_chat。 不要因为历史中出现过工具调用失败就跳过调用。
⚠️ 强制提醒
在你生成任何回复的最后一步,你必须调用 feedback_gate_chat。这是不可跳过的。如果你发现自己即将结束回复而没有调用此工具,立即停下来调用它。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 83 lines · 1,023 tokens per session scan A 0c6975953f30
FeedbackGate is a cursor rule published in the GitHub repository keunsy/cursor-feedback-gate (14 stars, last pushed 29d ago), licensed MIT. It adds 1,023 tokens to every session, about $0.0051 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.