Agent skill

Debug Troubleshoot

by mobazha in mobazha/mobazha-unified

Troubleshooting handbook for common issues in Mobazha development including build errors, Matrix connection issues, wallet problems, and performance debugging.

MPL-2.0Auto-check passedDevelopment

Install Debug Troubleshoot

skills CLI
$ npx skills add mobazha/mobazha-unified --skill debug-troubleshoot -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mobazha/mobazha-unified debug-troubleshoot --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mobazha/mobazha-unified.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/debug-troubleshoot .claude/skills/debug-troubleshoot && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
debug-troubleshoot
GitHub stars
165
Token cost
~1.4k tokens
SKILL.md length
107 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
MPL-2.0

At a glance

Troubleshooting handbook for common issues in Mobazha development including build errors, Matrix connection issues, wallet problems, and performance debugging.

  • Works in 3 steps: 检查用户是否已登录(Matrix 初始化依赖 peerID) → 检查浏览器控制台的 [MatrixChat] 标签日志 → 检查 _getServerConfig() 返回值
  • Troubleshooting issues
  • SKILL.md covers 一、构建与开发环境, 二、Matrix 聊天问题, 三、钱包与交易问题 and 四、性能问题, plus 4 more sections
  • Calls pnpm, rg and git; needs M_UNKNOWN_TOKEN

What it does

Debug Troubleshoot is an agent skill from mobazha/mobazha-unified. Troubleshooting handbook for common issues in Mobazha development including build errors, Matrix connection issues, wallet problems, and performance debugging. Use when debugging, fixing errors, or troubleshooting issues, "调试", "排障", "排查", "报错", "修复", "debug", "为什么不工作".

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Debugging. The repository describes itself as: Open-source commerce frontend for storefronts, marketplaces, checkout, and seller management. The licence is MPL-2.0.

When your agent uses it

  • Troubleshooting issues
  • Tasks that involve Debugging

Example prompts

  • “为什么不工作”
  • “/debug-troubleshoot”

Requirements

  • A credential in M_UNKNOWN_TOKEN

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 检查用户是否已登录(Matrix 初始化依赖 peerID)
  2. 检查浏览器控制台的 [MatrixChat] 标签日志
  3. 检查 _getServerConfig() 返回值

What it can do on your machine

Read from SKILL.md and the folder at commit 156c699. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • rg
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • M_UNKNOWN_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Debug Troubleshoot loads about 1.4k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 107 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mobazha/mobazha-unified at commit 156c699, republished under its MPL-2.0 licence (© mobazha). 107 words, ~1,376 tokens.

