---
name: find-skill
description: >
Search 4 skill registries in parallel (skills.sh, clawhub.ai, skills.lc, + optional skillsmp.com)
for agent skills relevant to the user's current task. Every candidate undergoes Claude-native
security analysis (10 threat categories) before installation. Triggers on: "find a skill",
"search for skills", "is there a skill for", "skill for X", "find-skill", or when the agent
identifies a task that could benefit from a specialized skill not already installed. Use
proactively when a task would clearly benefit from a domain skill.
---
# Find Skill v3 — 4-Registry Search & Safe-Install
Search **skills.sh** (35K+ skills), **clawhub.ai** (semantic search), **skills.lc** (star-ranked), and optionally **skillsmp.com** (AI semantic search) in parallel. Every candidate is security-reviewed before installation.
**Version:** 3.0.0 (2026-03-20)
## Registries
| Registry | Method | Auth | What It Adds |
|----------|--------|------|-------------|
| **skills.sh** | \`skills\` CLI | None | 35K+ skills, install counts, largest catalog |
| **clawhub.ai** | \`clawhub\` CLI | None | Semantic/vector search, stars, rich JSON metadata |
| **skills.lc** | \`skills-lc-cli\` CLI | None | Star-ranked results, structured IDs, broad coverage |
| **skillsmp.com** | curl REST API | \`SKILLSMP_API_KEY\` | AI semantic search, GitHub URLs in results. **Optional — works without it.** |
## Requirements
- \`skills\` CLI: \`npm install -g skills\`
- \`clawhub\` CLI: \`npm install -g clawhub\`
- \`skills-lc-cli\`: \`npm install -g skills-lc-cli\`
- \`git\` for cloning repos during security review
- Internet access
- **Optional:** \`SKILLSMP_API_KEY\` env var for skillsmp.com (free key from https://skillsmp.com/docs/api)
If a CLI is missing at runtime, ask the user before installing. Do NOT auto-install without confirmation.
## When This Triggers
- User asks "find a skill for X", "is there a skill for this", "search skills"
- User invokes \`/find-skill\`
- Agent recognizes a task that would benefit from a specialized skill not already installed
- Before suggesting manual approaches to well-known problems
## Step 1 — Build Search Query
Analyze the user's current task and context to build 1-3 search queries. Consider:
- The primary technology (React, Python, Rust, etc.)
- The task type (testing, deployment, refactoring, code review, etc.)
- The specific domain (auth, database, CI/CD, etc.)
Generate short, focused queries. Examples:
- Task: "write Playwright tests" → queries: \`playwright\`, \`e2e testing\`
- Task: "deploy to Vercel" → queries: \`vercel deploy\`, \`vercel\`
## Step 2 — Search All Registries in Parallel
Run all searches in a **single Bash call** with timeout protection. skills.lc is interactive — pipe \`q\` to exit. skillsmp only runs if API key is set.
\`\`\`bash
SEARCH_DIR=$(mktemp -d /tmp/skill-search-XXXXXX)
# 1. skills.sh
(skills find "QUERY" 2>&1 | head -40) > "$SEARCH_DIR/skills-sh.txt" &
PID1=$!
# 2. clawhub (semantic search)
(clawhub search "QUERY" --limit 10 2>&1) > "$SEARCH_DIR/clawhub.txt" &
PID2=$!
# 3. skills.lc (pipe 'q' to exit interactive prompt)
(echo "q" | skills-lc-cli search "QUERY" 2>&1 | head -50) > "$SEARCH_DIR/skills-lc.txt" &
PID3=$!
# 4. skillsmp.com (only if API key is set)
if [ -n "$SKILLSMP_API_KEY" ]; then
(curl -s "https://skillsmp.com/api/v1/skills/search?q=QUERY&limit=10" \\
-H "Authorization: Bearer $SKILLSMP_API_KEY" 2>&1) > "$SEARCH_DIR/skillsmp.txt" &
PID4=$!
else
PID4=""
fi
# Timeout: kill any search still running after 15s
(sleep 15; kill $PID1 $PID2 $PID3 $PID4 2>/dev/null) &
TPID=$!
wait $PID1 2>/dev/null
wait $PID2 2>/dev/null
wait $PID3 2>/dev/null
[ -n "$PID4" ] && wait $PID4 2>/dev/null
kill $TPID 2>/dev/null
echo "=== skills.sh ==="
cat "$SEARCH_DIR/skills-sh.txt"
echo ""
echo "=== clawhub ==="
cat "$SEARCH_DIR/clawhub.txt"
echo ""
echo "=== skills.lc ==="
cat "$SEARCH_DIR/skills-lc.txt"
echo ""
if [ -f "$SEARCH_DIR/skillsmp.txt" ]; then
echo "=== skillsmp ==="
cat "$SEARCH_DIR/skillsmp.txt"
fi
\`\`\`
If you have multiple queries, run them sequentially within each registry search.
### Fallback Strategy
| Registry | If CLI missing | If search fails |
|----------|---------------|-----------------|
| skills.sh | Ask user: \`npm install -g skills\` | Skip, note gap |
| clawhub | Ask user: \`npm install -g clawhub\` | Skip, note gap |
| skills.lc | Ask user: \`npm install -g skills-lc-cli\` | Skip, note gap |
| skillsmp | Note: "To also search skillsmp.com (AI semantic search), get a free API key at https://skillsmp.com/docs/api and set SKILLSMP_API_KEY" | Skip, note gap |
**Minimum viable search:** At least one registry must return results. If all fail, broaden query or tell user.
### Output Parsing
**skills.sh format:**
\`\`\`
owner/repo@skill-name NK installs
└ https://skills.sh/owner/repo/skill-name
\`\`\`
Extract: identifier (\`owner/repo@skill-name\`), install count, URL.
**clawhub format:**
\`\`\`
slug-name Display Name (score)
\`\`\`
Extract: slug. Then run \`clawhub inspect <slug> --json\` for rich metadata (displayName, summary, stats.downloads, stats.stars). Note: clawhub inspect does **not** return a repo URL — use the owner's GitHub handle to guess \`https://github.com/OWNER/SLUG\` or fall back to \`clawhub inspect <slug> --file SKILL.md\` to review content directly without cloning.
**skills.lc format:**
\`\`\`
[N] skill-name
structured-id
Description text...
★ N stars
\`\`\`
Extract: skill name, structured ID, description, star count. Parse numbered entries.
**skillsmp.com format (JSON):**
\`\`\`json
{
"success": true,
"data": {
"skills": [
{
"id": "author-repo-skills-name-skill-md",
"name": "skill-name",
"author": "AuthorName",
"description": "Description...",
"githubUrl": "https://github.com/OWNER/REPO/tree/main/skills/name",
"skillUrl": "https://skillsmp.com/skills/id",
"stars": 3,
"updatedAt": "timestamp"
}
]
}
}
\`\`\`
Extract: name, author, description, githubUrl (use for cloning!), stars. skillsmp provides \`githubUrl\` directly — this is the most reliable source for clone URLs.
**Parse safety:** If parsing produces zero results from non-empty output, flag the parse failure and show raw output to user rather than silently returning nothing.
## Step 3 — Merge & Rank
1. Normalize identifiers to a common format: \`registry:publisher/name\`
2. **Do NOT auto-merge across registries.** Same name on different registries can be different code from different publishers. Show each as a separate entry tagged with its source.
3. If the same GitHub repo URL appears from multiple registries, note "Also on: [other registries]" but keep as one entry.
4. Rank by:
- **Relevance** to query (position in search results)
- **Install count** (max across registries if same repo)
- **Stars** (clawhub and skills.lc provide this)
- **Source breadth** — appearing on multiple registries is a trust signal
- **Source reputation** — official/verified repos rank higher
5. Select top 3-5 for security review
## Step 4 — Claude-Native Security Analysis
**Every skill MUST pass this analysis before being recommended for installation.**
### 4a: Clone for Inspection
For each candidate, clone the upstream git repo (NOT the registry's packaged version):
\`\`\`bash
TEMP_DIR=$(mktemp -d /tmp/skill-check-XXXXXX)
[ -d "$TEMP_DIR" ] || { echo "ERROR: Failed to create temp dir"; exit 1; }
# Get repo URL — sources by reliability:
# 1. skillsmp: githubUrl field (most reliable — direct from API)
# 2. skills.sh: derive from identifier (owner/repo@skill-name) → https://github.com/OWNER/REPO
# 3. clawhub: try https://github.com/OWNER_HANDLE/SLUG, or use clawhub inspect --file
# 4. skills.lc: derive from structured ID if it contains GitHub path
git clone --depth 1 --filter=blob:none "REPO_URL" "$TEMP_DIR" 2>&1
# Safety checks
REPO_SIZE_MB=$(du -sm "$TEMP_DIR" | cut -f1)
FILE_COUNT=$(find "$TEMP_DIR" -type f -not -path '*/.git/*' | wc -l | tr -d ' ')
if [ "$REPO_SIZE_MB" -gt 50 ]; then
echo "SUSPICIOUS: ${REPO_SIZE_MB}MB — skills should be small"
rm -rf "$TEMP_DIR"; exit 1
fi
if [ "$FILE_COUNT" -gt 100 ]; then
echo "WARNING: ${FILE_COUNT} files — unusually large"
fi
\`\`\`
**Clone limits:** \`--depth 1 --filter=blob:none\` (minimal fetch). Max 30s per clone. If no git repo URL available, use \`clawhub inspect <slug> --file SKILL.md\` to review content directly. Only skip if you cannot access the skill content at all.
**Clone only top 1-2 candidates initially.** Only clone more if user wants alternatives.
### 4b: Read Skill Content
Read the SKILL.md first, then any files it references, then remaining files up to a cap of **10 files per repo**. If repo has >10 non-binary files, flag as suspicious and only read SKILL.md + referenced files.
For multi-skill repos (e.g., skills.sh \`owner/repo@skill-name\`), use the skill-name as a subdirectory filter:
\`\`\`bash
SKILL_FILE=$(find "$TEMP_DIR" -path "*/$SKILL_SUBDIR/SKILL.md" -o -path "*/$SKILL_SUBDIR/skill.md" 2>/dev/null | head -1)
if [ -z "$SKILL_FILE" ]; then
SKILL_FILE=$(find "$TEMP_DIR" -maxdepth 2 -name "SKILL.md" -o -name "skill.md" | head -1)
fi
\`\`\`
### 4c: Analyze for Threats
Evaluate against 10 threat categories with contextual judgment:
1. **Data Exfiltration** — sending local data to external endpoints
2. **Prompt Injection** — overriding agent's system prompt or safety
3. **Credential Harvesting** — reading ~/.ssh, ~/.aws, .env and transmitting
4. **Destructive Operations** — disproportionate rm -rf, git push --force
5. **Supply Chain** — installing unrelated packages
6. **Obfuscation** — base64 commands, eval of constructed strings
7. **Privilege Escalation** — unnecessary sudo, root access
8. **Persistence** — cron jobs, shell profile modifications, git hooks
9. **Resource Abuse** — crypto mining, fork bombs, unbounded processes
10. **Environment Manipulation** — PATH modification, config poisoning
### 4d: Render Verdict
| Verdict | Action |
|---------|--------|
| **SAFE** | Recommend for installation |
| **CAUTION** | Warn user, show concerns, let them decide |
| **DANGEROUS** | Block. Explain exactly what was found. |
### 4e: Hold Reviewed Clone
Do NOT clean up yet. Keep for TOCTOU-safe installation in Step 6.
## Step 5 — Present Results
\`\`\`markdown
## Skill Search Results: "[query]"
Searched: skills.sh ✓ | clawhub ✓ | skills.lc ✓ | skillsmp ✗ (no API key — get one free at skillsmp.com/docs/api)
| # | Skill | Source(s) | Installs | Stars | Security | Description |
|---|-------|-----------|----------|-------|----------|-------------|
| 1 | \`owner/repo@name\` | skills.sh, skillsmp | 225K | 3 | SAFE | Brief desc |
| 2 | \`slug-name\` | clawhub | — | 45 | SAFE | Brief desc |
| 3 | \`skill-name\` | skills.lc | — | 134K | CAUTION | Brief desc |
### Blocked:
- \`sketchy/bad-skill\` (clawhub) — DANGEROUS: [explanation]
### Recommendation
**#1** because [reasoning]. Install globally or to this project?
\`\`\`
If \`SKILLSMP_API_KEY\` is not set, include this note in the results header:
> **Tip:** To also search skillsmp.com (AI-powered semantic search), get a free API key at https://skillsmp.com/docs/api and set \`SKILLSMP_API_KEY\` in your environment.
## Step 6 — Install (TOCTOU-Safe)
**CRITICAL: Always install by copying from the reviewed clone.** Never use \`skills add\`, \`clawhub install\`, or any registry CLI install command — they re-fetch from the registry, breaking the review-what-you-install guarantee.
### Install Process
\`\`\`bash
# TEMP_DIR still has the reviewed clone from Step 4
REVIEWED_SHA=$(git -C "$TEMP_DIR" rev-parse HEAD)
echo "Installing from reviewed commit: $REVIEWED_SHA"
# For multi-skill repos: use skill-name as subdirectory filter
SKILL_SUBDIR="skill-name"
SKILL_FILE=$(find "$TEMP_DIR" -path "*/$SKILL_SUBDIR/SKILL.md" -o -path "*/$SKILL_SUBDIR/skill.md" 2>/dev/null | head -1)
if [ -z "$SKILL_FILE" ]; then
SKILL_FILE=$(find "$TEMP_DIR" -maxdepth 2 -name "SKILL.md" -o -name "skill.md" | head -1)
fi
# Extract and sanitize skill name
RAW_NAME=$(grep -m1 "^name:" "$SKILL_FILE" | sed 's/name:\\s*//' | tr -d '[:space:]')
SKILL_NAME=$(echo "$RAW_NAME" | tr -cd 'a-zA-Z0-9_-')
if [ -z "$SKILL_NAME" ]; then
echo "ERROR: Invalid skill name"; rm -rf "$TEMP_DIR"; exit 1
fi
# Check for existing skill
if [ -d "$INSTALL_DIR/$SKILL_NAME" ]; then
echo "WARNING: Skill '$SKILL_NAME' already exists. Overwrite?"
# Wait for user confirmation
fi
# Install
mkdir -p "$INSTALL_DIR/$SKILL_NAME"
cp "$SKILL_FILE" "$INSTALL_DIR/$SKILL_NAME/skill.md"
# Copy rule files if they exist
RULES_DIR=$(dirname "$SKILL_FILE")/rules
if [ -d "$RULES_DIR" ]; then
cp -r "$RULES_DIR" "$INSTALL_DIR/$SKILL_NAME/"
fi
echo "Installed $SKILL_NAME to $INSTALL_DIR/$SKILL_NAME/skill.md"
# Clean up
rm -rf "$TEMP_DIR"
\`\`\`
### Scope Selection
Ask user: "Install globally (all projects) or just this project?"
| Scope | \`INSTALL_DIR\` |
|-------|---------------|
| **Global** | \`~/.claude/skills\` |
| **Project** | \`.claude/skills\` (relative to nearest \`.git\` root, or \`$PWD\` if no git) |
### Post-Install Verification
Read the installed skill.md and confirm it matches the reviewed content. If different, warn user.
## Edge Cases
**No results found:** Broaden query, try alternative terms. If still nothing, tell user.
**CLI not installed:** Ask user before installing. Suggest the specific \`npm install -g\` command.
**User wants a CAUTION skill:** Show specific concerns, let them decide.
**Skill already installed:** Tell user, offer to update (overwrite).
**Git clone fails (private repo, rate limit):** Do NOT install. "Can't clone for review — won't install unreviewed skills."
**clawhub skill has no repo URL:** Try \`clawhub inspect <slug> --file SKILL.md\` to review content directly. If content looks safe, install from fetched content. If you cannot review the full skill, skip: "Cannot fully verify — skipping."
**skills.lc interactive prompt hangs:** The \`echo "q" | \` pipe handles this. If it still hangs, the 15s timeout kills it.
**skillsmp.com returns error:** Log it, continue with other 3 registries. Common errors: 401 (bad key), 429 (rate limit), 500 (server error).