← Back to Skills Marketplace
tianyilt

Claw Doctor

by SII-Tian-yi Liang · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
331
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install claw-doctor
Description
Diagnose and fix common OpenClaw / NanoClaw issues — broken skills, missing scripts, API key failures, path resolution bugs, and configuration problems. The...
README (SKILL.md)

Claw Doctor — OpenClaw Self-Repair Skill

This skill diagnoses and fixes common OpenClaw / NanoClaw problems. When something breaks, run through the checklist below before giving up.


When to Activate

Activate this skill when the user reports any of the following:

  • "skill not found" / skill does not trigger
  • "No such file or directory" when running a skill script
  • API key errors from a skill
  • Skill produces no output or wrong output
  • "SKILL.md is invalid" / YAML parse errors
  • A skill works globally but not in workspace (or vice versa)
  • Skills were working before but stopped after an update

Skill Load Order & Paths

OpenClaw loads skills from two locations. Workspace skills take priority.

Priority 1 (high): \x3Cworkspace>/skills/\x3Cskill-name>/SKILL.md
Priority 2 (low):  ~/.openclaw/skills/\x3Cskill-name>/SKILL.md

Diagnostic: list all loaded skills

# Show what's installed globally
ls ~/.openclaw/skills/ 2>/dev/null || echo "No global skills dir"

# Show what's installed in current workspace
ls ./skills/ 2>/dev/null || echo "No workspace skills dir"

If a skill appears in both, the workspace version wins — check for version mismatches.


Problem 1 — Skill Does Not Trigger

Symptom: User invokes a skill but Claude ignores it or does not follow the skill procedure.

