Skill Feedback Collector
Pause the agent and wait for human feedback via a browser-based UI connected through WebSocket. Includes a task queue for batch execution of pre-loaded tasks.
When to Use
- - After completing a task, to let the user verify the result
- When encountering uncertain parameters (colors, layouts, API choices, business logic)
- Before making destructive or irreversible changes that need user confirmation
- When the user prefers interactive confirmation over autonomous execution
- When batch-executing multiple pre-loaded tasks from the queue
Instructions
Follow these guidelines when this skill is active:
- 1. After completing a task, call
ask_human_feedback with a summary and options for next steps. This lets the user decide what to do next rather than ending the session.
- 2. When unsure about implementation details, call
ask_human_feedback with your question instead of making assumptions. Getting explicit input leads to better results.
- 3. The response from
ask_human_feedback is your next instruction. Execute it, then call ask_human_feedback again when done. This creates a productive feedback loop.
- 4. If the task queue returns a task automatically (queue was non-empty), execute that task and call
ask_human_feedback again when complete. The queue feeds tasks until empty.
- 5. Mode switching:
- User says "free mode" / "自由模式" → call
set_feedback_mode(enabled: false) to work without pausing
- User says "feedback mode" / "确认模式" → call
set_feedback_mode(enabled: true) to resume the confirmation loop
Best Practices
- - Ask the user before ending a session — they may have more tasks
- Confirm before making destructive changes (force push, drop table, delete files)
- If feedback mode is disabled (bypass message returned), continue working autonomously
Tools
ask_human_feedback
Pauses execution and sends the reason to the browser UI. Returns the human's text response. If the task queue is non-empty, the next task is auto-dequeued and returned (with a short delay for UI visibility).
Parameters: reason (string) — summary of work done and what input you need.
Example reason format:
CODEBLOCK0
set_feedback_mode
Toggle feedback confirmation on/off. When off, ask_human_feedback returns immediately without pausing.
Parameters: enabled (boolean)
Setup
CODEBLOCK1
MCP configuration:
CODEBLOCK2
Browser UI: http://<server-ip>:18061
| Env Variable | Default | Description |
|---|
| INLINECODE14 | INLINECODE15 | HTTP and WebSocket port |
| INLINECODE16 |
(empty) | Optional access token for the UI |
Workflow
CODEBLOCK3
Security
- - Set
FEEDBACK_TOKEN when deploying on shared or public networks to restrict access - Use a firewall to limit which IPs can reach the HTTP/WebSocket port
- The server binds to
0.0.0.0 by default for convenience; restrict network access at the OS or firewall level if needed - Conversation history (
feedback-history.json) is stored locally in the skill directory; review and rotate if it contains sensitive information - This skill does not make outbound network requests, download external resources, or execute shell commands
Tips
- - The task queue lets users pre-load multiple tasks for sequential execution
- Users can add tasks to the queue while the agent is working
- HTTP long-polling fallback activates automatically when WebSocket is unavailable
- Browser notifications and sound alerts notify you when the agent has a question
- Conversation history is persisted locally (max 500 entries)
技能反馈收集器
通过基于WebSocket连接的浏览器UI暂停智能体并等待人工反馈。包含一个任务队列,用于批量执行预加载的任务。
使用时机
- - 完成任务后,让用户验证结果
- 遇到不确定的参数(颜色、布局、API选择、业务逻辑)时
- 在进行需要用户确认的破坏性或不可逆更改之前
- 当用户偏好交互式确认而非自主执行时
- 当需要批量执行队列中的多个预加载任务时
使用说明
当此技能激活时,请遵循以下指南:
- 1. 完成任务后,调用askhumanfeedback并提供摘要和后续步骤选项。这使用户能够决定下一步做什么,而不是直接结束会话。
- 2. 对实现细节不确定时,调用askhumanfeedback并提出问题,而不是自行假设。获取明确的输入能带来更好的结果。
- 3. askhumanfeedback的响应就是你的下一个指令。执行该指令,完成后再次调用askhumanfeedback。这将形成一个高效的反馈循环。
- 4. 如果任务队列自动返回一个任务(队列非空),执行该任务,完成后再次调用askhumanfeedback。队列会持续提供任务直到清空。
- 5. 模式切换:
- 用户说free mode/自由模式 → 调用set
feedbackmode(enabled: false)以无暂停方式工作
- 用户说feedback mode/确认模式 → 调用set
feedbackmode(enabled: true)恢复确认循环
最佳实践
- - 在结束会话前询问用户——他们可能有更多任务
- 在进行破坏性更改(强制推送、删除表、删除文件)前进行确认
- 如果反馈模式已禁用(返回绕过消息),继续自主工作
工具
askhumanfeedback
暂停执行并将reason发送到浏览器UI。返回人类的文本响应。如果任务队列非空,下一个任务会自动出队并返回(为UI可见性添加短暂延迟)。
参数: reason(字符串)——已完成工作的摘要以及你需要什么输入。
示例原因格式:
已完成:[具体完成的工作]
更改:[修改的文件、添加的端点等]
你希望我下一步做什么?
- 1. [选项A]
- [选项B]
- 其他事项
setfeedbackmode
切换反馈确认的开启/关闭。关闭时,askhumanfeedback会立即返回而不暂停。
参数: enabled(布尔值)
设置
bash
npm install && npm run build
MCP配置:
json
{
command: node,
args: [build/index.js],
cwd: /path/to/skill-feedback-collector
}
浏览器UI:http://<服务器IP>:18061
| 环境变量 | 默认值 | 描述 |
|---|
| FEEDBACKPORT | 18061 | HTTP和WebSocket端口 |
| FEEDBACKTOKEN |
(空) | UI的可选访问令牌 |
工作流程
用户消息 → 智能体工作 → 调用askhumanfeedback(完成。下一步?)
↓
[队列有任务?] → 是 → 返回下一个任务 → 智能体继续
↓ 否
[通过浏览器UI等待人类输入]
↓
人类响应 → 智能体接收 → 工作 → 再次调用askhumanfeedback
↓
... 循环持续直到用户表示完成 ...
安全性
- - 在共享或公共网络上部署时设置FEEDBACK_TOKEN以限制访问
- 使用防火墙限制哪些IP可以访问HTTP/WebSocket端口
- 服务器默认绑定到0.0.0.0以方便使用;必要时在操作系统或防火墙级别限制网络访问
- 对话历史(feedback-history.json)存储在技能目录本地;如果包含敏感信息请审查和轮换
- 此技能不发起出站网络请求、不下载外部资源、不执行shell命令
提示
- - 任务队列允许用户预加载多个任务进行顺序执行
- 用户可以在智能体工作时向队列添加任务
- 当WebSocket不可用时,HTTP长轮询回退会自动激活
- 浏览器通知和声音提醒会在智能体有疑问时通知你
- 对话历史保存在本地(最多500条记录)