Skills skill-doctor
Scans the skills folder for new, unused, or missing dependencies; fixes requirements.txt; and tests a skill in or out of sandbox.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/austindixson/skill-doctor" ~/.claude/skills/clawdbot-skills-skill-doctor && rm -rf "$T"
manifest:
skills/austindixson/skill-doctor/SKILL.mdsource content
Skill Doctor | OpenClaw Skill
Scans
workspace/skills (or a given folder) to detect missing and unused Python dependencies, can fix requirements.txt (add missing, optionally remove unused), and can test a skill using the skill-tester in sandbox (default) or no-sandbox mode.
Description
- Scan: For each skill, finds all Python files under the skill and its
folder, extracts top-level imports, and compares them toscripts/
. Reports:requirements.txt- Missing: Imported but not listed in requirements (suggests adding).
- Unused: Listed in requirements but not imported (suggests removing).
- Fix: Adds missing packages to
and/or removes unused ones (requirements.txt
).--fix-unused - Test: Runs the skill-tester for the given skill. Use
to run tests with full environment (e.g. network); default runs in sandbox.--no-sandbox
Stdlib modules and local modules (same skill’s
.py files) are excluded from “missing”.
Installation
clawhub install skill-doctor
Or clone into your skills directory:
git clone https://github.com/Org/skill-doctor.git workspace/skills/skill-doctor
Usage
# Scan all skills (or default: scan) python3 workspace/skills/skill-doctor/scripts/skill_doctor.py # Scan one skill python3 workspace/skills/skill-doctor/scripts/skill_doctor.py --skill SUBAGENT-DASHBOARD --scan # Fix: add missing deps to requirements.txt python3 workspace/skills/skill-doctor/scripts/skill_doctor.py --skill MY-SKILL --fix # Fix: add missing and remove unused python3 workspace/skills/skill-doctor/scripts/skill_doctor.py --skill MY-SKILL --fix --fix-unused # Dry-run fix (report only) python3 workspace/skills/skill-doctor/scripts/skill_doctor.py --skill MY-SKILL --fix --fix-unused --dry-run # Test skill (sandbox) python3 workspace/skills/skill-doctor/scripts/skill_doctor.py --skill gateway-guard --test # Test skill (no sandbox: full env) python3 workspace/skills/skill-doctor/scripts/skill_doctor.py --skill gateway-guard --test --no-sandbox # JSON output python3 workspace/skills/skill-doctor/scripts/skill_doctor.py --scan --json python3 workspace/skills/skill-doctor/scripts/skill_doctor.py --skill X --test --json
Commands
| Command / flags | Description |
|---|---|
| Scan skills and report missing/unused dependencies (default if no /) |
| Limit to one skill |
| Add missing packages to |
| With , also remove unused packages |
| With : only report what would be done |
| Run skill-tester for the skill |
| Run tests with full env (no sandbox) |
| Test timeout in seconds (default 60) |
| Output JSON |
| Override skills root (default: ) |
What this skill does
- Discover skills — Finds dirs with
orSKILL.md
under the skills folder._meta.json - Parse Python — Uses
to collect top-levelast
/import
names from allimport from
files in the skill and.py
.scripts/ - Exclude stdlib and local — Ignores standard library modules and local modules (same skill’s file names).
- Map to pip — Maps import names to pip package names (e.g.
→bs4
,beautifulsoup4
→yaml
).PyYAML - Compare — Compares required (from
) vs needed (from imports); reports missing and unused.requirements.txt - Fix — Writes
: append missing packages; optionally remove unused lines.requirements.txt - Test — Invokes
. Sandbox vs no-sandbox is controlled byskill-tester/scripts/skill_tester.py --skill SLUG --json
and the--no-sandbox
env var for the test run.OPENCLAW_DOCTOR_NO_SANDBOX
Requirements
- Python 3.7+
- Optional: skill-tester for
(must be present under--test
).workspace/skills/skill-tester
Security & privacy
- Reads: Skill directories and their
and.py
files.requirements.txt - Writes: Only
when usingrequirements.txt
(and--fix
).--fix-unused - Test: Runs skill-tester in a subprocess;
means tests run with the current environment (e.g. network allowed).--no-sandbox