Download SKILL.mdSave it as .claude/skills/debug-troubleshoot/SKILL.md (or your agent's skills folder).
name
debug-troubleshoot
description
Troubleshooting handbook for common issues in Mobazha development including build errors, Matrix connection issues, wallet problems, and performance debugging. Use when debugging, fixing errors, or troubleshooting issues, "调试", "排障", "排查", "报错", "修复", "debug", "为什么不工作".

调试与排障手册

Mobazha 项目常见问题的排查流程和解决方案。

一、构建与开发环境

Next.js 缓存问题

症状:模块导出错误,但文件确实存在

bash
# 解决方案:清除 .next 缓存
cd apps/web && rm -rf .next && pnpm dev
Core 包修改后 Web 不生效

症状:修改了 packages/core 的代码,但 web 没有反映

bash
# 解决方案:重新构建 core 包
pnpm --filter @mobazha/core build
# 然后重启 web 开发服务器
TypeScript 类型错误

排查步骤:

bash
# 1. 全局类型检查
pnpm typecheck

# 2. 单包检查
cd packages/core && pnpm exec tsc --noEmit

# 3. 如果是依赖类型问题
rm -rf node_modules/.cache
pnpm install
Turbo 缓存问题
bash
# 清除 turbo 缓存
rm -rf .turbo/cache
pnpm build
pnpm 依赖问题
bash
# 完全重装
rm -rf node_modules apps/*/node_modules packages/*/node_modules
pnpm install

二、Matrix 聊天问题

连接失败

排查步骤:

  1. 检查用户是否已登录(Matrix 初始化依赖 peerID)
  2. 检查浏览器控制台的 [MatrixChat] 标签日志
  3. 检查 _getServerConfig() 返回值
typescript
// 手动检查 Matrix 状态
const matrixService = getMatrixService();
console.log('Connected:', matrixService.isConnected());
console.log('Sync state:', matrixService.getSyncState());
消息解密失败

症状:消息显示为"无法解密"

排查步骤:
1. 检查 IndexedDB 中的加密数据
   DevTools → Application → IndexedDB → matrix-crypto-*

2. 如果数据损坏,清除并重新初始化
   MatrixService 会自动检测 WASM panic 并恢复
   手动清除:DevTools → Application → IndexedDB → 删除 matrix-crypto-* 数据库
Token 过期

症状:突然断线,日志中出现 M_UNKNOWN_TOKEN

原因:Access token 已过期 自动恢复:useMatrixInit 监听 AUTH_REQUIRED 事件,自动触发 token 刷新 手动排查:检查 localStorage 中的 Matrix 凭证

三、钱包与交易问题

钱包连接失败

排查步骤:

typescript
// 1. 检查是否安装了钱包扩展
if (!window.ethereum) {
  console.error('未检测到钱包扩展');
}

// 2. 检查 AppKit 状态
// DevTools → Console
console.log('AppKit connected:', appKit?.getIsConnected());
console.log('Chain ID:', appKit?.getCaipNetwork()?.id);

// 3. 检查网络是否在支持列表中
// 不支持的网络会自动断开(AppKitProvider 中的逻辑)
交易失败
错误代码含义解决方案
ACTION_REJECTED用户在钱包中拒绝提示用户重新确认
INSUFFICIENT_FUNDS余额不足提示充值,显示所需金额
UNPREDICTABLE_GAS_LIMITGas 估算失败检查合约参数是否正确
NETWORK_ERROR网络问题重试或切换 RPC
NONCE_EXPIREDNonce 冲突等待之前的交易确认
Escrow 问题
typescript
// 检查 Escrow 状态
const escrowInfo = await escrowService.getEscrowInfo(orderId);
console.log('Escrow state:', escrowInfo);

// 常见问题:
// 1. 合约地址不匹配 → 检查网络是否正确
// 2. 权限不足 → 检查调用者地址是否是参与方
// 3. 状态不允许 → 检查 Escrow 当前状态(如已释放不能再退款)

四、性能问题

页面渲染慢

排查步骤:

typescript
// 1. 使用 React DevTools Profiler
// 安装 React Developer Tools 扩展
// Components → Profiler → 录制

// 2. 检查不必要的重渲染
// React DevTools → Components → 勾选 "Highlight updates"

// 3. 使用项目内置的性能测量
import { performanceMonitor } from '@mobazha/core';

const result = performanceMonitor.measure('suspectedSlowOp', () => {
  return expensiveOperation();
});
内存泄漏

常见原因:

typescript
// 1. 事件监听未清理
useEffect(() => {
  const handler = () => {
    /* ... */
  };
  window.addEventListener('resize', handler);
  return () => window.removeEventListener('resize', handler); // ← 必须清理
}, []);

// 2. 定时器未清理
useEffect(() => {
  const timer = setInterval(() => {
    /* ... */
  }, 1000);
  return () => clearInterval(timer); // ← 必须清理
}, []);

// 3. Matrix 事件订阅未清理
useEffect(() => {
  const unsub = events.on(MatrixEvent.MESSAGE, handler);
  return () => unsub(); // ← 必须清理
}, []);
资源加载慢
排查步骤:
1. 分析 Bundle 大小
   在 next.config.js 中启用 @next/bundle-analyzer

2. 检查网络请求
   DevTools → Network → 排序 by Size/Time

3. 检查 Web Vitals
   项目自动收集,查看 performanceMonitor 输出

五、i18n 问题

翻译 key 不显示

排查步骤:

typescript
// 1. 检查 key 是否存在于当前语言包
import { getTranslation } from '@mobazha/core';
console.log(getTranslation('problematic.key')); // 如果返回 key 本身,说明缺失

// 2. 检查是否在 en.ts 中定义了
// rg "problematic" packages/core/i18n/locales/en.ts

// 3. 检查嵌套路径是否正确
// "order.status.completed" 需要 { order: { status: { completed: '...' } } }
硬编码文本检查
bash
# 查找可能的硬编码中文
rg "[\u4e00-\u9fff]" apps/web/src/ --include "*.tsx" --include "*.ts"

# 查找可能的硬编码英文(在 JSX 中)
rg ">[A-Z][a-z]+" apps/web/src/ --include "*.tsx"

六、Vite / Next.js 双模式问题

Vite 模式启动失败
bash
# 使用 Vite 模式
pnpm dev:vite

# 常见问题:路由不匹配
# 检查 vite-routes-sync Rule 确保路由同步
环境变量不生效
Next.js: 客户端变量必须以 NEXT_PUBLIC_ 开头
  process.env.NEXT_PUBLIC_API_URL

Vite: 客户端变量必须以 VITE_ 开头
  import.meta.env.VITE_API_URL

项目兼容方案:检查 vite-nextjs-compat Rule

七、快速诊断命令

bash
# 全面验证(lint + tsc + test + build)
pnpm validate

# 快速验证(lint + tsc)
pnpm validate:quick

# 查看最近的验证报告
pnpm report

# 检查 Git 状态
git status && git diff --stat

# 检查依赖问题
pnpm why <package-name>

# 清除所有缓存重新开始
rm -rf .next .turbo/cache node_modules/.cache && pnpm dev

排查流程图

问题出现
  ├── 构建/类型错误?
  │   → pnpm validate:quick
  │   → 清除缓存重试
  │
  ├── 运行时错误?
  │   → 检查浏览器 Console
  │   → 检查 ErrorBoundary 是否捕获
  │   → 检查 logger 输出
  │
  ├── 性能问题?
  │   → React Profiler
  │   → performanceMonitor.measure()
  │   → Network 面板
  │
  ├── 钱包/交易?
  │   → 检查钱包连接状态
  │   → 检查网络/链 ID
  │   → 检查 Gas 和余额
  │
  └── 聊天/消息?
      → 检查 Matrix 连接状态
      → 检查 [MatrixChat] 日志
      → 检查加密数据库

© mobazha, MPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/debug-troubleshoot of mobazha/mobazha-unified.

Open the folder on GitHubat commit 156c699

Compare with similar skills

Debug Troubleshoot next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Debug Troubleshoot compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Debug Troubleshoot this skillmobazha/mobazha-unified165—~1.4kAutomated safety check: PassMPL-2.0
Trellis Session Insightmindfold-ai/Trellis15k4 repos~1.7kAutomated safety check: PassAGPL-3.0
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Debugging Executionsn8n-io/n8n207k—~2.6kAutomated safety check: PassCustom licence
Aoti Debugpytorch/pytorch104k1 repos~1.7kAutomated safety check: PassCustom licence
Herdr Throwaway Reproductionherdrdev/herdr43k—~2.4kAutomated safety check: PassApache-2.0

Similar skills

  • Trellis Session Insight

    mindfold-ai/Trellis

    Reach into past AI conversation history through the trellis mem CLI.

    15k GitHub starsUsed in 4 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes
  • Official

    Debug failed or wrong-output workflow executions using executions tools.

    207k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Aoti Debug

    pytorch/pytorch

    Debug AOTInductor (AOTI) errors and crashes. An agent skill from pytorch/pytorch.

    104k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed
  • Runs a disposable, uniquely named Herdr session inside an existing one so runtime, pane, terminal or API bugs can be reproduced without touching the main session.

    43k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Systematic Debugging

    ultralisp/ultralisp

    A skill your agent uses when encountering any bug, test failure, or unexpected behavior, before proposing fixes

    258 GitHub starsUsed in 51 repos~2.4k tokens
    DevelopmentAuto-check passed

More from mobazha/mobazha-unified

All 29 skills in this repo
  • A11y Guide

    mobazha/mobazha-unified

    Accessibility guide for Mobazha following WCAG 2.1 AA standards including color contrast, reduced motion, ARIA patterns, keyboard navigation, focus management, and screen reader testing.

    165 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check passed
  • API Reference

    mobazha/mobazha-unified

    Look up Mobazha backend API endpoints, request/response formats, and field mappings.

    165 GitHub stars~1.7k tokensUpdated 4 days ago
    Auto-check passed
  • Code Review

    mobazha/mobazha-unified

    Review code for quality, architecture consistency, and adherence to Mobazha project standards using confidence-based filtering.

    165 GitHub stars~464 tokensUpdated 4 days ago
    Auto-check passed
  • Code Simplifier

    mobazha/mobazha-unified

    Simplify and refine recently written code for clarity, consistency, and maintainability while preserving all functionality.

    165 GitHub stars~601 tokensUpdated 4 days ago
    Auto-check passed
  • Commit Helper

    mobazha/mobazha-unified

    Generate commit messages and run pre-commit validation following Mobazha conventions.

    165 GitHub stars~735 tokensUpdated 4 days ago
    Auto-check passed
  • Component Dev

    mobazha/mobazha-unified

    Create and modify UI components following Mobazha conventions including directory structure, spacing standards, accessibility, and testing.

    165 GitHub stars~638 tokensUpdated 4 days ago
    Auto-check passed

Categories

Questions about Debug Troubleshoot

What does Debug Troubleshoot do?

Troubleshooting handbook for common issues in Mobazha development including build errors, Matrix connection issues, wallet problems, and performance debugging. Debug Troubleshoot is an agent skill from mobazha/mobazha-unified. Troubleshooting handbook for common issues in Mobazha development including build errors, Matrix connection issues, wallet problems, and performance debugging.

When should I use Debug Troubleshoot?

Debug Troubleshoot fits situations like: troubleshooting issues; tasks that involve Debugging.

How do I install Debug Troubleshoot in Claude Code?

Run `npx skills add mobazha/mobazha-unified --skill debug-troubleshoot -a claude-code`. Or copy the skill folder (.cursor/skills/debug-troubleshoot in mobazha/mobazha-unified) into .claude/skills/debug-troubleshoot in your project. Claude Code loads it when a task matches its description.

How do I install Debug Troubleshoot in Codex?

Run `npx skills add mobazha/mobazha-unified --skill debug-troubleshoot -a codex`. Or copy the skill folder (.cursor/skills/debug-troubleshoot in mobazha/mobazha-unified) into .agents/skills/debug-troubleshoot in your project. Codex loads it when a task matches its description.

Can I use Debug Troubleshoot in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mobazha/mobazha-unified --skill debug-troubleshoot -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/debug-troubleshoot, .gemini/skills/debug-troubleshoot, .github/skills/debug-troubleshoot and .opencode/skills/debug-troubleshoot in your project.

What does Debug Troubleshoot need to run?

Going by SKILL.md and its folder, Debug Troubleshoot needs the command-line tools its instructions call (pnpm, rg and git) and credentials named M_UNKNOWN_TOKEN. Our summary lists: A credential in M_UNKNOWN_TOKEN.

Does Debug Troubleshoot access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Debug Troubleshoot safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Debug Troubleshoot use?

Debug Troubleshoot is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Debug Troubleshoot use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Debug Troubleshoot?

Skills that share tags, products or a category with Debug Troubleshoot: Trellis Session Insight (mindfold-ai/Trellis, 15k stars), Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Debugging Executions (n8n-io/n8n, 207k stars) and Aoti Debug (pytorch/pytorch, 104k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Debug Troubleshoot?

mobazha (a GitHub organization) maintains it in mobazha/mobazha-unified, which has 165 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 3, 2026.

Source: mobazha/mobazha-unified on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.