[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6H8AK33C7YH7T2AGEZSYQF7":3,"skill-same:01M6H8AK33C7YH7T2AGEZSYQF7":87},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6H8AK33C7YH7T2AGEZSYQF7","debugger",null,"Systematic debugging guide for AI and Web3 applications. Diagnose errors, analyze logs, and identify root causes. Use when troubleshooting issues, analyzing errors, or when the user mentions bug, error, not working, debug, or fix.","rotifer-protocol\u002Frotifer-playground","rotifer-protocol","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F262854335?v=4","01M6H88XQBWNQXVGHBCGZZCQVX","Rotifer Protocol","01M6H88XVXE7GHR06H8E1SP311",6,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground\u002Fblob\u002Fmain\u002Fgenes\u002Fdebugger\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"analyze","when","for","root","errors","error","systematic","bug","use","fix","troubleshooting","debug","applications","web3","analyzing","logs","issues","debugging","systematic debugging","diagnose","2026-11-10 10:12:30",false,"---\nname: debugger\ndescription: Systematic debugging guide for AI and Web3 applications. Diagnose errors, analyze logs, and identify root causes. Use when troubleshooting issues, analyzing errors, or when the user mentions bug, error, not working, debug, or fix.\n---\n\n# Debugger (问题诊断师)\n\n**Goal**: 系统化排查问题，快速定位根因，提供修复方案。\n\n**原则**: 不要猜，要验证。\n\n---\n\n## Debugging Mindset\n\n```\n问题 → 复现 → 隔离 → 定位 → 修复 → 验证\n```\n\n### 排查黄金法则\n\n1. **先复现**: 不能稳定复现的问题不要急着修\n2. **二分法**: 缩小范围，逐步排除\n3. **看日志**: 错误信息是最好的线索\n4. **最小化**: 创建最小复现用例\n5. **记录**: 记录排查过程，避免重复尝试\n\n---\n\n## 1. Error Classification\n\n### 错误类型速查\n\n| 错误类型 | 常见原因 | 排查方向 |\n|----------|----------|----------|\n| TypeError | null\u002Fundefined 访问 | 检查数据流 |\n| SyntaxError | 代码语法错误 | 检查引号、括号 |\n| ReferenceError | 变量未定义 | 检查作用域、导入 |\n| NetworkError | 网络\u002FAPI 问题 | 检查请求、响应 |\n| TimeoutError | 操作超时 | 检查异步逻辑 |\n| ValidationError | 数据验证失败 | 检查输入格式 |\n\n### 分层排查\n\n```\n前端 ─── 网络 ─── 后端 ─── 数据库 ─── 外部服务\n  ↓       ↓       ↓        ↓          ↓\n Console  Network  Logs    Query      API Logs\n```\n\n---\n\n## 2. Frontend Debugging\n\n### Console 技巧\n\n```typescript\n\u002F\u002F 基础\nconsole.log('value:', value)\n\n\u002F\u002F 表格 (数组\u002F对象)\nconsole.table(users)\n\n\u002F\u002F 分组\nconsole.group('API Request')\nconsole.log('URL:', url)\nconsole.log('Payload:', payload)\nconsole.groupEnd()\n\n\u002F\u002F 计时\nconsole.time('fetch')\nawait fetch(url)\nconsole.timeEnd('fetch')\n\n\u002F\u002F 条件断点\nif (user.id === 'problem-id') {\n  debugger\n}\n```\n\n### React DevTools\n\n```\n1. Components 面板 → 检查 props\u002Fstate\n2. Profiler 面板 → 检查重渲染\n3. 搜索组件名快速定位\n```\n\n### 常见前端问题\n\n| 症状 | 可能原因 | 解决方案 |\n|------|----------|----------|\n| 白屏 | JS 错误阻断渲染 | 检查 Console 错误 |\n| 不更新 | State 引用未变 | 确保返回新对象 |\n| 闪烁 | 条件渲染逻辑错误 | 添加 loading 状态 |\n| 无限循环 | useEffect 依赖错误 | 检查依赖数组 |\n| 内存泄漏 | 未清理订阅\u002F定时器 | 添加 cleanup |\n\n### React 常见坑\n\n```typescript\n\u002F\u002F ❌ 无限循环\nuseEffect(() => {\n  setData(fetchData()) \u002F\u002F 触发重渲染，又触发 effect\n})\n\n\u002F\u002F ✅ 正确\nuseEffect(() => {\n  fetchData().then(setData)\n}, []) \u002F\u002F 空依赖\n\n\u002F\u002F ❌ State 不更新\nconst [items, setItems] = useState([])\nitems.push(newItem) \u002F\u002F 直接修改\nsetItems(items) \u002F\u002F 引用没变，不更新\n\n\u002F\u002F ✅ 正确\nsetItems([...items, newItem])\n```\n\n---\n\n## 3. Network Debugging\n\n### 检查请求\n\n```\nDevTools → Network 面板\n1. 请求是否发出？\n2. URL 是否正确？\n3. Headers 是否正确？(Authorization, Content-Type)\n4. Payload 是否正确？\n5. 响应状态码？\n6. 响应内容？\n```\n\n### 常见网络问题\n\n| 状态码 | 可能原因 | 排查方向 |\n|--------|----------|----------|\n| 400 | 请求格式错误 | 检查请求体 |\n| 401 | 认证失败 | 检查 token |\n| 403 | 权限不足 | 检查用户权限 |\n| 404 | 路径错误 | 检查 URL |\n| 405 | 方法错误 | 检查 HTTP 方法 |\n| 500 | 服务端错误 | 查看服务端日志 |\n| 502\u002F503 | 服务不可用 | 检查部署状态 |\n\n### CORS 问题\n\n```\n错误: Access-Control-Allow-Origin\n\n排查:\n1. 服务端是否设置 CORS headers？\n2. 预检请求 (OPTIONS) 是否正确响应？\n3. 是否使用了不允许的 header？\n```\n\n---\n\n## 4. AI API Debugging\n\n### 常见 AI 错误\n\n| 错误 | 原因 | 解决方案 |\n|------|------|----------|\n| 401 Invalid API Key | 密钥错误\u002F过期 | 检查环境变量 |\n| 429 Rate Limited | 请求过快 | 添加重试\u002F限流 |\n| 400 Token Limit | 上下文过长 | 截断\u002F分块 |\n| 500 Server Error | OpenAI 服务问题 | 添加 fallback |\n| Timeout | 响应时间过长 | 增加超时\u002F用流式 |\n\n### 排查步骤\n\n```typescript\n\u002F\u002F 1. 检查 API 密钥\nconsole.log('API Key exists:', !!process.env.OPENAI_API_KEY)\nconsole.log('API Key prefix:', process.env.OPENAI_API_KEY?.slice(0, 7))\n\n\u002F\u002F 2. 检查请求参数\nconsole.log('Messages count:', messages.length)\nconsole.log('Token estimate:', estimateTokens(messages))\n\n\u002F\u002F 3. 检查响应\ntry {\n  const response = await openai.chat.completions.create({...})\n  console.log('Usage:', response.usage)\n} catch (error) {\n  console.error('Error type:', error.constructor.name)\n  console.error('Error message:', error.message)\n  console.error('Error code:', error.code)\n}\n```\n\n### Token 超限处理\n\n```typescript\n\u002F\u002F 估算 token 数\nfunction estimateTokens(text: string): number {\n  return Math.ceil(text.length \u002F 4) \u002F\u002F 粗略估算\n}\n\n\u002F\u002F 截断策略\nfunction truncateMessages(messages: Message[], maxTokens: number): Message[] {\n  let total = 0\n  const result: Message[] = []\n  \n  \u002F\u002F 从最新消息往前保留\n  for (let i = messages.length - 1; i >= 0; i--) {\n    const tokens = estimateTokens(messages[i].content)\n    if (total + tokens > maxTokens) break\n    result.unshift(messages[i])\n    total += tokens\n  }\n  \n  return result\n}\n```\n\n---\n\n## 5. Web3 Debugging\n\n### 常见 Web3 错误\n\n| 错误 | 原因 | 解决方案 |\n|------|------|----------|\n| User rejected | 用户拒绝签名 | 添加用户提示 |\n| Insufficient funds | 余额不足 | 检查余额+Gas |\n| Nonce too low | Nonce 冲突 | 等待或加速前一笔 |\n| Gas estimation failed | 交易会失败 | 检查参数\u002F权限 |\n| Network mismatch | 网络不匹配 | 提示切换网络 |\n\n### 交易排查\n\n```typescript\n\u002F\u002F 1. 检查钱包状态\nconsole.log('Connected:', isConnected)\nconsole.log('Address:', address)\nconsole.log('Chain ID:', chainId)\n\n\u002F\u002F 2. 检查余额\nconst balance = await publicClient.getBalance({ address })\nconsole.log('Balance:', formatEther(balance))\n\n\u002F\u002F 3. 模拟交易\ntry {\n  await publicClient.simulateContract({\n    address: contractAddress,\n    abi,\n    functionName: 'transfer',\n    args: [to, amount],\n  })\n  console.log('Simulation passed')\n} catch (error) {\n  console.error('Simulation failed:', error.message)\n}\n\n\u002F\u002F 4. 检查 Gas\nconst gasEstimate = await publicClient.estimateContractGas({...})\nconsole.log('Gas estimate:', gasEstimate)\n```\n\n### 交易追踪\n\n```typescript\n\u002F\u002F 使用 Etherscan API 查询交易状态\nconst txStatus = await fetch(\n  `https:\u002F\u002Fapi.etherscan.io\u002Fapi?module=transaction&action=gettxreceiptstatus&txhash=${hash}`\n)\n\n\u002F\u002F 或使用 viem\nconst receipt = await publicClient.waitForTransactionReceipt({ hash })\nconsole.log('Status:', receipt.status) \u002F\u002F 'success' | 'reverted'\nconsole.log('Gas used:', receipt.gasUsed)\n```\n\n---\n\n## 6. Backend Debugging\n\n### 日志级别\n\n```typescript\n\u002F\u002F lib\u002Flogger.ts\nconst logger = {\n  debug: (msg: string, data?: object) => {\n    if (process.env.LOG_LEVEL === 'debug') {\n      console.log(`[DEBUG] ${msg}`, data)\n    }\n  },\n  info: (msg: string, data?: object) => {\n    console.log(`[INFO] ${msg}`, data)\n  },\n  warn: (msg: string, data?: object) => {\n    console.warn(`[WARN] ${msg}`, data)\n  },\n  error: (msg: string, error?: Error) => {\n    console.error(`[ERROR] ${msg}`, {\n      message: error?.message,\n      stack: error?.stack,\n    })\n  },\n}\n```\n\n### 请求追踪\n\n```typescript\n\u002F\u002F middleware.ts\nexport function middleware(request: NextRequest) {\n  const requestId = crypto.randomUUID()\n  \n  console.log(`[${requestId}] ${request.method} ${request.url}`)\n  \n  const response = NextResponse.next()\n  response.headers.set('x-request-id', requestId)\n  \n  return response\n}\n```\n\n### 数据库调试\n\n```typescript\n\u002F\u002F Prisma 查询日志\nconst prisma = new PrismaClient({\n  log: ['query', 'error', 'warn'],\n})\n\n\u002F\u002F 检查慢查询\nprisma.$on('query', (e) => {\n  if (e.duration > 100) {\n    console.warn(`Slow query (${e.duration}ms):`, e.query)\n  }\n})\n```\n\n---\n\n## 7. Debugging Checklist\n\n### 通用排查清单\n\n```markdown\n## 问题排查清单\n\n### 1. 信息收集\n- [ ] 错误信息是什么？\n- [ ] 哪个页面\u002F功能出问题？\n- [ ] 何时开始出现？\n- [ ] 能否稳定复现？\n\n### 2. 环境检查\n- [ ] 本地还是生产环境？\n- [ ] 特定浏览器\u002F设备？\n- [ ] 环境变量正确？\n- [ ] 依赖版本正确？\n\n### 3. 日志检查\n- [ ] Console 有错误吗？\n- [ ] Network 请求正常吗？\n- [ ] 服务端日志有什么？\n\n### 4. 代码检查\n- [ ] 最近有什么改动？\n- [ ] 是否引入了新依赖？\n- [ ] 相关代码逻辑正确吗？\n\n### 5. 隔离测试\n- [ ] 最小复现用例\n- [ ] 硬编码测试数据\n- [ ] 逐步注释排除\n```\n\n---\n\n## Quick Reference\n\n### 调试工具\n\n```\n前端: Chrome DevTools, React DevTools\n网络: Network 面板, Postman\n后端: console.log, debugger, Prisma Studio\nWeb3: Etherscan, Tenderly\nAI: OpenAI Playground\n```\n\n### 常用命令\n\n```bash\n# 查看日志\ntail -f app.log\n\n# 环境变量检查\nprintenv | grep API\n\n# 端口占用\nlsof -i :3000\n\n# 进程查看\nps aux | grep node\n```\n\n### 二分法模板\n\n```\n1. 问题出现在 A 还是 B？\n   → 确认是 A\n2. 问题出现在 A1 还是 A2？\n   → 确认是 A2\n3. 问题出现在 A2a 还是 A2b？\n   → 找到根因\n```\n","# Debugger (问题诊断师)\n\n**Goal**: 系统化排查问题，快速定位根因，提供修复方案。\n\n**原则**: 不要猜，要验证。\n\n---\n\n## Debugging Mindset\n\n```\n问题 → 复现 → 隔离 → 定位 → 修复 → 验证\n```\n\n### 排查黄金法则\n\n1. **先复现**: 不能稳定复现的问题不要急着修\n2. **二分法**: 缩小范围，逐步排除\n3. **看日志**: 错误信息是最好的线索\n4. **最小化**: 创建最小复现用例\n5. **记录**: 记录排查过程，避免重复尝试\n\n---\n\n## 1. Error Classification\n\n### 错误类型速查\n\n| 错误类型 | 常见原因 | 排查方向 |\n|----------|----------|----------|\n| TypeError | null\u002Fundefined 访问 | 检查数据流 |\n| SyntaxError | 代码语法错误 | 检查引号、括号 |\n| ReferenceError | 变量未定义 | 检查作用域、导入 |\n| NetworkError | 网络\u002FAPI 问题 | 检查请求、响应 |\n| TimeoutError | 操作超时 | 检查异步逻辑 |\n| ValidationError | 数据验证失败 | 检查输入格式 |\n\n### 分层排查\n\n```\n前端 ─── 网络 ─── 后端 ─── 数据库 ─── 外部服务\n  ↓       ↓       ↓        ↓          ↓\n Console  Network  Logs    Query      API Logs\n```\n\n---\n\n## 2. Frontend Debugging\n\n### Console 技巧\n\n```typescript\n\u002F\u002F 基础\nconsole.log('value:', value)\n\n\u002F\u002F 表格 (数组\u002F对象)\nconsole.table(users)\n\n\u002F\u002F 分组\nconsole.group('API Request')\nconsole.log('URL:', url)\nconsole.log('Payload:', payload)\nconsole.groupEnd()\n\n\u002F\u002F 计时\nconsole.time('fetch')\nawait fetch(url)\nconsole.timeEnd('fetch')\n\n\u002F\u002F 条件断点\nif (user.id === 'problem-id') {\n  debugger\n}\n```\n\n### React DevTools\n\n```\n1. Components 面板 → 检查 props\u002Fstate\n2. Profiler 面板 → 检查重渲染\n3. 搜索组件名快速定位\n```\n\n### 常见前端问题\n\n| 症状 | 可能原因 | 解决方案 |\n|------|----------|----------|\n| 白屏 | JS 错误阻断渲染 | 检查 Console 错误 |\n| 不更新 | State 引用未变 | 确保返回新对象 |\n| 闪烁 | 条件渲染逻辑错误 | 添加 loading 状态 |\n| 无限循环 | useEffect 依赖错误 | 检查依赖数组 |\n| 内存泄漏 | 未清理订阅\u002F定时器 | 添加 cleanup |\n\n### React 常见坑\n\n```typescript\n\u002F\u002F ❌ 无限循环\nuseEffect(() => {\n  setData(fetchData()) \u002F\u002F 触发重渲染，又触发 effect\n})\n\n\u002F\u002F ✅ 正确\nuseEffect(() => {\n  fetchData().then(setData)\n}, []) \u002F\u002F 空依赖\n\n\u002F\u002F ❌ State 不更新\nconst [items, setItems] = useState([])\nitems.push(newItem) \u002F\u002F 直接修改\nsetItems(items) \u002F\u002F 引用没变，不更新\n\n\u002F\u002F ✅ 正确\nsetItems([...items, newItem])\n```\n\n---\n\n## 3. Network Debugging\n\n### 检查请求\n\n```\nDevTools → Network 面板\n1. 请求是否发出？\n2. URL 是否正确？\n3. Headers 是否正确？(Authorization, Content-Type)\n4. Payload 是否正确？\n5. 响应状态码？\n6. 响应内容？\n```\n\n### 常见网络问题\n\n| 状态码 | 可能原因 | 排查方向 |\n|--------|----------|----------|\n| 400 | 请求格式错误 | 检查请求体 |\n| 401 | 认证失败 | 检查 token |\n| 403 | 权限不足 | 检查用户权限 |\n| 404 | 路径错误 | 检查 URL |\n| 405 | 方法错误 | 检查 HTTP 方法 |\n| 500 | 服务端错误 | 查看服务端日志 |\n| 502\u002F503 | 服务不可用 | 检查部署状态 |\n\n### CORS 问题\n\n```\n错误: Access-Control-Allow-Origin\n\n排查:\n1. 服务端是否设置 CORS headers？\n2. 预检请求 (OPTIONS) 是否正确响应？\n3. 是否使用了不允许的 header？\n```\n\n---\n\n## 4. AI API Debugging\n\n### 常见 AI 错误\n\n| 错误 | 原因 | 解决方案 |\n|------|------|----------|\n| 401 Invalid API Key | 密钥错误\u002F过期 | 检查环境变量 |\n| 429 Rate Limited | 请求过快 | 添加重试\u002F限流 |\n| 400 Token Limit | 上下文过长 | 截断\u002F分块 |\n| 500 Server Error | OpenAI 服务问题 | 添加 fallback |\n| Timeout | 响应时间过长 | 增加超时\u002F用流式 |\n\n### 排查步骤\n\n```typescript\n\u002F\u002F 1. 检查 API 密钥\nconsole.log('API Key exists:', !!process.env.OPENAI_API_KEY)\nconsole.log('API Key prefix:', process.env.OPENAI_API_KEY?.slice(0, 7))\n\n\u002F\u002F 2. 检查请求参数\nconsole.log('Messages count:', messages.length)\nconsole.log('Token estimate:', estimateTokens(messages))\n\n\u002F\u002F 3. 检查响应\ntry {\n  const response = await openai.chat.completions.create({...})\n  console.log('Usage:', response.usage)\n} catch (error) {\n  console.error('Error type:', error.constructor.name)\n  console.error('Error message:', error.message)\n  console.error('Error code:', error.code)\n}\n```\n\n### Token 超限处理\n\n```typescript\n\u002F\u002F 估算 token 数\nfunction estimateTokens(text: string): number {\n  return Math.ceil(text.length \u002F 4) \u002F\u002F 粗略估算\n}\n\n\u002F\u002F 截断策略\nfunction truncateMessages(messages: Message[], maxTokens: number): Message[] {\n  let total = 0\n  const result: Message[] = []\n  \n  \u002F\u002F 从最新消息往前保留\n  for (let i = messages.length - 1; i >= 0; i--) {\n    const tokens = estimateTokens(messages[i].content)\n    if (total + tokens > maxTokens) break\n    result.unshift(messages[i])\n    total += tokens\n  }\n  \n  return result\n}\n```\n\n---\n\n## 5. Web3 Debugging\n\n### 常见 Web3 错误\n\n| 错误 | 原因 | 解决方案 |\n|------|------|----------|\n| User rejected | 用户拒绝签名 | 添加用户提示 |\n| Insufficient funds | 余额不足 | 检查余额+Gas |\n| Nonce too low | Nonce 冲突 | 等待或加速前一笔 |\n| Gas estimation failed | 交易会失败 | 检查参数\u002F权限 |\n| Network mismatch | 网络不匹配 | 提示切换网络 |\n\n### 交易排查\n\n```typescript\n\u002F\u002F 1. 检查钱包状态\nconsole.log('Connected:', isConnected)\nconsole.log('Address:', address)\nconsole.log('Chain ID:', chainId)\n\n\u002F\u002F 2. 检查余额\nconst balance = await publicClient.getBalance({ address })\nconsole.log('Balance:', formatEther(balance))\n\n\u002F\u002F 3. 模拟交易\ntry {\n  await publicClient.simulateContract({\n    address: contractAddress,\n    abi,\n    functionName: 'transfer',\n    args: [to, amount],\n  })\n  console.log('Simulation passed')\n} catch (error) {\n  console.error('Simulation failed:', error.message)\n}\n\n\u002F\u002F 4. 检查 Gas\nconst gasEstimate = await publicClient.estimateContractGas({...})\nconsole.log('Gas estimate:', gasEstimate)\n```\n\n### 交易追踪\n\n```typescript\n\u002F\u002F 使用 Etherscan API 查询交易状态\nconst txStatus = await fetch(\n  `https:\u002F\u002Fapi.etherscan.io\u002Fapi?module=transaction&action=gettxreceiptstatus&txhash=${hash}`\n)\n\n\u002F\u002F 或使用 viem\nconst receipt = await publicClient.waitForTransactionReceipt({ hash })\nconsole.log('Status:', receipt.status) \u002F\u002F 'success' | 'reverted'\nconsole.log('Gas used:', receipt.gasUsed)\n```\n\n---\n\n## 6. Backend Debugging\n\n### 日志级别\n\n```typescript\n\u002F\u002F lib\u002Flogger.ts\nconst logger = {\n  debug: (msg: string, data?: object) => {\n    if (process.env.LOG_LEVEL === 'debug') {\n      console.log(`[DEBUG] ${msg}`, data)\n    }\n  },\n  info: (msg: string, data?: object) => {\n    console.log(`[INFO] ${msg}`, data)\n  },\n  warn: (msg: string, data?: object) => {\n    console.warn(`[WARN] ${msg}`, data)\n  },\n  error: (msg: string, error?: Error) => {\n    console.error(`[ERROR] ${msg}`, {\n      message: error?.message,\n      stack: error?.stack,\n    })\n  },\n}\n```\n\n### 请求追踪\n\n```typescript\n\u002F\u002F middleware.ts\nexport function middleware(request: NextRequest) {\n  const requestId = crypto.randomUUID()\n  \n  console.log(`[${requestId}] ${request.method} ${request.url}`)\n  \n  const response = NextResponse.next()\n  response.headers.set('x-request-id', requestId)\n  \n  return response\n}\n```\n\n### 数据库调试\n\n```typescript\n\u002F\u002F Prisma 查询日志\nconst prisma = new PrismaClient({\n  log: ['query', 'error', 'warn'],\n})\n\n\u002F\u002F 检查慢查询\nprisma.$on('query', (e) => {\n  if (e.duration > 100) {\n    console.warn(`Slow query (${e.duration}ms):`, e.query)\n  }\n})\n```\n\n---\n\n## 7. Debugging Checklist\n\n### 通用排查清单\n\n```markdown\n## 问题排查清单\n\n### 1. 信息收集\n- [ ] 错误信息是什么？\n- [ ] 哪个页面\u002F功能出问题？\n- [ ] 何时开始出现？\n- [ ] 能否稳定复现？\n\n### 2. 环境检查\n- [ ] 本地还是生产环境？\n- [ ] 特定浏览器\u002F设备？\n- [ ] 环境变量正确？\n- [ ] 依赖版本正确？\n\n### 3. 日志检查\n- [ ] Console 有错误吗？\n- [ ] Network 请求正常吗？\n- [ ] 服务端日志有什么？\n\n### 4. 代码检查\n- [ ] 最近有什么改动？\n- [ ] 是否引入了新依赖？\n- [ ] 相关代码逻辑正确吗？\n\n### 5. 隔离测试\n- [ ] 最小复现用例\n- [ ] 硬编码测试数据\n- [ ] 逐步注释排除\n```\n\n---\n\n## Quick Reference\n\n### 调试工具\n\n```\n前端: Chrome DevTools, React DevTools\n网络: Network 面板, Postman\n后端: console.log, debugger, Prisma Studio\nWeb3: Etherscan, Tenderly\nAI: OpenAI Playground\n```\n\n### 常用命令\n\n```bash\n# 查看日志\ntail -f app.log\n\n# 环境变量检查\nprintenv | grep API\n\n# 端口占用\nlsof -i :3000\n\n# 进程查看\nps aux | grep node\n```\n\n### 二分法模板\n\n```\n1. 问题出现在 A 还是 B？\n   → 确认是 A\n2. 问题出现在 A1 还是 A2？\n   → 确认是 A2\n3. 问题出现在 A2a 还是 A2b？\n   → 找到根因\n```\n",{"name":5,"description":7},"main","4a618da5d2528627c4728e9aab7d602f9d00b649","genes\u002Fdebugger",1,"https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground","https:\u002F\u002Fgithub.com\u002Frotifer-protocol","https:\u002F\u002Frotifer.dev","Open-source evolution framework for AI agents","2026-11-12 13:46:27",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add rotifer-protocol\u002Frotifer-playground --skill debugger",{"tool":59,"command":60},"bunx","bunx skills add rotifer-protocol\u002Frotifer-playground --skill debugger",{"tool":62,"command":63},"pnpm","pnpm dlx skills add rotifer-protocol\u002Frotifer-playground --skill debugger","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground\u002Fblob\u002Fmain\u002Fgenes\u002Fdebugger\u002FSKILL.md",true,[67,73,77,83],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},".cloud-manifest.json","REFERENCE","参考文档",156,"https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground\u002Fblob\u002Fmain\u002Fgenes\u002Fdebugger\u002F.cloud-manifest.json",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},".gene-manifest.json",253,"https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground\u002Fblob\u002Fmain\u002Fgenes\u002Fdebugger\u002F.gene-manifest.json",{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"index.ts","SCRIPT","脚本",6534,"https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground\u002Fblob\u002Fmain\u002Fgenes\u002Fdebugger\u002Findex.ts",{"path":84,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":85,"sourceHtmlUrl":86},"phenotype.json",2290,"https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground\u002Fblob\u002Fmain\u002Fgenes\u002Fdebugger\u002Fphenotype.json",[88,101,128,152,172,191],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":39},"01M6H8FTYPK400JGQDW57GM49R","fixture-skill","A synthetic ClawHub skill for wrap --from-clawhub tests","https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fclawhub\u002Ffixture-skill\u002FSKILL.md",[],[95,96,97,98,99,21,100],"fixture","fixture skill","wrap","tests","clawhub","synthetic",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":39},"01M6H8FPX91FF5FH8PPEW7HQSZ","rotifer-self-evolving-agent","Rank an Agent's Rotifer Genes against the Arena and swap in stronger ones, and create and run the local Agents built from those Genes. Invoked explicitly via \u002Fevolve — scan local capabilities, compare Genes, inspect fitness scores, replace weak ones with user approval (each replacement can be rolled back), write an Agent definition into the project (\u002Fevolve create-agent), and execute a local Agent's Genes in the WASM sandbox (\u002Fevolve run-agent). Not for capabilities outside Rotifer.","https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground\u002Fblob\u002Fmain\u002Fskills\u002Frotifer-self-evolving-agent\u002FSKILL.md",[],[108,109,110,111,112,113,114,115,116,117,118,119,120,121,21,122,56,123,124,125,126,127],"rotifer self evolving agent","self","self evolving","inspect","local","MCP","access","capabilities","server","run","gene","evolve","network","arena","scan","compare","swap","with","mcp-server","fitness",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":39},"01M6H8FGNKE933Q2JAAB7JY43V","rotifer-guide","Entry point for Rotifer Protocol. Onboards a user to Rotifer Genes, scaffolds a Gene from a description, diagnoses a Gene's F(g) score or compile failure, searches the Rotifer Gene registry, upgrades a Gene's fidelity from Wrapped to Native, and submits a Gene to the Arena and follows its ranking. It works by proposing `rotifer` CLI commands; the ones that install software, send work to Rotifer's servers, publish a Gene or overwrite files wait for the user's approval. Meant to be invoked explicitly when working with Rotifer, or when unsure which Rotifer capability fits. Its scope is Rotifer Genes and the Rotifer CLI; onboarding, tutorials, troubleshooting or search for anything else are outside it.","https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground\u002Fblob\u002Fmain\u002Fskills\u002Frotifer-guide\u002FSKILL.md",[],[135,136,137,138,139,140,141,118,142,143,21,144,145,27,125,146,29,147,148,149,20,150,151],"rotifer guide","guide","which","scaffolding","search","cli","native","registry","do","compile","general","protocol","onboarding","rotifer gene","invoke","capability","point",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":39},"01M6H8FBXGQM2RH27G0S6XMQ34","rotifer-gene","The Gene manual for Rotifer Protocol — write a Gene's express function and phenotype schema, run the four-layer security audit before publishing, and migrate a Gene's fidelity from Wrapped to Hybrid or Native. Invoke explicitly when building, auditing, or upgrading a Rotifer Gene. Do NOT use for general code review, dependency auditing, or framework migration — every procedure here operates on Rotifer Genes, their phenotype schemas, and the Rotifer CLI, and nothing else.","https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground\u002Fblob\u002Fmain\u002Fskills\u002Frotifer-gene\u002FSKILL.md",[],[148,118,143,121,159,21,160,161,145,162,163,164,56,27,114,165,166,167,168,169,170,171,149,20],"security audit","code review","manual","publishing","yes","schema","version","migrate","code","express","review","hybrid","submission",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":39},"01M6H8F7DZPN54N2AQC32BWEKV","rotifer-arena","Benchmark Rotifer Genes against each other in the Arena — import from ClawHub \u002F local \u002F scratch, compile, match opponents, run Arena evaluation, and produce a Markdown report with F(g) fitness and V(g) security grades. Invoke explicitly to compare or benchmark Rotifer Genes. Do NOT use for general benchmarking, load testing, or comparing anything that is not a Rotifer Gene or Agent.","https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground\u002Fblob\u002Fmain\u002Fskills\u002Frotifer-arena\u002FSKILL.md",[],[179,121,143,180,21,144,181,112,145,99,182,27,183,123,125,184,185,186,117,118,148,149,187,188,127,189,190],"rotifer arena","import","testing","produce","load","benchmarking","load testing","markdown","Evaluation","benchmark","security","scratch",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":195,"categories":196,"keywords":197,"publishedAt":39},"01M6H8F0WWXMTDWXQMQYC3PGPW","rotifer-agent","Build a Rotifer Agent from Genes — decompose intent into capability units, pick Genes by Arena F(g), compose a Rotifer Genome, create the Agent and test it. Use when the user is working with Rotifer specifically: \"Rotifer Agent\", \"compose Genes\", \"Rotifer Genome\", \"Gene composition\", \"rotifer agent create\". Do NOT use for general agent frameworks, or when the words Seq \u002F Par \u002F Cond \u002F Try appear as ordinary programming terms — in Rotifer those name Genome composition strategies, and this Skill applies only when the user is composing Rotifer Genes.","https:\u002F\u002Fgithub.com\u002Frotifer-protocol\u002Frotifer-playground\u002Fblob\u002Fmain\u002Fskills\u002Frotifer-agent\u002FSKILL.md",[],[198,199,200,201,202,203,204,118,205,206,207,143,121,208,21,209,145,27,210,125,20,211,150],"rotifer agent","Composition","pick","only","create","strategies","intent","seq","decompose","as","compose","frameworks","programming","agent frameworks"]