miniprogram-icon-downloader

# Mini Program Icon Downloader

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "miniprogram-icon-downloader" with this command: npx skills add SHYXIN/miniprogram-icon-downloader

Mini Program Icon Downloader

A skill for downloading icons and images for WeChat Mini Program projects. Search icons from Icons8 API and download them using curl or other tools. Supports TabBar icon download with 81x81 size specification.

Features

  • Download TabBar icons for mini program
  • Download images from Icons8 API directly
  • Search and download icons with specific sizes and platforms
  • Download multiple icon sets for different states (normal/active)
  • Initialize new mini program projects with standard icon sets

Installation

Installation via Skills (Recommended)

# Install the skill using npx
npx skills add SHYXIN/miniprogram-icon-downloader

Manual Installation

# Install dependencies
pip install requests

# Download the skill file
curl -s -o miniprogram_icon_downloader.py https://raw.githubusercontent.com/SHYXIN/miniprogram-icon-downloader/main/miniprogram_icon_downloader.py

This skill uses curl for downloading files. Ensure curl is available in your environment.

Usage

Basic Usage

from miniprogram_icon_downloader import download_icons

tabs = [
  { "name": "ai", "text": "AI创作", "search_query": "ai brain artificial intelligence" },
  { "name": "dev", "text": "开发工具", "search_query": "code programming developer" },
  { "name": "text", "text": "文本工具", "search_query": "text document editing" },
  { "name": "material", "text": "素材库", "search_query": "library collection folder" }
]

download_icons('path/to/your/mini-program', tabs)

Custom Configuration

from miniprogram_icon_downloader import download_icons

customIcons = [
  { "name": "home", "search_query": "home house", "size": 64 },
  { "name": "profile", "search_query": "user profile", "size": 64 },
  { "name": "settings", "search_query": "settings gear", "size": 64 }
]

download_icons('path/to/your/mini-program', customIcons, {
  "icon_dir": "assets/icons",
  "states": ["normal"]
})

Search and Download Manually

from miniprogram_icon_downloader import search_icons, download_single_icon

# Search for icons
icons = search_icons("camera", 81, "ios", 5)

# Download first result
if len(icons) > 0:
    download_single_icon(icons[0]["url"], "camera", "path/to/icons")

API Reference

download_icons(project_path, icon_configs, options={})

Download icons for mini program projects with flexible configuration using Icons8 API.

Parameters:

  • project_path: Path to mini program project directory
  • icon_configs: Array of icon configuration objects
  • options: Configuration options

Icon Configuration Object:

{
  "name": "icon_name",           # Icon filename prefix
  "search_query": "search term",  # Search query for Icons8 API
  "text": "Tab text",           # TabBar text (optional)
  "size": 81,                   # Icon size (default: 81)
  "platform": "ios",            # Icon platform (default: "ios")
  "states": ["normal", "active"] # Icon states to download (default: ["normal", "active"])
}

Options:

{
  "icon_dir": "images",         # Icon directory (default: "images")
  "states": ["normal", "active"] # Icon states to download (default: ["normal", "active"])
}

search_icons(query, size=81, platform='fluent', amount=1)

Search for icons using Icons8 API.

Parameters:

  • query: Search term for the icon
  • size: Size of the icon in pixels (default: 81)
  • platform: Icon platform/style (default: 'ios')
  • amount: Number of results to return (default: 1)

Returns: List of icon objects with URL and metadata.

download_icon(url, output_path)

Download a single icon from URL to specified path.

Parameters:

  • url: URL of the icon
  • output_path: Output file path

Icon Size Specifications

For WeChat Mini Program:

  • TabBar icons: 81x81 pixels (recommended)
  • Navigation icons: 24x24 to 32x32 pixels
  • Action icons: 48x48 pixels
  • Large icons: 128x128 pixels

Search Tips

Use these general approaches for better icon search results:

  • Use simple, descriptive terms (e.g., "home", "user", "settings")
  • Try action words for functions (e.g., "search", "download", "edit")
  • Use object names for items (e.g., "phone", "computer", "car")
  • Consider synonyms if first search doesn't work
  • Think about what the icon represents conceptually
  • Use single words or short phrases for best results

Error Handling

The skill handles common errors:

  • Icon not found in search results
  • Download failures
  • File system errors

If an icon cannot be downloaded, the skill will skip it and continue with others.

Dependencies

  • curl: Must be available in the system
  • Python 3.7+: Must be installed
  • requests: pip install requests
  • Icons8 API access: Direct API access to https://api.icons8.com

Notes

  • All icons are downloaded to project_path/{icon_dir}/ directory
  • Icon filenames follow the pattern: {name}-{state}.png
  • The skill automatically handles both normal and active state icons
  • For TabBar, ensure icons are placed in the correct directory structure
  • Supports custom icon sizes and platforms

Best Practices

  1. Consistent naming: Use clear, descriptive icon names
  2. Standard sizes: Use 81x81 for TabBar, 24x24 for navigation
  3. Color consistency: Choose icons that match your design system
  4. Error handling: Implement proper error handling in production
  5. Caching: Consider caching downloaded icons for repeated use

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated
Coding

clawhub-rate-limited-publisher

Queue and publish local skills to ClawHub with a strict 5-per-hour cap using the local clawhub CLI and host scheduler.

Archived SourceRecently Updated