Token导航 LogoToken导航TokenDH.com
开发权限需确认clawhub未标认证来源可访问clear审计通过

avatar-generator头像生成器

Agent Skill

avatar-generator 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,067

周安装

207

GitHub Stars

公开资料未说明

下载量

1,639
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:avatar-generator(头像生成器)
来源仓库:https://github.com/tobewin/avatar-generator
安装命令:
openclaw skills install avatar-generator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install avatar-generator

简介

生成六种风格的可定制头像,并可导出微信、QQ、Twitter、Discord 等社交媒体的多平台。

SKILL.md

name
avatar-generator
description
Professional avatar generator for social media and profiles. Use when user needs to create high-quality avatars for WeChat, QQ, Xiaohongshu, Twitter, Discord. Supports multiple styles: letter, geometric, gradient, abstract. Auto-export multi-platform sizes. 头像生成、头像制作、社交头像。
version
1.0.0
license
MIT-0
metadata
{"openclaw": {"emoji": "👤", "requires": {"bins": ["python3"], "env": []}}}
dependencies
pip install pillow

Avatar Generator

Professional avatar generator with 6 styles, multi-platform export, and customizable options.

Features

  • 🎨 6 Avatar Styles: Letter, Geometric, Gradient, Abstract, Pattern, Badge
  • 📱 Multi-Platform: Auto-export for 9+ platforms
  • 🎯 Customizable: Colors, shapes, sizes, fonts
  • Fast Generation: Local Pillow rendering
  • 🌍 Multi-Language: Chinese and English support

Supported Platforms

PlatformSizeShapePriority
WeChat640×640Square⭐⭐⭐⭐⭐
QQ100×100Square⭐⭐⭐⭐⭐
Xiaohongshu400×400Round⭐⭐⭐⭐
Weibo200×200Round⭐⭐⭐⭐
Twitter/X400×400Round⭐⭐⭐⭐
Discord128×128Round⭐⭐⭐
Reddit256×256Round⭐⭐⭐
Facebook170×170Round⭐⭐⭐
LinkedIn400×400Square⭐⭐⭐

Avatar Styles

1. Letter Avatar (Initial Letter)

  • Single letter or initials
  • Clean background
  • Professional look
  • Best for: Business, professional

2. Geometric Avatar

  • Abstract shapes
  • Modern design
  • Eye-catching
  • Best for: Tech, creative

3. Gradient Avatar

  • Smooth color transitions
  • Trendy look
  • Customizable
  • Best for: Social media

4. Abstract Avatar

  • Artistic patterns
  • Unique design
  • Stand out
  • Best for: Creative, personal

5. Pattern Avatar

  • Repeating elements
  • Structured design
  • Brand identity
  • Best for: Teams, companies

6. Badge Avatar

  • Circular frame
  • Official look
  • Identity badge
  • Best for: Certification, ID

Trigger Conditions

  • "Generate avatar" / "生成头像"
  • "Create WeChat avatar" / "做微信头像"
  • "Make social media avatar" / "生成社交头像"
  • "avatar-generator"

Python Code

from PIL import Image, ImageDraw, ImageFont
import os
import colorsys
import random

