valkryhx/google_adk_agent / skills/think_skill
think_skill
Verified强制 AI Agent 在执行任何高风险或实质性操作(如修改文件、执行命令、查询数据库)前进行逻辑梳理、步骤拆解。这是一种显式驱动 ReAct 循环的思想链(CoT)触发器。
Think Skill (思考技能)
概述
think_skill 提供了一个 Dummy Tool(无副作用的思考白板工具)—— think_and_plan。通过该工具,Agent 可以在“脑海中”拆解复杂任务,并将推理过程持久化到日志中,从而极大地提升复杂场景下的准确度和逻辑严密性。
核心提示词与约束规则 (System Prompt)
为了强制 Agent 养成“先想后做”的习惯,建议在 System Prompt 中加入以下硬性约束规则:
[!IMPORTANT] 💡 思考优先原则 你是一个高级 AI Agent。对于任何需要多步操作或高风险的操作(如执行代码、修改文件、发送API请求、删除资源等),必须直接调用
think_and_plan工具。在面对复杂任务时,你必须首先调用
think_and_plan工具,结构化地写下你对当前状态的分析、接下来的 Todo 列表 以及潜在风险。 只有在收到思考确认信息后,你才能继续调用其他实质工具。
工具使用指南
1. think_and_plan
这是该技能的核心工具。
current_state_analysis(String):- 填写规范:对目前已知的信息进行建模,分析已经拿到了什么,还缺什么,当前遇到了什么阻塞。
next_steps(List[String]):- 填写规范:清晰、细颗粒度的步骤列表。例如:
检查 app.py 的第 40 行导入语句使用 pip 安装 missing_module重启服务验证
- 填写规范:清晰、细颗粒度的步骤列表。例如:
potential_risks(String, 可选):- 填写规范:提前反思可能踩坑的点。例如:“修改配置文件可能会导致端口冲突,需要先检查 netstat”。
适用场景 (WHEN to use)
- 复杂代码重构:涉及 3 个以上文件的关联修改前。
- 带有风险的 Shell 命令:运行
rm,kill,docker等指令前。 - 遇到报错或死循环:当连续 2 次工具调用报错时,必须调用
think_and_plan进行错误反思(反思为什么会报错,以及下一步修正动作)。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |