Skill: mrjordandu/find-skills-for-clawhub (version 1.0.0)

--- name: find-skills-for-clawhub description: Search for and discover OpenClaw skills from ClawHub (the official skill registry). Activate when user asks about finding skills, installing skills, or wants to know what skills are available for OpenClaw. --- # Find Skills for ClawHub This skill helps you discover and install OpenClaw skills from the ClawHub registry (https://clawhub.ai). ## When to Use This Skill Use this skill when the user: - Asks "how do I do X with OpenClaw" where X might have an existing skill - Says "find a skill for X on ClawHub" or "what skills are available for OpenClaw" - Asks "can OpenClaw do X" where X is a specialized capability - Expresses interest in extending OpenClaw capabilities - Wants to search for tools, templates, or workflows in the ClawHub ecosystem - Mentions they wish they had help with a specific domain (design, testing, deployment, etc.) in OpenClaw ## Prerequisites ### 1. Install ClawHub CLI The ClawHub CLI is required to search and install skills. Install it globally: ```bash npm i -g clawhub ``` Or use it via npx (slower but no installation): ```bash npx clawhub search "query" ``` ### 2. Login (Optional for Publishing) For searching and installing, login is not required. For publishing your own skills: ```bash clawhub login ``` ## How to Search for Skills ### Basic Search ```bash clawhub search "query" ``` Examples: - `clawhub search "calendar"` - Find calendar-related skills - `clawhub search "weather"` - Find weather forecasting skills - `clawhub search "devops"` - Find DevOps and deployment skills ### Search with Limit ```bash clawhub search "query" --limit 10 ``` ## How to Install Skills Once you find a skill you want to install: ```bash clawhub install <skill-slug> ``` Example: ```bash clawhub install weather-forecast ``` Skills are installed into your OpenClaw workspace's `skills` directory. OpenClaw will automatically load them in the next session. ## Common Skill Categories When searching, consider these common categories: | Category | Example Queries | |----------|-----------------| | **Web Development** | react, nextjs, typescript, css, tailwind | | **Testing** | testing, jest, playwright, e2e | | **DevOps** | deploy, docker, kubernetes, ci-cd | | **Documentation** | docs, readme, changelog, api-docs | | **Code Quality** | review, lint, refactor, best-practices | | **Design** | ui, ux, design-system, accessibility | | **Productivity** | workflow, automation, git, todo | | **APIs & Services** | api, rest, graphql, database | | **AI & ML** | machine-learning, openai, embeddings | | **Hardware** | raspberry-pi, iot, sensors, camera | ## Integration with OpenClaw (AI Assistant Guide) As an AI assistant using this skill, follow these steps when a user asks about OpenClaw capabilities: ### Step 1: Check if ClawHub CLI is available First, check if `clawhub` is installed by running: ```bash clawhub --version ``` If not installed, inform the user and offer to install it: ```bash npm i -g clawhub ``` Alternatively, you can use `npx clawhub` (slower but works without installation). ### Step 2: Search for relevant skills Run the search command with the user's query: ```bash clawhub search "query" --limit 5 ``` Or using npx: ```bash npx clawhub search "query" --limit 5 ``` ### Step 3: Parse and present results Typical output format: ``` Search results for "weather": 1. weather-forecast v1.2.0 (1,234 installs) - Provides weather forecasts using Open-Meteo API - Tags: weather, api, forecast 2. weather-alerts v0.5.1 (845 installs) - Sends weather alerts and notifications - Tags: weather, alerts, notifications Install with: clawhub install <skill-slug> ``` Present results to the user with: 1. Skill name and version 2. Install count (popularity indicator) 3. Brief description 4. Relevant tags 5. Installation command ### Step 4: Offer to install If the user wants to install a skill: ```bash clawhub install <skill-slug> ``` Or using npx: ```bash npx clawhub install <skill-slug> ``` ### Step 5: Handle no results If no skills are found: 1. Acknowledge that no existing skill was found 2. Offer to help with the task directly using your general capabilities 3. Suggest the user could create their own skill with `clawhub init` ## Example Workflow ### User: "How can OpenClaw help me with weather forecasts?" 1. **Search for skills**: ```bash clawhub search "weather forecast" ``` 2. **Present results**: ``` Found 3 weather-related skills on ClawHub: 1. weather-forecast (1.2K installs) - Provides weather forecasts using Open-Meteo API - Install: `clawhub install weather-forecast` 2. weather-alerts (845 installs) - Sends weather alerts and notifications - Install: `clawhub install weather-alerts` 3. travel-weather (312 installs) - Weather planning for travel itineraries - Install: `clawhub install travel-weather` ``` 3. **Offer installation**: ``` Would you like me to install any of these skills for you? ``` ## Advanced Usage ### Update Installed Skills Check for updates to all installed skills: ```bash clawhub update --all ``` ### List Installed Skills See what skills you have installed: ```bash clawhub list ``` ### Publish Your Own Skills If you create a skill you want to share: ```bash clawhub publish ./my-skill-folder --slug my-skill --name "My Skill" --version 1.0.0 ``` ### Sync Local Skills Back up your local skills to ClawHub: ```bash clawhub sync --all ``` ## Tips for Effective Searches 1. **Use specific keywords**: "react testing" is better than just "testing" 2. **Try alternative terms**: If "deploy" doesn't work, try "deployment" or "ci-cd" 3. **Browse categories**: Visit https://clawhub.ai to browse skills by category 4. **Check popularity**: More installs usually indicates a more mature skill ## Troubleshooting ### "clawhub command not found" - Install with `npm i -g clawhub` - Or use `npx clawhub` instead ### "No skills found" - Try broader search terms - Check https://clawhub.ai to see if skills exist in that category - Consider creating your own skill with `clawhub init` ### "Permission denied" when installing - Make sure you have write permissions to the OpenClaw workspace - Skills install to `<workspace>/skills` by default ## Related Skills - **skill-creator**: Create and package your own OpenClaw skills - **find-skills**: Search for skills in the broader AI skills ecosystem (skills.sh) ## Learn More - **ClawHub Website**: https://clawhub.ai - **OpenClaw Skills Documentation**: https://docs.openclaw.ai/tools/skills - **Discord Community**: https://discord.com/invite/clawd --- *This skill helps bridge the gap between users' needs and the growing ecosystem of OpenClaw skills on ClawHub.*

