openclaw-medicine

Diagnose and fix OpenClaw gateway issues — broken configs, missing tokens, dead channels, auth failures, merge bugs, and multi-instance management. Use when openclaw is unresponsive, channels aren't starting, config is corrupted, or when managing remote openclaw instances (e.g. via SSH). Also covers migrating between config strategies (Nix-managed vs local).

16 stars

Best use case

openclaw-medicine is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Diagnose and fix OpenClaw gateway issues — broken configs, missing tokens, dead channels, auth failures, merge bugs, and multi-instance management. Use when openclaw is unresponsive, channels aren't starting, config is corrupted, or when managing remote openclaw instances (e.g. via SSH). Also covers migrating between config strategies (Nix-managed vs local).

Teams using openclaw-medicine should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/openclaw-medicine/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/data-ai/openclaw-medicine/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/openclaw-medicine/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How openclaw-medicine Compares

Feature / Agentopenclaw-medicineStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Diagnose and fix OpenClaw gateway issues — broken configs, missing tokens, dead channels, auth failures, merge bugs, and multi-instance management. Use when openclaw is unresponsive, channels aren't starting, config is corrupted, or when managing remote openclaw instances (e.g. via SSH). Also covers migrating between config strategies (Nix-managed vs local).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# OpenClaw Medicine 💊

Diagnose, fix, and maintain OpenClaw gateway instances — local or remote.

## Diagnosis Checklist

Run these in order to identify the problem:

1. **Gateway status**: `openclaw status` (or via SSH for remote instances)
2. **Config exists?**: `cat ~/.openclaw/openclaw.json` — if missing, gateway has no config
3. **Config valid?**: Use `gateway(action=config.get)` — check `valid`, `issues`, `warnings`
4. **Logs**: `journalctl --user -u openclaw-gateway -n 30 --no-pager` — look for:
   - `[telegram]` / `[whatsapp]` — channel startup
   - `No API key found` — missing auth profile
   - `Config invalid` / `Unrecognized key` — schema violations
   - `ECONNREFUSED` — gateway not listening on expected port
5. **Auth profile**: `cat ~/.openclaw/agents/main/agent/auth-profiles.json` — needs valid Anthropic token

## Common Issues & Fixes

### No config file
Gateway was set up by an external system (Nix activation, wizard) that no longer runs.
- Write a fresh `openclaw.json` based on a known-good config
- Must include: `channels`, `gateway` (port, auth), `agents`, `plugins`
- Use `gateway(action=config.patch)` for local instance, or write directly via SSH for remote

### Invalid config keys
OpenClaw validates strictly. Common mistakes:
- `channels.telegram.token` → **wrong**, use `tokenFile` pointing to a file containing the token
- Unknown keys cause startup failure — check `openclaw doctor --fix` output

### Missing auth profile
The file `~/.openclaw/agents/main/agent/auth-profiles.json` must exist with a valid provider token:
```json
{
  "version": 1,
  "profiles": {
    "anthropic:default": {
      "type": "token",
      "provider": "anthropic",
      "token": "<api-key>"
    }
  },
  "lastGood": { "anthropic": "anthropic:default" }
}
```

### Telegram token storage
Never put the token inline in config. Write to a file and reference it:
```bash
echo -n '<bot-token>' > ~/.openclaw/telegram-bot-token
chmod 600 ~/.openclaw/telegram-bot-token
```
Config: `"tokenFile": "/home/<user>/.openclaw/telegram-bot-token"`

### Channels not starting after restart
- Check if `plugins.entries.telegram.enabled` and `channels.telegram.enabled` are both `true`
- After config changes, the gateway needs SIGUSR1 or service restart
- Delete stale offset files if switching bots: `rm ~/.openclaw/telegram/update-offset-default.json`

### Port mismatch
Gateway port in config vs systemd service env can diverge. Check:
- Config: `gateway.port`
- Service: `systemctl --user show openclaw-gateway | grep Environment` → `OPENCLAW_GATEWAY_PORT`
- These must match

## Remote Instance Management (via SSH)

For managing another machine's OpenClaw (e.g. Romário on work PC):

```bash
# Check status
ssh user@host "export PATH=\$HOME/.npm-global/bin:\$PATH; openclaw status"

# Read logs
ssh user@host "journalctl --user -u openclaw-gateway -n 30 --no-pager"

# Write config
ssh user@host "cat > ~/.openclaw/openclaw.json << 'EOF'
{ ... }
EOF"

# Restart
ssh user@host "systemctl --user restart openclaw-gateway"
```