class AvatarGenerator:
    def __init__(self):
        self.platforms = {
            'wechat': {'size': (640, 640), 'shape': 'square'},
            'qq': {'size': (100, 100), 'shape': 'square'},
            'xiaohongshu': {'size': (400, 400), 'shape': 'round'},
            'weibo': {'size': (200, 200), 'shape': 'round'},
            'twitter': {'size': (400, 400), 'shape': 'round'},
            'discord': {'size': (128, 128), 'shape': 'round'},
            'reddit': {'size': (256, 256), 'shape': 'round'},
            'facebook': {'size': (170, 170), 'shape': 'round'},
            'linkedin': {'size': (400, 400), 'shape': 'square'},
        }
    
    def _load_font(self, size):
        """Load font with fallback"""
        paths = [
            '/System/Library/Fonts/PingFang.ttc',
            '/System/Library/Fonts/STHeiti Light.ttc',
            '/usr/share/fonts/truetype/noto/NotoSansCJK-Regular.ttc',
        ]
        for p in paths:
            if os.path.exists(p):
                try:
                    return ImageFont.truetype(p, size)
                except:
                    continue
        return ImageFont.load_default()
    
    def create_letter_avatar(self, letter, bg_color, text_color, size=(400, 400)):
        """Style 1: Letter avatar"""
        img = Image.new('RGB', size, bg_color)
        draw = ImageDraw.Draw(img)
        
        font = self._load_font(size[0] // 2)
        
        bbox = draw.textbbox((0, 0), letter, font=font)
        w, h = bbox[2] - bbox[0], bbox[3] - bbox[1]
        x, y = (size[0] - w) // 2, (size[1] - h) // 2
        
        draw.text((x, y), letter, font=font, fill=text_color)
        return img
    
    def create_geometric_avatar(self, colors, size=(400, 400)):
        """Style 2: Geometric avatar"""
        img = Image.new('RGB', size, colors[0])
        draw = ImageDraw.Draw(img)
        
        # Add geometric shapes
        center = size[0] // 2
        draw.ellipse([(50, 50), (size[0]-50, size[1]-50)], fill=colors[1])
        draw.regular_polygon((center, center, size[0]//3), 6, fill=colors[2])
        
        return img
    
    def create_gradient_avatar(self, color1, color2, size=(400, 400)):
        """Style 3: Gradient avatar"""
        import numpy as np
        
        img = np.zeros((size[1], size[0], 3), dtype=np.uint8)
        for y in range(size[1]):
            ratio = y / size[1]
            r = int(color1[0] * (1-ratio) + color2[0] * ratio)
            g = int(color1[1] * (1-ratio) + color2[1] * ratio)
            b = int(color1[2] * (1-ratio) + color2[2] * ratio)
            img[y, :] = [r, g, b]
        
        return Image.fromarray(img)
    
    def create_abstract_avatar(self, seed, colors, size=(400, 400)):
        """Style 4: Abstract avatar"""
        random.seed(seed)
        img = Image.new('RGB', size, colors[0])
        draw = ImageDraw.Draw(img)
        
        for _ in range(10):
            x, y = random.randint(0, size[0]), random.randint(0, size[1])
            r = random.randint(20, 100)
            color = random.choice(colors[1:])
            draw.ellipse([(x-r, y-r), (x+r, y+r)], fill=color)
        
        return img
    
    def create_pattern_avatar(self, pattern_type, colors, size=(400, 400)):
        """Style 5: Pattern avatar"""
        img = Image.new('RGB', size, colors[0])
        draw = ImageDraw.Draw(img)
        
        cell_size = 40
        for x in range(0, size[0], cell_size):
            for y in range(0, size[1], cell_size):
                if (x // cell_size + y // cell_size) % 2 == 0:
                    draw.rectangle([(x, y), (x+cell_size, y+cell_size)], fill=colors[1])
        
        return img
    
    def create_badge_avatar(self, text, bg_color, border_color, size=(400, 400)):
        """Style 6: Badge avatar"""
        img = Image.new('RGB', size, (255, 255, 255))
        draw = ImageDraw.Draw(img)
        
        # Draw circular badge
        margin = 20
        draw.ellipse([(margin, margin), (size[0]-margin, size[1]-margin)], 
                     fill=bg_color, outline=border_color, width=5)
        
        # Add text
        font = self._load_font(size[0] // 4)
        bbox = draw.textbbox((0, 0), text, font=font)
        w, h = bbox[2] - bbox[0], bbox[3] - bbox[1]
        x, y = (size[0] - w) // 2, (size[1] - h) // 2
        draw.text((x, y), text, font=font, fill='white')
        
        return img
    
    def make_round(self, img):
        """Make image circular"""
        size = img.size
        mask = Image.new('L', size, 0)
        draw = ImageDraw.Draw(mask)
        draw.ellipse([(0, 0), size], fill=255)
        
        result = Image.new('RGBA', size, (0, 0, 0, 0))
        result.paste(img, mask=mask)
        return result
    
    def export_multi_platform(self, img, output_dir, platforms=None):
        """Export for multiple platforms"""
        os.makedirs(output_dir, exist_ok=True)
        
        if platforms is None:
            platforms = list(self.platforms.keys())
        
        exported = []
        for platform in platforms:
            if platform in self.platforms:
                config = self.platforms[platform]
                resized = img.resize(config['size'], Image.LANCZOS)
                
                if config['shape'] == 'round':
                    resized = self.make_round(resized)
                
                path = os.path.join(output_dir, f'avatar_{platform}.png')
                resized.save(path)
                exported.append(path)
        
        return exported

# Example usage
gen = AvatarGenerator()

# Letter avatar
avatar1 = gen.create_letter_avatar('Z', (30, 60, 114), (255, 255, 255))

# Gradient avatar
avatar2 = gen.create_gradient_avatar((67, 142, 219), (30, 60, 114))

# Export to all platforms
gen.export_multi_platform(avatar1, 'output/')

Usage Examples

User: "Generate a WeChat avatar with blue background and white Z"
Agent: Create 640×640 letter avatar

User: "Make a gradient avatar for Xiaohongshu"
Agent: Create 400×400 round gradient avatar

User: "Create social media avatars"
Agent: Generate avatars for all platforms

Notes

  • All avatars generated locally with Pillow
  • No external API required
  • Cross-platform compatible
  • Supports Chinese and English text

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

95.22%
按下载量换算1,561

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills