jhillock

Discord Doctor

運維安全v1.0.0
作者:jhillock更新於 2026-05-11discord-doctor@clawhub_jhillock/discord-doctor
安全掃描故障排查#Discord

據 AlphaMoat 統計,截至 2026-09,Discord Doctor 累計下載 3,255 次、獲 1 個星標,在全部 5,078 個 AI 技能中排名第 3,505 位,在「運維安全」分類(264 個)中排名第 226 位。

累計安裝
103
累計下載
3255
星標
1
全站排名
#3,505
全站前 70% · 「運維安全」前 86%
平台累計安裝累計下載星標評論
ClawHub ↗10331061-
SkillHub ↗10332551—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

它說明可檢查應用與服務狀態、連線情況、令牌有效性和近期活動;--fix 模式還可能安裝依賴、啟動或重啟服務、刪除舊 launchd 項或移動配置目錄。自動修復可能改變系統狀態或影響服務,執行前應審閱具體命令、目標路徑、可恢復性和使用者授權。

資料釋出於 2026-10-29

可以用來做什麼

  • 彙總 Discord bot、Gateway 和 OAuth 狀態檢查項。
  • 區分只讀診斷與可能修改系統的自動修復操作。
  • 檢查舊配置遷移可能涉及的路徑和副作用。

什麼時候用

  • 需要排查 Discord 連線或 Gateway 可用性問題時。
  • 需要識別 OAuth 過期或舊配置衝突時。
  • 計劃執行自動修復前,需要先檢查將安裝、重啟、刪除或移動的內容時。

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

只根據這份指南整理診斷步驟,不執行自動修復。
逐項說明此修復模式可能改變的系統元件和配置路徑。

月度資料趨勢

累計下載3255
2053269933442026-03 · 累計下載 21422026-05 · 累計下載 26172026-07 · 累計下載 29322026-08 · 累計下載 30512026-09 · 累計下載 325526-0326-09
星標1
0122026-03 · 星標 12026-05 · 星標 12026-07 · 星標 12026-08 · 星標 12026-09 · 星標 126-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-093255—1
2026-083051+4.1%1
2026-072932—1
2026-052617—1
2026-032142—1

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

2.9 KB · ClawHub v1.0.0
---
name: discord-doctor
description: Quick diagnosis and repair for Discord bot, Gateway, OAuth token, and legacy config issues. Checks connectivity, token expiration, and cleans up old Clawdis artifacts.
metadata: {"clawdbot":{"emoji":"🩺","os":["darwin","linux"],"requires":{"bins":["node","curl"]}}}
---

# Discord Doctor

Quick diagnosis and repair for Discord/Gateway availability issues, OAuth token problems, and legacy Clawdis configuration conflicts.
展開全部(共 100 行)
## Usage

```bash
# Check status (diagnostic only)
discord-doctor

# Check and auto-fix issues
discord-doctor --fix
```

## What It Checks

1. **Discord App** - Is the Discord desktop app running (optional, for monitoring)
2. **Gateway Process** - Is the Clawdbot gateway daemon running
3. **Gateway HTTP** - Is the gateway responding on port 18789
4. **Discord Connection** - Is the bot actually connected to Discord (via `clawdbot health`)
5. **Anthropic OAuth** - Is your OAuth token valid or expired
6. **Legacy Clawdis** - Detects old launchd services and config directories that cause conflicts
7. **Recent Activity** - Shows recent Discord sessions

## Auto-Fix Capabilities

When run with `--fix`, it can:

- **Start gateway** if not running
- **Install missing npm packages** (like discord.js, strip-ansi)
- **Restart gateway** after fixing dependencies
- **Remove legacy launchd service** (`com.clawdis.gateway.plist`)
- **Backup legacy config** (moves `~/.clawdis` to `~/.clawdis-backup`)

## Common Issues & Fixes

| Issue | Auto-Fix Action |
|-------|-----------------|
| Gateway not running | Starts gateway on port 18789 |
| Missing npm packages | Runs `npm install` + installs specific package |
| Discord disconnected | Restarts gateway to reconnect |
| OAuth token expired | Shows instructions to re-authenticate |
| Legacy launchd service | Removes old `com.clawdis.gateway.plist` |
| Legacy ~/.clawdis config | Moves to `~/.clawdis-backup` |

## OAuth Token Issues

If you see "Access token EXPIRED", run:
```bash
cd ~/Clawdis && npx clawdbot configure
```
Then select "Anthropic OAuth (Claude Pro/Max)" to re-authenticate.

## Legacy Clawdis Migration

If you upgraded from Clawdis to Clawdbot, you may have legacy artifacts causing OAuth token conflicts:

- **Old launchd service**: `~/Library/LaunchAgents/com.clawdis.gateway.plist`
- **Old config directory**: `~/.clawdis/`

Run `discord-doctor --fix` to clean these up automatically.

## Example Output

```
Discord Doctor
Checking Discord and Gateway health...

1. Discord App
   Running (6 processes)

2. Gateway Process
   Running (PID: 66156, uptime: 07:45)

3. Gateway HTTP
   Responding on port 18789

4. Discord Connection
   Discord: ok (@Clawdis) (321ms)

5. Anthropic OAuth
   Valid (expires in 0h 45m)

6. Legacy Clawdis
   No legacy launchd service
   No legacy config directory

7. Recent Discord Activity
   - discord:group:123456789012345678 (21h ago)

Summary
All checks passed! Discord is healthy.
```

「運維安全」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。