path: DEVELOPMENT.md
content: # Development Guide: find-skills-for-clawhub

This document describes how to create a ClawHub search skill for OpenClaw, similar to the existing `find-skills` skill for the skills.sh ecosystem.

## Overview

The goal is to create an OpenClaw skill that helps users discover and install skills from the ClawHub registry (https://clawhub.ai). This skill should:

1. Guide users on installing the ClawHub CLI
2. Provide search functionality for finding skills
3. Show how to install discovered skills
4. Integrate seamlessly with OpenClaw's skill system

## Prerequisites

- OpenClaw installation
- Node.js and npm (for ClawHub CLI)
- Basic understanding of OpenClaw skills structure

## Step 1: Skill Structure

A OpenClaw skill typically consists of:

```
find-skills-for-clawhub/
├── SKILL.md              # Main skill documentation
├── scripts/              # Optional helper scripts
│   ├── search-clawhub.ps1
│   └── search-clawhub.sh
└── DEVELOPMENT.md       # This file
```

## Step 2: SKILL.md Content

The `SKILL.md` file is the core of the skill. It should include:

1. **Metadata** (YAML frontmatter): Name and description
2. **When to Use**: Trigger conditions for the skill
3. **Prerequisites**: Installation requirements
4. **Usage Instructions**: How to search and install
5. **AI Assistant Guide**: Specific steps for the AI to follow
6. **Examples**: Common workflows
7. **Troubleshooting**: Common issues and solutions

## Step 3: Integration Points

### 3.1. CLI Tool Integration

The skill relies on the ClawHub CLI. You have two options:

1. **Global installation** (recommended):
   ```bash
   npm i -g clawhub
   ```

2. **npx usage** (no installation):
   ```bash
   npx clawhub search "query"
   ```

### 3.2. OpenClaw Tool Usage

When implementing this skill, the AI assistant can use OpenClaw's `exec` tool to run ClawHub commands:

```javascript
// Example tool call in AI thinking
exec({
  command: 'clawhub search "weather" --limit 5'
})
```

### 3.3. Skill Activation

The skill should activate when users ask about:
- Finding OpenClaw skills
- "How do I do X with OpenClaw?"
- Searching for capabilities
- Installing new skills

## Step 4: Search Implementation

### 4.1. Basic Search Flow

```mermaid
graph TD
    A[User asks about skill] --> B{ClawHub installed?}
    B -->|Yes| C[Search with clawhub]
    B -->|No| D[Offer installation<br/>or use npx]
    D --> C
    C --> E{Results found?}
    E -->|Yes| F[Present results<br/>with install commands]
    E -->|No| G[Suggest alternatives]
    F --> H[Offer installation]
```

### 4.2. Command Examples

```bash
# Search
clawhub search "weather forecast" --limit 5

# Install
clawhub install weather-forecast

# List installed
clawhub list

# Update all
clawhub update --all
```

### 4.3. Output Parsing

Typical search output format:
```
Search results for "weather":

1. weather-forecast v1.2.0 (1,234 installs)
   - Provides weather forecasts using Open-Meteo API
   - Tags: weather, api, forecast
   
2. weather-alerts v0.5.1 (845 installs)
   - Sends weather alerts and notifications
   - Tags: weather, alerts, notifications
   
Install with: clawhub install <skill-slug>
```

## Step 5: Helper Scripts (Optional)

You can create helper scripts to simplify the process:

- `scripts/search-clawhub.ps1`: PowerShell script for Windows
- `scripts/search-clawhub.sh`: Bash script for Linux/macOS

These scripts handle:
- Checking if ClawHub is installed
- Falling back to npx if needed
- Error handling (rate limits, network issues)
- Formatting output

## Step 6: Testing the Skill

1. **Install ClawHub CLI**:
   ```bash
   npm i -g clawhub
   ```

2. **Test search functionality**:
   ```bash
   clawhub search "test" --limit 2
   ```

3. **Test installation** (with a real skill):
   ```bash
   clawhub install weather-forecast  # if exists
   ```

4. **Test in OpenClaw**:
   - Place skill in OpenClaw skills directory
   - Start new OpenClaw session
   - Ask "How can I find skills for weather forecasts?"

## Step 7: Publishing to ClawHub

Once your skill is ready, you can publish it to ClawHub:

1. **Login to ClawHub**:
   ```bash
   clawhub login
   ```

2. **Publish the skill**:
   ```bash
   clawhub publish ./find-skills-for-clawhub \
     --slug find-skills-for-clawhub \
     --name "Find Skills for ClawHub" \
     --version 1.0.0 \
     --tags "discovery,skills,clawhub"
   ```

3. **Or use sync** (for multiple skills):
   ```bash
   clawhub sync --all
   ```

## Step 8: Advanced Features (Optional)

### 8.1. Caching Search Results

To avoid rate limits, you could implement caching:

```bash
# Simple file-based cache
CACHE_DIR="$HOME/.cache/clawhub-searches"
mkdir -p "$CACHE_DIR"
CACHE_FILE="$CACHE_DIR/$(echo "$QUERY" | md5sum | cut -d' ' -f1).txt"
```

### 8.2. Integration with OpenClaw Memory

Store frequently searched terms in OpenClaw's memory system:
- Update `memory/YYYY-MM-DD.md` with search history
- Track which skills users install frequently

### 8.3. Skill Recommendations

Based on user queries, recommend related skills:
- If user searches for "weather", also suggest "calendar" and "travel" skills
- Maintain a skill taxonomy/tag system

## Step 9: Common Issues and Solutions

### 9.1. Rate Limiting

**Issue**: `Rate limit exceeded` error
**Solutions**:
- Log in with `clawhub login`
- Implement caching
- Use fewer searches per minute

### 9.2. ClawHub CLI Not Found

**Issue**: `clawhub: command not found`
**Solutions**:
- Install with `npm i -g clawhub`
- Use npx: `npx clawhub search`
- Check PATH environment variable

### 9.3. No Search Results

**Issue**: No skills found for query
**Solutions**:
- Try broader search terms
- Check https://clawhub.ai directly
- Consider creating the skill yourself

### 9.4. Permission Issues

**Issue**: Cannot install skills
**Solutions**:
- Check workspace permissions
- Run as administrator (if needed)
- Use `--workdir` flag to specify install location

## Step 10: Future Enhancements

1. **Web API Integration**: Direct API calls instead of CLI
2. **GUI Interface**: Browser-based skill discovery
3. **Skill Ratings**: Display user ratings and reviews
4. **Dependency Tracking**: Show skill dependencies
5. **Version Compatibility**: Check skill compatibility with OpenClaw version

## Related Resources

- [ClawHub Documentation](https://docs.openclaw.ai/tools/clawhub)
- [OpenClaw Skills Guide](https://docs.openclaw.ai/tools/skills)
- [ClawHub Website](https://clawhub.ai)
- [OpenClaw Discord](https://discord.com/invite/clawd)

## Conclusion

Creating a `find-skills-for-clawhub` skill involves:
1. Understanding ClawHub CLI capabilities
2. Designing a user-friendly search interface
3. Handling edge cases (installation, rate limits)
4. Integrating with OpenClaw's skill system

This skill helps bridge the gap between users' needs and the growing ecosystem of OpenClaw skills, making it easier for users to extend their assistant's capabilities.

---

*Last updated: $(date)*

path: scripts/search-clawhub.sh
content: #!/usr/bin/env bash
#
# Search for OpenClaw skills on ClawHub registry.
#
# Usage:
#   ./search-clawhub.sh "query" [limit]
#   ./search-clawhub.sh "react testing" 10
#

set -euo pipefail

QUERY="${1:-}"
LIMIT="${2:-5}"

if [[ -z "$QUERY" ]]; then
    echo "Usage: $0 \"query\" [limit]"
    echo "Example: $0 \"weather\" 5"
    exit 1
fi

# Check for clawhub or npx
if command -v clawhub &> /dev/null; then
    CLAWHUB_CMD="clawhub"
elif command -v npx &> /dev/null; then
    CLAWHUB_CMD="npx clawhub"
    echo "[INFO] Using npx (clawhub not installed globally)"
else
    echo "[ERROR] Neither clawhub nor npx found. Install with: npm i -g clawhub"
    echo "[INFO] Or install Node.js to use npx."
    exit 1
fi

echo "[INFO] Searching ClawHub for: '$QUERY' (Limit: $LIMIT)"

# Run search command
set +e
OUTPUT=$($CLAWHUB_CMD search "$QUERY" --limit "$LIMIT" 2>&1)
EXIT_CODE=$?
set -e

if [[ $EXIT_CODE -ne 0 ]] || [[ "$OUTPUT" =~ [Ee]rror: ]] || [[ "$OUTPUT" =~ "×" ]]; then
    echo "[ERROR] Search failed:"
    echo "$OUTPUT"
    
    # Check for rate limit
    if [[ "$OUTPUT" =~ "Rate limit exceeded" ]]; then
        echo "[WARNING] Rate limit exceeded. Try logging in with: clawhub login"
        echo "[WARNING] Or wait a few minutes before trying again."
    fi
    
    exit 1
fi

echo "[SUCCESS] Search completed!"
echo ""
echo "=== ClawHub Search Results ==="
echo "$OUTPUT"
echo "================================"

# Check for no results
if [[ "$OUTPUT" =~ "No skills found" ]] || [[ -z "$(echo "$OUTPUT" | grep -v '^$')" ]]; then
    echo "[WARNING] No skills found for query: '$QUERY'"
    echo "[INFO] Try different search terms or browse at: https://clawhub.ai"
fi

echo "[INFO] To install a skill, use: $CLAWHUB_CMD install <skill-slug>"

Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)