mcpField
C
curl-search

curl-search

github.com/memtensorProductivity30688 installsUpdated 12w ago
Repository

About curl-search

curl-search is a skill for web searches using curl and public search engines. It offers engine selection and basic protections for query handling and shell command construction.

Key features

  1. 01Search with Baidu, Google, Bing, or DuckDuckGo
  2. 02Choose an engine by alias or configuration
  3. 03Limit the number of results
  4. 04Sanitize query input
  5. 05Encode queries for URLs

Use cases

  1. 01Search the web when dedicated search APIs are unavailable
  2. 02Select a search engine suited to a query or region

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/memtensor/skills-vote --skill curl-search

After installing, type/curl-searchin Claude Code to confirm it loaded.

Bundled filesscripts/search.sh

Details

From the project README

Curl Search Skill

Web search using curl + multiple search engines. This skill provides a lightweight alternative when dedicated search APIs are unavailable.

Supported Search Engines

EngineAliasDescription
BaidubdFast for China, default option
GooglegRequires proxy/VPN in China
BingbMicrosoft Bing
DuckDuckGoddgPrivacy-focused search

Usage Examples

Search for OpenClaw tutorial
Google search AI development
Find Python tutorials with bing

Requirements

  • curl - Command-line HTTP client
  • python3 - For URL encoding

Security Features

This skill includes several security enhancements:

1. Input Sanitization

Removes dangerous shell metacharacters that could be exploited:

sanitize_input() {
    local input="$1"
    echo "$input" | sed 's/[^a-zA-Z0-9 \_\-\.\~\x{4e00}-\x{9fff}]//g'
}
2. Command Injection Protection
  • Validates search engine selection
  • Restricts max results to 1-50
  • Checks for empty input after sanitization
3. URL Encoding

Uses Python's urllib.parse with safe='' parameter to properly encode special characters.

Installation

# Install via ClawHub
clawhub install curl-search

# Or manually
cd your-skills-dir
tar -xzf curl-search.tar.gz

Configuration

Set default search engine:

export SEARCH_ENGINE=google

Set max results:

export MAX_RESULTS=5

Limitations

  • Search results come from public search engines
  • May be blocked by anti-scraping measures
  • Google requires proxy/VPN in China

Version History

  • 2.0.0 - Security enhancements added
    • Input sanitization
    • Command injection protection
    • URL encoding improvements
  • 1.0.0 - Initial release

Comments

Markdown supported