Always verify channels start after restart by checking logs for `[telegram] starting provider`.

## Config Architecture

OpenClaw config is a single JSON file at `~/.openclaw/openclaw.json`. It's the source of truth.

**Do not** manage it via Nix activation scripts or merge strategies — this causes override bugs where runtime config clobbers Nix-defined values (or vice versa). Let openclaw manage its own config locally.

**Nix should only manage**: workspace symlinks (identity/rules/skills) and package installation. See the `rebuild` skill for Nix operations.

## Multi-Bot Setup (Cleber + Romário)

When two bots share Telegram groups:
- Each bot's `groupAllowFrom` must include the other bot's ID
- `groups.*` and specific group entries need both IDs in `allowFrom`
- Armada Lucas group (`-1003768595045`): `requireMention: false` for bot-to-bot chat
- Cleber ID: `8372008099`, Romário ID: `8523821709`

## Retrieving Lost Bot Tokens

If a Telegram bot token is lost:
1. Open BotFather in Telegram (browser or app)
2. Send `/mybots` → select the bot → "API Token"
3. Or search BotFather chat history for "Use this token to access the HTTP API"
4. Token format: `<bot-id>:<alphanumeric-string>`
5. Store securely in `~/.openclaw/telegram-bot-token`, never in config JSON

Related Skills

openclaw-json-editing

16
from diegosouzapw/awesome-omni-skill

Advanced JSON editing for OpenClaw configuration files, tools, and data structures. Handles JSON5 configs, schema validation, merge patching, env var substitution, and type-safe modifications.

openclaw-config-validator

16
from diegosouzapw/awesome-omni-skill

Validate, analyze, and explain OpenClaw configuration files. Use when users need to check config.json for errors, understand what a config field does, compare configs, or safely modify OpenClaw configuration. Triggers on config validation requests, schema questions, or config editing tasks.

openclaw-agent-run

16
from diegosouzapw/awesome-omni-skill

Direct agent CLI invocations in OpenClaw. Use when running the `openclaw agent` command to trigger agent turns, targeting sessions or agents programmatically, delivering replies to channels, using --json output for automation, overriding thinking/verbose levels, or understanding session selection logic. Triggers for: "openclaw agent", "direct agent run", "send a message to agent", "--deliver", "--session-id", "agent turn", "CLI agent", "thinking level", "verbose mode", "--json output".

openclaw-tescmd

16
from diegosouzapw/awesome-omni-skill

Installation and setup guide for Tesla vehicle control and telemetry via the tescmd node.

aura-openclaw

16
from diegosouzapw/awesome-omni-skill

No description provided.

openclaw-starter-kit

16
from diegosouzapw/awesome-omni-skill

Replace 100+ API keys with one. Instant access to LLMs, Twitter, YouTube, LinkedIn, Finance, Tavily & Scholar data. Enterprise stability for your local agent.

moltbot, openclaw-best-practices

16
from diegosouzapw/awesome-omni-skill

Best practices for AI agents to avoid common mistakes. Learn from real failures - confirms before executing, shows drafts before publishing. Works with Claude, Cursor, GPT, Copilot.

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

self-subagent

16
from diegosouzapw/awesome-omni-skill

Orchestrate parallel sub-tasks by spawning non-interactive instances of your own CLI as subagents. Use when you need to parallelize work across multiple files, run independent investigations simultaneously, or delegate heavy multi-step tasks. Works with ANY AI coding CLI agent (Amp, Claude Code, Codex, Cursor, OpenCode, aider, Cline, Roo, goose, Windsurf, Copilot CLI, pi, etc.). Triggers on "run in parallel", "subagent", "delegate", "fan out", "concurrent tasks", or any complex task that benefits from parallel execution.

self-improving-ai

16
from diegosouzapw/awesome-omni-skill

Understanding and using StickerNest's self-improving AI system. Use when the user asks about AI self-improvement, prompt versioning, reflection loops, AI evaluation, auto-tuning prompts, or the AI judge system. Covers AIReflectionService, stores, and the improvement loop.

second-brain

16
from diegosouzapw/awesome-omni-skill

Personal intelligence system for capturing thoughts, managing knowledge, and surfacing insights. Use when user wants to capture an idea, task, or note during conversation; query their knowledge base; check their inbox; review digests; or update task status. Triggers include "remember this," "add a task," "what did I say about," "show my inbox," or "mark complete."

searching-message-history

16
from diegosouzapw/awesome-omni-skill

Search Telegram conversation history and stored links. Use when finding past messages, what someone said, or links shared in chats.