免费图片解决方案
免费图片解决方案 - 重要图片用OpenAI免费额度,其他用免费图库,自动去水印
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 5 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
OpenClaw
Suspicious
medium confidencePurpose & Capability
Name/description match the code: scripts implement AI generation (OpenAI), free-stock search, batch processing, and watermark removal. Requiring python3 and OPENAI_API_KEY is proportional to the stated purpose.
Instruction Scope
SKILL.md instructs actions that don't consistently map to repository files and contains commands that may be surprising: references to scripts/remove_watermark.py, scripts/complete_workflow.sh, scripts/batch_process.sh and scripts/test_all.sh in the README/SKILL.md, but the repo uses different filenames (e.g., scripts/watermark_remover.py, simple_image_tools.sh, batch_processor.py) — this mismatch will cause confusion or silent failure. ai_generator.py auto-runs generation without an additional confirmation (if True branch) and main.py prints the first 15 characters of the OPENAI_API_KEY to stdout (leaks partial key to logs). SKILL.md also suggests installing with pip --break-system-packages, which can modify system Python environments and is potentially disruptive.
Install Mechanism
There is no registry install spec; SKILL.md lists pip packages (openai, requests, pillow) which is expected. No downloads from arbitrary URLs. However the use of pip with --break-system-packages is unusual and risky for system integrity and should be replaced with a virtualenv or user install.
Credentials
Only OPENAI_API_KEY is declared as the primary credential and the code uses it for image generation — that's expected. Minor concern: the code prints the first ~15 characters of the API key (main.py), which can leak sensitive information into logs; avoid printing any portion of secrets.
Persistence & Privilege
Skill does not request always:true, does not modify other skills, and is not requesting persistent elevated privileges. It runs local scripts and makes outbound network calls to OpenAI/stock sites as expected.
What to consider before installing
What to check before installing/using this skill:
- File/instruction mismatches: SKILL.md and example scripts reference filenames that are not present (e.g., remove_watermark.py, complete_workflow.sh, batch_process.sh, test_all.sh). Confirm and/or correct filenames before running the example commands.
- Review watermark removal policy and legality: automatic watermark removal can be legally or ethically problematic. The repo includes a note about watermark ethics, but you must ensure you only remove watermarks where permitted.
- Protect your OpenAI key: main.py prints a prefix of OPENAI_API_KEY to stdout — this may be captured in logs. Remove any code that prints or logs API keys (even partial) and avoid running in environments where logs are shared.
- Avoid breaking system Python: SKILL.md recommends pip install --break-system-packages. Instead use a virtual environment (venv) or pip --user to avoid altering system packages.
- Run in a sandbox first: execute the skill in an isolated environment (VM, container, or temp user account) so you can observe network activity and check that files referenced by the scripts exist and behave as expected.
- Prefer manual review/fix: fix the auto-execution pattern in ai_generator.py (the code currently auto-executes generation without an explicit user confirmation when called directly). Confirm the OpenAI client usage and the response handling are correct for your installed openai package version.
- Logging and outputs: inspect what the scripts write to disk (they sometimes create .txt simulation files) and remove or adjust any logic that uploads or prints sensitive local paths or data.
If you want, I can: (1) list exact lines that print the API key and the mismatched filenames/commands to help you patch them, or (2) generate a safe run checklist (commands to run in a sandbox) to validate behavior.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
Runtime requirements
🆓 Clawdis
Binspython3
Primary envOPENAI_API_KEY
SKILL.md
🆓 免费图片解决方案Skill
零成本搞定所有图片需求!
核心策略
| 图片类型 | 解决方案 | 成本 |
|---|---|---|
| 重要图片 | OpenAI免费额度生成 | $0.00 |
| 普通配图 | 免费图库下载 | $0.00 |
| 水印处理 | 智能去除工具 | $0.00 |
| 批量优化 | 开源工具处理 | $0.00 |
快速开始
1. 安装
# 设置OpenAI免费额度API密钥
export OPENAI_API_KEY="你的免费额度密钥"
# 安装技能依赖
cd {baseDir}
pip3 install openai requests pillow --break-system-packages
2. 基本使用
# 为文章生成图片
python3 scripts/main.py --text "文章内容" --output ./images
# 只生成重要图片(用免费额度)
python3 scripts/main.py --important-only --count 3
# 只搜索免费图片
python3 scripts/main.py --free-only --keywords "科技,商务" --count 10
3. 完整工作流
# 一键完成所有步骤
./scripts/complete_workflow.sh \
--input "文章.txt" \
--output ./final_images \
--budget 0
核心功能
1. 免费额度AI生成
# 使用OpenAI免费额度
python3 scripts/ai_generator.py \
--prompt "专业商务场景" \
--count 2 \
--budget 0.08 # 只用$0.08免费额度
免费额度计算:
- 新用户:$5-18免费额度
- 可生成:125-450张图片
- 建议:重要图片才用AI
2. 智能免费图库搜索
# 从多个免费图库搜索
python3 scripts/free_search.py \
--keywords "科技 创新" \
--sources unsplash,pexels \
--count 20 \
--no-watermark
支持图库:
- ✅ Unsplash - 商业免费
- ✅ Pexels - 商业免费
- ✅ Pixabay - 商业免费
- ⚠️ Freepik - 需署名
3. 一键去水印
# 自动去除水印
python3 scripts/remove_watermark.py \
--input ./watermarked \
--output ./clean \
--auto-detect
4. 批量优化
# 统一处理所有图片
./scripts/batch_process.sh \
--resize 1200x800 \
--quality 85 \
--format webp
使用示例
场景1:博客文章配图
# 生成10张图片,只用免费资源
python3 scripts/main.py \
--text "人工智能技术文章" \
--count 10 \
--ai-budget 0.12 # 只用$0.12免费额度
结果:
- 3张AI图片(重要图表)
- 7张免费图库图片
- 总成本:$0.00
场景2:商业报告
# 20页报告配图
python3 scripts/main.py \
--type report \
--pages 20 \
--output ./report_images
场景3:社交媒体
# 小红书帖子配图
python3 scripts/main.py \
--platform xiaohongshu \
--posts 5 \
--size 1080x1350
配置文件
config/settings.json:
{
"free_mode": true,
"max_ai_cost": 0.0,
"prefer_free_sources": true,
"watermark_removal": "auto",
"output_format": "webp",
"default_size": "1200x800"
}
项目结构
free-image-skill/
├── SKILL.md
├── scripts/
│ ├── main.py # 主入口
│ ├── ai_generator.py # AI生成(免费额度)
│ ├── free_search.py # 免费图库搜索
│ ├── watermark_remover.py # 去水印
│ └── batch_processor.py # 批量处理
├── config/
│ ├── settings.json # 配置
│ ├── sources.json # 免费图库配置
│ └── prompts.json # 提示词模板
└── examples/
└── demo/ # 使用示例
注意事项
- 免费额度有限:先规划重要图片
- 版权合规:确认免费图库许可
- 水印伦理:只去除允许的水印
- 质量平衡:重要内容用AI,普通用免费图
故障排除
# 测试所有组件
./scripts/test_all.sh
# 检查免费额度
python3 scripts/check_quota.py
# 验证图库访问
python3 scripts/test_sources.py
版本: 1.0.0
原则: 不花钱,免费办大事儿!
状态: ✅ 就绪
Files
15 totalSelect a file
Select a file to preview.
Comments
Loading comments…
