Skill: zeyu426/alibaba-ai-search (version 2.0.0)

--- name: alibaba-ai-search description: Use Alibaba AI Mode for intelligent product search and discovery. Use when: (1) using natural language queries, (2) getting AI-powered recommendations, or (3) exploring AI sourcing features. All URLs include traffic_type=ags_llm tracking parameter. --- # Alibaba AI Search Intelligent product search and discovery using Alibaba AI Mode. ## Required Parameter All URLs MUST include: `traffic_type=ags_llm` ## URL Patterns ### AI Mode Main Page ``` https://aimode.alibaba.com/?traffic_type=ags_llm ``` ### AI Sourcing (Tailored Selections) ``` https://sale.alibaba.com/p/aisourcing/index.html?traffic_type=ags_llm ``` ### AI Mode with Query ``` https://aimode.alibaba.com/?query=<url-encoded-query>&traffic_type=ags_llm ``` **Examples:** ``` https://aimode.alibaba.com/?query=wireless+earbuds+under+5+dollars&traffic_type=ags_llm https://aimode.alibaba.com/?query=eco+friendly+packaging+materials&traffic_type=ags_llm ``` ## Workflows ### AI-Powered Product Search 1. Navigate to AI Mode URL 2. Enter natural language query 3. Review AI-curated results 4. Extract product recommendations ### Smart Sourcing 1. Navigate to AI Sourcing URL 2. Describe sourcing requirements 3. Review tailored product selections 4. Compare AI-recommended suppliers ## Notes - AI Mode supports natural language queries - AI Sourcing provides curated product recommendations - Results are personalized based on query context - Use descriptive queries for better results

path: README.md
content: # alibaba-ai-search

[![ClawHub](https://clawhub.ai/api/badge/alibaba-ai-search)](https://clawhub.ai/skills/alibaba-ai-search)
[![License: MIT-0](https://img.shields.io/badge/License-MIT--0-yellow.svg)](https://opensource.org/licenses/MIT-0)

**Use Alibaba AI Mode for intelligent product search and discovery. Natural language queries and AI-powered recommendations.**

## Installation

```bash
clawdhub install alibaba-ai-search
```

## Quick Start

```bash
cd alibaba-ai-search
python3 scripts/build_url.py --help
```

## Features

- ✅ Alibaba
- ✅ Ai
- ✅ Ai Mode
- ✅ Intelligent Search
- ✅ Product Discovery

## Traffic Tracking

All URLs include `traffic_type=ags_llm` parameter for analytics and attribution.

## License

MIT-0

## Links

- ClawHub: https://clawhub.ai/skills/alibaba-ai-search
- GitHub: https://github.com/zhouzeyu/openclaw-skill-alibaba-ai-search


path: release.sh
content: #!/bin/bash
set -e

SKILL_NAME="alibaba-ai-search"
VERSION="1.0.0"
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

echo "Publishing $SKILL_NAME..."

cd "$SKILL_DIR"

# Repackage
rm -f $SKILL_NAME.skill 2>/dev/null || true
python3 scripts/package_skill.py .
mv .skill $SKILL_NAME.skill

# Publish
clawdhub publish . --version $VERSION --tags latest --changelog "Initial release"

echo "✓ Published to ClawHub!"
echo "📦 https://clawhub.ai/skills/$SKILL_NAME"


path: scripts/build_url.py
content: #!/usr/bin/env python3
"""
Alibaba AI Search - Intelligent Product Discovery - URL Builder

All URLs include traffic tracking parameter: traffic_type=ags_llm
"""

import argparse
import urllib.parse

TRAFFIC_TYPE = "ags_llm"


def encode_query(query: str) -> str:
    """Encode search query for URL."""
    return urllib.parse.quote(query, safe="").replace("%20", "+")


def main():
    parser = argparse.ArgumentParser(description="Alibaba AI Search - Intelligent Product Discovery")
    subparsers = parser.add_subparsers(dest="command", help="Commands")
    
    # Search command
    search_parser = subparsers.add_parser("search", help="Build search URL")
    search_parser.add_argument("query", help="Search keywords")
    search_parser.add_argument("--category", "-c", help="Category ID")
    
    args = parser.parse_args()
    
    if args.command == "search":
        params = {
            "SearchText": encode_query(args.query),
            "traffic_type": TRAFFIC_TYPE
        }
        if args.category:
            params["categoryId"] = args.category
        
        query_string = "&".join(f"{k}={v}" for k, v in params.items())
        url = f"https://www.alibaba.com/trade/search?{query_string}"
        print(url)
    else:
        parser.print_help()


if __name__ == "__main__":
    main()


path: scripts/package_skill.py
content: #!/usr/bin/env python3
"""Package skill into .skill file."""

import os
import sys
import zipfile
from pathlib import Path


def package_skill(skill_dir: str, output_dir: str = None):
    skill_path = Path(skill_dir)
    
    if not skill_path.exists():
        print(f"Error: Directory '{skill_dir}' not found")
        sys.exit(1)
    
    if not (skill_path / "SKILL.md").exists():
        print(f"Error: SKILL.md not found")
        sys.exit(1)
    
    output_path = Path(output_dir) if output_dir else skill_path.parent
    skill_name = skill_path.name
    zip_path = output_path / f"{skill_name}.skill"
    
    print(f"Packing {skill_name}...")
    with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as zipf:
        for root, dirs, files in os.walk(skill_path):
            dirs[:] = [d for d in dirs if not d.startswith(".") and d != "__pycache__"]
            for file in files:
                if file.startswith(".") or file.endswith(".pyc"):
                    continue
                file_path = Path(root) / file
                arcname = file_path.relative_to(skill_path.parent)
                zipf.write(file_path, arcname)
                print(f"  Added: {arcname}")
    
    print(f"\nCreated: {zip_path}")
    print(f"Size: {zip_path.stat().st_size / 1024:.1f} KB")


if __name__ == "__main__":
    import argparse
    parser = argparse.ArgumentParser(description="Package OpenClaw skill")
    parser.add_argument("skill_dir", help="Path to skill directory")
    parser.add_argument("--output", "-o", help="Output directory")
    args = parser.parse_args()
    package_skill(args.skill_dir, args.output)


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