gitnexus-cli
Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki,…
交互式调试模式:面对难复现的 bug,agent 用「假设驱动 + 人在回路」的闭环排查——读代码形成假设 → 插入会上报到本地日志服务的 debug 日志(浏览器侧也能收,CORS 已处理)→ 让用户去复现 → 读本轮日志验证/推翻假设 → 修复并再插一轮验证 → 用户确认解决后清除全部插桩交付。绝不假装自己能复现,复现永远交给用户。
Claude Code
$ npx -y skills add alexanderizh/spark-agent --skill spark-debug --agent claude-code
Codex
$ npx skills add alexanderizh/spark-agent --skill spark-debug -a codex -y
Cursor
$ npx skills add alexanderizh/spark-agent --skill spark-debug -a cursor -y
Gemini CLI
$ npx skills add alexanderizh/spark-agent --skill spark-debug -a gemini-cli -y
GitHub Copilot
$ npx skills add alexanderizh/spark-agent --skill spark-debug -a github-copilot -y
OpenCode
$ npx skills add alexanderizh/spark-agent --skill spark-debug -a opencode -y
Windsurf
$ npx skills add alexanderizh/spark-agent --skill spark-debug -a windsurf -y
name: Spark Debug description: "交互式调试模式:面对难复现的 bug,agent 用「假设驱动 + 人在回路」的闭环排查——读代码形成假设 → 插入会上报到本地日志服务的 debug 日志(浏览器侧也能收,CORS 已处理)→ 让用户去复现 → 读本轮日志验证/推翻假设 → 修复并再插一轮验证 → 用户确认解决后清除全部插桩交付。绝不假装自己能复现,复现永远交给用户。" version: 1.0.0 author: Spark AI category: debugging tags: [debug, 调试, bug, troubleshooting, logging, 日志, 复现, reproduce, hypothesis, 排查]
你在「调试模式」下工作。一个本地日志服务已在后台运行,你插入的 debug 日志会上报到它那里(**包括浏览器/webview/前端代码**,跨域已处理)。你的任务是用 **假设驱动 + 人在回路** 的闭环定位并修复 bug。
> 核心原则:**你不能复现 bug,复现永远是用户的步骤。** 你负责假设、插桩、读日志、分析、修复、清理;用户负责操作复现。每插一轮桩就**结束 turn**,把控制权交回用户。
可用工具(MCP 命名空间 `mcp__spark_debug__`):
| 工具 | 何时用 | |------|--------| | `begin` | 进入调试**第一步**。拿到 `sid` / 端口 / 当前轮次 + 可直接粘贴的插桩上报器 | | `read` | 用户说"复现完了"之后,拉取**本轮**日志 | | `status` | 看 `thisRound`(本轮收到几条)判断用户是否真复现;看 `hypotheses` 台账避免重复假设 | | `next_round` | 验证完一轮、要插新一批桩时调用,传入本轮假设,推进轮次并拿到新一轮上报器 | | `finish` | 用户确认 bug 解决后调用:清空日志 + 返回需要从代码删除的插桩标记 |
---
1. 读 `bugDescription`,必要时用 `Read` / `Grep` 看相关代码,建立初步理解。 2. 调 `begin` → 记下 `sid`、`port`、`round`,拿到 `snippets`(已填好真实 sid/round/port 的上报器)。
3. 形成**一个明确假设**("我怀疑 X 导致 Y,因为 Z")。 4. **改代码前先评估影响面**(本项目要求对将修改的 symbol 跑 impact 分析;HIGH/CRITICAL 风险先告知用户)。 5. 在关键路径插入 debug 日志:粘贴 `snippets` 里的上报器,并在可疑点调用 `__sparkDebug('标签', { 变量 })`。
6. 给用户**清晰的复现指引**(点哪、输入什么、预期看到什么),然后 **结束 turn 等待用户复现**。
7. 用户回"复现完了" → 先 `status` 看 `thisRound`:
8. 判断:
9. 实施修复(先评估影响面)。 10. 在修复点附近插入**验证日志**(证明修复路径被走到、状态符合预期),`next_round({hypothesis: '验证修复 X'})`。 11. 给用户复现指引,**结束 turn** 让用户测试。
12. 用户反馈:
---
各语言上报器模板与字段说明见 `references/instrument-snippets.md`;完整状态机与边界话术见 `references/state-machine.md`。
面向专业开发与复杂工作的本地优先桌面 Agent 工作台:编排工作流、协作多个 Agent 会话、智能路由模型,并用自定义工具和应用扩展执行能力;每次运行可审查、可接管、可回退。 A free, local-first desktop agent workbench for professional software development and complex work.
Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki,…
Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where…
Use when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of…
Use when the user asks about GitNexus itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or…
Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples:…
Use when the user wants to rename, extract, split, move, or restructure code safely. Examples: \"Rename this function\",…
Set up, check, change, preview, or report a problem with the claude-hud status line. Use when the user mentions the HUD or status…
Personalized audit that teaches the advanced Paradev (formerly Superset) features the user isn't using yet (automations, parallel…
Direct actions on one Orchestrator session or PR: stop or interrupt, resume, merge a PR, start a review, screenshot a session's…