Diagnosis checklist:

  1. Is the SKILL.md actually present and readable?

    cat ./skills/\x3Cskill-name>/SKILL.md | head -20
    
  2. Does the frontmatter YAML parse correctly?

    python3 -c "
    import re, sys
    txt = open('skills/\x3Cskill-name>/SKILL.md').read()
    fm = re.search(r'^---\
    

(.*?)
---', txt, re.DOTALL) print('Frontmatter found:', bool(fm)) if fm: import yaml; d = yaml.safe_load(fm.group(1)); print('Keys:', list(d.keys())) "


3. Do the `keywords` in the SKILL.md match what the user said?
- Add more keyword variants (synonyms, abbreviations) if not matching.

4. Is `description` clear enough for the model to identify the skill?
- Short, specific descriptions outperform vague ones.

**Fix**: Ensure frontmatter is valid YAML (no tabs, proper quoting, correct indentation).

---

## Problem 2 — Script Not Found (Path Resolution)

**Symptom**: `bash: scripts/run: No such file or directory`

This is the most common skill bug. Scripts referenced in SKILL.md as `scripts/foo` are relative to the skill's **installation directory inside the OpenClaw plugin cache**, not the current working directory.

**Canonical fix** — resolve the script path dynamically before every use:

```bash
# For a skill named "my-skill" with a script named "run"
MY_SCRIPT=$(find ~/.openclaw -name "run" -path "*/my-skill/*/scripts/*" -type f 2>/dev/null | head -1)
# Fallback: check workspace skills
[ -z "$MY_SCRIPT" ] && MY_SCRIPT=$(find ./skills -name "run" -path "*/my-skill/scripts/*" -type f 2>/dev/null | head -1)

if [ -z "$MY_SCRIPT" ]; then
echo "ERROR: script not found. Is the skill installed?"
exit 1
fi

$MY_SCRIPT \x3Cargs>

Also check: Is the script executable?

chmod +x ~/.openclaw/skills/my-skill/scripts/*
chmod +x ./skills/my-skill/scripts/*

Problem 3 — API Key Not Configured

Symptom: Skill returns {"success": false, "setup_required": true} or 401/403 errors.

Standard API key setup flow:

  1. The skill's SKILL.md should document where the key is stored (usually ~/.openclaw/secrets/\x3Cskill-name>.key or an env var).
  2. Check if the key file exists:
    ls ~/.openclaw/secrets/ 2>/dev/null || echo "No secrets dir"
    
  3. Run the skill's setup command (usually scripts/run setup \x3Capi-key>).
  4. Verify the key was saved:
    cat ~/.openclaw/secrets/\x3Cskill-name>.key 2>/dev/null | head -c 20
    

If no setup command exists, ask the user to set the env var directly:

export SKILL_API_KEY="their-key-here"
# Add to ~/.zshrc or ~/.bashrc for persistence

Problem 4 — Dependency Missing (Node.js / Python / tool)

Symptom: node: command not found, python3: No such file or directory, jq: command not found

Quick dependency check:

echo "=== Core deps ===" && \
node --version 2>/dev/null || echo "MISSING: node" && \
python3 --version 2>/dev/null || echo "MISSING: python3" && \
jq --version 2>/dev/null || echo "MISSING: jq" && \
curl --version 2>/dev/null | head -1 || echo "MISSING: curl"

Fix by platform:

Tool macOS Ubuntu/Debian
Node.js brew install node apt install nodejs npm
Python 3 brew install python3 apt install python3
jq brew install jq apt install jq

For Python skill dependencies:

pip3 install -r skills/\x3Cskill-name>/requirements.txt 2>/dev/null \
  || echo "No requirements.txt found"

For Node skill dependencies:

cd skills/\x3Cskill-name> && npm install 2>/dev/null \
  || echo "No package.json found"

Problem 5 — YAML Frontmatter Errors

Symptom: Skill loads but metadata is wrong / keywords not indexed.

Valid frontmatter template:

---
name: my-skill-name         # lowercase, hyphens only
description: One clear sentence describing what this skill does.
keywords:
  - keyword-one
  - keyword-two
license: MIT
---

Common mistakes:

Mistake Fix
Tabs instead of spaces Replace with 2-space indentation
Unquoted : in description Wrap value in quotes
Missing name field Add it — it's required
keywords as inline list [a, b] Use block list `- a\
  • b` |

Validate:

python3 -c "
import yaml, sys
txt = open('skills/\x3Cskill-name>/SKILL.md').read().split('---')[1]
try:
    d = yaml.safe_load(txt)
    print('OK:', d)
except yaml.YAMLError as e:
    print('YAML ERROR:', e)
    sys.exit(1)
"

Problem 6 — Skill Worked Before, Broke After Update

Symptom: OpenClaw updated and a skill stopped working.

Checklist:

  1. Check if the OpenClaw plugin cache was cleared:

    ls ~/.openclaw/plugins/cache/ 2>/dev/null | head -10
    
  2. Reinstall the skill from source:

    # From a cloned skills repo
    cp -r /path/to/skills-repo/skills/\x3Cskill-name> ~/.openclaw/skills/
    
  3. Check for breaking changes in OpenClaw's skill API — look at the OpenClaw changelog for SKILL.md format updates.

  4. Test the script directly (bypassing OpenClaw):

    bash skills/\x3Cskill-name>/scripts/\x3Cmain-script> --help
    

Full Health Check

Run this to get a complete snapshot of the OpenClaw environment:

echo "=== OpenClaw Health Check ===" && \
echo "--- Global skills ---" && ls ~/.openclaw/skills/ 2>/dev/null || echo "(none)" && \
echo "--- Workspace skills ---" && ls ./skills/ 2>/dev/null || echo "(none)" && \
echo "--- Secrets ---" && ls ~/.openclaw/secrets/ 2>/dev/null || echo "(none)" && \
echo "--- Plugin cache ---" && ls ~/.openclaw/plugins/cache/ 2>/dev/null | head -5 || echo "(empty)" && \
echo "--- Dependencies ---" && \
  node --version 2>/dev/null && \
  python3 --version 2>/dev/null && \
  jq --version 2>/dev/null && \
echo "=== Done ==="

For Claude Code Users

This skill also works as a Claude Code user-invocable skill. Add the following to ~/.claude/CLAUDE.md under ## User-Invocable Skills:

### claw-doctor

Diagnose and fix OpenClaw / NanoClaw problems.

**Trigger**: user mentions skill not loading, script not found, API key error, SKILL.md broken, OpenClaw not working

**Procedure**: Follow the claw-doctor SKILL.md checklist:
1. Identify symptom category (trigger / script path / API key / dependency / YAML / post-update)
2. Run the relevant diagnostic commands
3. Apply the fix and verify with the Full Health Check

Contributing

Found a new OpenClaw failure mode? Open a PR with:

  1. The symptom (exact error message or behavior)
  2. Root cause
  3. Diagnostic command
  4. Fix

Keep entries short and command-first. The doctor should be fast to consult.

Usage Guidance
This skill is coherent with its stated purpose and appears to be a local troubleshooting checklist. Before running commands from it: (1) review any command that reads or prints secret files (e.g., ~/.openclaw/secrets/*) and avoid pasting secrets into chats; (2) inspect scripts before chmod/exec to ensure they are from a trusted source; (3) be aware pip3/npm install will fetch packages from the network — prefer installing in an isolated environment (venv/container) or review requirements first; (4) if the Python YAML snippet fails, you may need pyyaml installed locally; (5) if unsure, run the diagnostic read-only commands (ls, cat head) first and ask for guidance on specific fixes rather than applying all changes automatically.
Capability Analysis
Type: OpenClaw Skill Name: claw-doctor Version: 1.0.0 The 'claw-doctor' skill provides a comprehensive set of diagnostic and repair tools for OpenClaw environments, including script path resolution, dependency management (pip/npm), and YAML validation. It is classified as suspicious because it grants the agent broad system capabilities, such as modifying file permissions (chmod +x) and reading the first 20 characters of stored API keys from '~/.openclaw/secrets/' for verification. While these actions are plausibly necessary for its stated purpose of troubleshooting, they represent high-risk behaviors and a significant attack surface within the SKILL.md instructions.
Capability Assessment
Purpose & Capability
Name/description match the contents: the SKILL.md focuses on diagnosing OpenClaw/NanoClaw issues and references exactly the locations and operations (workspace ./skills, ~/.openclaw, secrets, scripts, YAML frontmatter) you'd expect for that task.
Instruction Scope
Instructions legitimately instruct reading skill files, YAML frontmatter, searching for scripts, checking ~/.openclaw and workspace paths, verifying API key files, and running dependency installs. These actions are within scope for a repair tool, but several are sensitive: the guide recommends reading secret files (e.g., ~/.openclaw/secrets/<skill>.key), running chmod/exec on scripts, and executing pip/npm installs — all of which can expose secrets or execute remote code if done blindly.
Install Mechanism
No install spec (instruction-only), so nothing is written by the registry. The guide recommends running pip3/npm install for skill-local dependencies; that is reasonable for repairing skills but carries the standard network-package risk from registries.
Credentials
The skill declares no environment variables or credentials and does not request unrelated secrets. It does instruct checking common config paths (workspace and ~/.openclaw) and secrets locations, which is proportional to diagnostics. Note: the runtime instructions access secrets files on disk (expected for repair), so users should be aware these operations reveal sensitive data.
Persistence & Privilege
The skill does not request always:true, has no install hooks, and is user-invocable. It does not modify other skills' configurations in the instructions; suggested edits are local fixes (chmod, pip installs, editing shell rc) which are normal for remediation.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install claw-doctor
  3. After installation, invoke the skill by name or use /claw-doctor
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Renamed from lobster-doctor — diagnose and fix common OpenClaw/NanoClaw problems
Metadata
Slug claw-doctor
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Claw Doctor?

Diagnose and fix common OpenClaw / NanoClaw issues — broken skills, missing scripts, API key failures, path resolution bugs, and configuration problems. The... It is an AI Agent Skill for Claude Code / OpenClaw, with 331 downloads so far.

How do I install Claw Doctor?

Run "/install claw-doctor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Claw Doctor free?

Yes, Claw Doctor is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Claw Doctor support?

Claw Doctor is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Claw Doctor?

It is built and maintained by SII-Tian-yi Liang (@tianyilt); the current version is v1.0.0.

💬 Comments