音频关键字过滤工具 - 根据关键字配置自动识别并删除音频中的指定内容
日本語の概要は準備中です。原文の説明を表示しています。
通用图片生成 Skill,支持多种 AI 模型(ModelScope、Gemini、RunningHub 等),可被其他 Skills 调用
インストールする前に、エージェントに与えられる指示の中身を確認できます。
通用的图片生成服务,支持多种 AI 模型,可被其他 Skills 直接调用。
# 基本用法(默认使用 gemini)
python3 ~/.claude/skills/image-generator/generate_image.py "A golden cat"
# 指定 API 类型
python3 ~/.claude/skills/image-generator/generate_image.py "A golden cat" --api-type modelscope
# RunningHub 文生图
python3 ~/.claude/skills/image-generator/generate_image.py \
"一只金色的猫在阳光下打盹" \
--api-type runninghub
# 指定输出路径
python3 ~/.claude/skills/image-generator/generate_image.py "A golden cat" --output /path/to/image.jpg
# 参考图编辑/身份保持(Gemini 图片模型)
python3 ~/.claude/skills/image-generator/generate_image.py \
"保留人物身份,改为正面摄影棚头肩照" \
--reference-image /path/to/person.png \
--size 1024x1280 \
--output /path/to/portrait.png
# 指定模型
python3 ~/.claude/skills/image-generator/generate_image.py "A golden cat" --model "Tongyi-MAI/Z-Image-Turbo"
# 测试模式(无需 API Key)
python3 ~/.claude/skills/image-generator/generate_image.py "A golden cat" --test
import sys
from pathlib import Path
# 添加 image-generator skill 到路径
image_gen_path = Path.home() / ".claude/skills/image-generator"
sys.path.insert(0, str(image_gen_path))
from generate_image import ImageGenerator
# 创建生成器实例(不传 api_type 时从 config.json 的 default_api 读取)
generator = ImageGenerator()
# 生成图片
image_path = generator.generate(
prompt="A beautiful landscape",
output_path="/path/to/output.jpg"
)
print(f"图片已生成: {image_path}")
# RunningHub 文生图示例
from generate_image import ImageGenerator
generator = ImageGenerator(api_type="runninghub")
image_path = generator.generate(
prompt="一只金色的猫在阳光下打盹",
output_path="/path/to/output.jpg"
)
cp ~/.claude/skills/image-generator/config.json.example ~/.claude/skills/image-generator/config.json
配置文件位于:~/.claude/skills/image-generator/config.json
{
"default_api": "runninghub",
"modelscope": {
"base_url": "https://api-inference.modelscope.cn/",
"api_key": "your-modelscope-token-here",
"model": "Tongyi-MAI/Z-Image-Turbo",
"timeout": 300,
"poll_interval": 5
},
"gemini": {
"api_key": "your-gemini-api-key-here",
"model": "gemini-3-pro-image-preview",
"api_url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image-preview:generateContent",
"timeout": 120,
"size": "1024x1024",
"quality": "standard"
},
"runninghub": {
"base_url": "https://www.runninghub.cn/openapi/v2",
"api_key": "your-runninghub-api-key-here",
"model": "rhart-image-n-g31-flash/text-to-image",
"timeout": 300,
"poll_interval": 5,
"resolution": "2k"
},
"output_dir": "~/Downloads/shell/work/generated_images",
"image_format": "jpg",
"quality": 95
}
通用配置:
default_api: 默认使用的 API(modelscope、gemini 或 runninghub)output_dir: 图片输出目录image_format: 图片格式(jpg、png、webp)quality: 图片质量(1-100)ModelScope 配置:
base_url: ModelScope API 地址api_key: ModelScope API Token(从 https://modelscope.cn 获取)model: 使用的模型名称timeout: 请求超时时间(秒)poll_interval: 轮询间隔(秒)Gemini 配置:
api_key: Google Gemini API Key(从 https://ai.google.dev 获取)model: 使用的模型名称(如 gemini-3-pro-image-preview)api_url: API 端点地址timeout: 请求超时时间(秒)size: 图片尺寸(如 1024x1024)quality: 生成质量(standard 或 high)RunningHub 配置:
base_url: RunningHub OpenAPI 地址api_key: RunningHub API Keymodel: 使用的模型路径(如 rhart-image-n-g31-flash/text-to-image)timeout: 请求超时时间(秒)poll_interval: 轮询间隔(秒)resolution: 默认分辨率(如 2k)注意:
config.json 包含敏感的 API Key,已被 .gitignore 忽略config.json.example 作为模板参考Tongyi-MAI/Z-Image-Turbo - 高速图片生成damo/text-to-image-synthesis - 文本到图片gemini-3-pro-image-preview - Gemini 3 Pro 图片生成rhart-image-n-g31-flash/text-to-image - 文生图(2K 分辨率)generator.generate(
prompt: str, # 图片描述(必需)
output_path: str = None, # 输出路径(可选)
model: str = None, # 指定模型(可选)
size: str = "1024x1024", # 图片尺寸
quality: str = "standard", # 生成质量
style: str = None, # 风格(可选)
timeout: int = 300, # 超时时间(秒)
max_retries: int = 3, # 最大重试次数
test_mode: bool = False, # 测试模式
reference_images: list[str] = None # Gemini 参考图片,可传多张
) -> str # 返回图片路径
支持测试模式,无需配置 API Key 即可快速测试图片生成流程:
# 命令行使用测试模式
python3 ~/.claude/skills/image-generator/generate_image.py "A golden cat" --test
# Python 代码中使用测试模式
generator = ImageGenerator(api_type="gemini")
image_path = generator.generate(
prompt="A beautiful landscape",
test_mode=True # 启用测试模式
)
测试模式会生成一张包含提示词内容的示例图片,适合在开发调试或无网络环境时使用。
python3 ~/.claude/skills/image-generator/generate_image.py "A futuristic city"
python3 ~/.claude/skills/image-generator/generate_image.py "A golden cat" --test
from generate_image import ImageGenerator
gen = ImageGenerator()
image = gen.generate("A beautiful sunset over the ocean")
print(f"Generated: {image}")
# 在 write-article skill 中
from pathlib import Path
import sys
sys.path.insert(0, str(Path.home() / ".claude/skills/image-generator"))
from generate_image import ImageGenerator
def generate_article_cover(title):
gen = ImageGenerator()
cover_image = gen.generate(
prompt=f"Professional article cover for: {title}",
output_path=f"./covers/{title}.jpg"
)
return cover_image
API Key 配置:
网络要求:
生成时间:
成本考虑:
输出格式:
错误: Unauthorized
解决: 检查 config.json 中的 API Key 是否正确
错误: Timeout
解决: 增加 config.json 中的 timeout 值
错误: Connection Error
解决: 检查网络连接,某些 API 可能需要科学上网
MIT
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
音频关键字过滤工具 - 根据关键字配置自动识别并删除音频中的指定内容
日本語の概要は準備中です。原文の説明を表示しています。
🔥 用 Gordon Ramsay 风格毒舌吐槽代码质量,生成搞笑且实用的代码审查报告
日本語の概要は準備中です。原文の説明を表示しています。
Automate the full QuarkPanTool → mswnlz GitHub content publishing pipeline. Supports Quark / Baidu / Aliyun drives with multi-account rotation. Use when the user provides share URLs and wants: (1) auto-detect drive type and route to correct handler, (2) save resources with automatic account rotation, (3) clean junk files from shared folders, (4) copy promotional files into each folder, (5) generate permanent encrypted share links, (6) auto-classify items into local content dirs (book/movies/AIknowledge/tools/etc.), (7) append/update YYYYMM.md and README index, (8) local git commit, (9) send unified Telegram notifications to multiple groups, (10) rebuild site and deploy to Cloudflare Pages.
日本語の概要は準備中です。原文の説明を表示しています。
文本转语音工具 - 默认 MiniMax TTS,支持切换 Edge TTS 和 Kokoro TTS (v1.1-zh)
日本語の概要は準備中です。原文の説明を表示しています。
视频变声处理工具 - 从视频提取音频,调用 voice-changer skill 变声后合并回视频。用户要求视频变声、给视频换声音、视频音色转换或处理视频音频时使用。
日本語の概要は準備中です。原文の説明を表示しています。
音频变声处理工具 - 使用 RVC AI 模型进行真实的声音转换,支持视频直接输入
日本語の概要は準備中です。原文の説明を表示しています。