← 返回 Skills 市场
zhangj85

Horoscope Daily China

作者 zhangj85 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
63
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install horoscope-daily-china
功能描述
Create 12 constellation fortune images with TianAPI - 5-page output with large fonts for social media publishing (Xiaohongshu/Douyin/Toutiao)
使用说明 (SKILL.md)

Daily Horoscope Creator (每日星座运势生成器)

数据源: 天行数据 TianAPI(星座运势 + 星座配对)
输出规格: 5 页 PNG 图片(1080x1400 像素)
版本: 1.0.0
适用平台: 小红书 / 抖音 / 今日头条


🚀 快速开始

安装

npx clawhub@latest install daily-horoscope

配置

  1. 复制配置文件模板:
cd skills/daily-horoscope/scripts
cp config.json.example config.json
  1. 编辑 config.json,填写你的天行数据 API Key:
{
  "tianapi": {
    "key": "your_actual_api_key_here"
  }
}

💡 获取 API Key:天行数据官网(免费版 100 次/天)

使用

# 生成今日星座运势
python scripts/generate_horoscope_tianapi.py

# 生成指定日期
python scripts/generate_horoscope_tianapi.py --date 2026-04-16

# 指定模板(1-5)
python scripts/generate_horoscope_tianapi.py --template 1

# 指定输出目录
python scripts/generate_horoscope_tianapi.py --output ./my-output

✨ 功能特性

功能 说明
12 星座运势 基于天行数据 API,每日更新
5 种运势指数 综合 / 爱情 / 工作 / 财运 / 健康
开运指南 幸运色、幸运数字、速配星座(API真实数据)
星座配对 6 对热门配对指数
5 套模板 星空紫 / 海洋蓝 / 玫瑰金 / 极简黑 / 温暖橙
社交媒体优化 1080x1400 尺寸,适合小红书/抖音/头条
发布文案 自动生成今日头条格式文案

📐 输出规格

图片参数

参数 说明
尺寸 1080 × 1400 px 9:12.96 竖版比例
格式 PNG 高质量无损
质量 95% 平衡清晰度与文件大小
单页大小 70-200 KB 适合网络传播

5 页内容

页码 内容 说明
p1 封面 + 红榜TOP3 + 完整排名 + 配对 + 开运 精华汇总
p2 详细运势 1-3 名 天秤座、摩羯座、双鱼座...
p3 详细运势 4-6 名 狮子座、处女座、射手座...
p4 详细运势 7-9 名 双子座、巨蟹座、白羊座...
p5 详细运势 10-12 名 水瓶座、金牛座、天蝎座...

5 套配色模板

编号 名称 风格 背景
1 星空紫 神秘梦幻 深色 #1A0A2E
2 海洋蓝 清新深邃 深色 #0A1628
3 玫瑰金 轻奢优雅 浅色 #F8F0E6
4 极简黑 现代酷炫 深色 #1C1C1C
5 温暖橙 活力阳光 浅色 #FFF5E6

📋 发布指南

小红书

  • 最佳时间: 20:00-22:00
  • 使用图片: p1(封面)+ p2/p3(精选)
  • 文案: 自动生成 + 添加 #星座 #今日运势 标签

抖音

  • 最佳时间: 18:00-21:00
  • 使用图片: p1 + p2
  • 建议: 制作成视频(Ken Burns效果 + 背景音乐)

今日头条

  • 最佳时间: 06:30 / 12:00
  • 使用图片: 5 页完整版
  • 文案: 使用自动生成的发布文案

🔧 技术细节

依赖

  • Python 3.8+
  • Pillow >= 9.0.0
  • Requests >= 2.25.0

API 调用

API 次数/日 说明
星座运势 12 次 12 星座各 1 次
星座配对 6 次 6 对热门配对
总计 18 次 免费额度 100 次/天

数据来源

来自天行数据 API(每日变化)

  • ✅ 综合/爱情/工作/财运/健康指数
  • ✅ 幸运颜色
  • ✅ 幸运数字
  • ✅ 速配星座(贵人星座)
  • ✅ 今日概述

注意:API 不提供幸运方位、幸运时段、提防星座,故不显示


📁 文件结构

daily-horoscope/
├── SKILL.md                      # 技能说明
├── package.json                  # 包信息
├── LICENSE                       # MIT 许可证
├── scripts/
│   ├── generate_horoscope_tianapi.py  # 主脚本
│   ├── constellation_data.py          # 星座数据
│   ├── pair_descriptions.py           # 配对描述
│   ├── config.json                    # 配置文件(需手动创建)
│   ├── config.json.example            # 配置模板
│   ├── .gitignore                     # 忽略规则
│   └── README.md                      # 脚本使用说明
├── references/
│   └── horoscope-image-standard.md    # 图片标准
└── archive/                           # 归档
    └── generate_horoscope.py          # 旧版脚本

⚠️ 注意事项

  1. API Key 安全

    • config.json 包含敏感信息,请勿提交到 Git
    • 已添加到 .gitignore,不会被跟踪
    • 使用 config.json.example 作为模板
  2. API 配额

    • 天行数据免费版:100 次/天
    • 本技能每日消耗:18 次
    • 建议完成实名认证提升配额
  3. 内容合规

    • 已添加"娱乐参考 切勿迷信"免责声明
    • 符合各大平台内容规范
  4. 字体版权

    • 使用系统自带字体(黑体/微软雅黑)
    • 无版权风险

📝 更新日志

v1.0.0 (2026-04-16)

  • ✅ 初始版本发布
  • ✅ 天行数据 API 集成
  • ✅ 5 页标准格式输出
  • ✅ 5 套配色模板
  • ✅ 配置文件管理(安全)
  • ✅ 社交媒体优化

🤝 贡献

欢迎提交 Issue 和 PR!

计划功能

  • 视频自动生成(FFmpeg 集成)
  • Web UI 界面
  • 多 API 源支持(备用)
  • 自定义模板上传

📄 许可证

MIT License - 详见 LICENSE 文件


🔗 相关链接


Made with ❤️ by Digital Transformation Team
Version: 1.0.0
Last Updated: 2026-04-16

安全使用建议
Do not run this skill unmodified. Before installing or executing: 1) Inspect and remove any hard-coded API keys in scripts/config.json or scripts (there is a key '1a2e33...' present). If that key was used publicly, obtain a fresh TianAPI key and rotate it. 2) Replace the config.json example workflow by creating your own config.json with your key (SKILL.md describes this). 3) Edit generate_horoscope_tianapi.py to fix or remove absolute icon paths pointing to C:/Users/… — either provide icons in the skill folder or change paths to relative locations, otherwise the script may fail or read unexpected files. 4) Run the scripts in an isolated environment (non-production VM or container) first to observe behavior and network traffic (it contacts only apis.tianapi.com per the code). 5) Verify the outputs and search for any other embedded secrets before publishing or committing. The inconsistencies look like sloppy hygiene (accidental secret leakage / user-specific paths) rather than explicit malicious intent, but treat the included hard-coded credential as sensitive and investigate/rotate it if needed.
功能分析
Type: OpenClaw Skill Name: horoscope-daily-china Version: 1.0.0 The skill bundle is a functional tool for generating horoscope images using the TianAPI. It utilizes standard Python libraries (Pillow and requests) to fetch data and render images for social media. While the bundle contains hardcoded API keys in 'scripts/config.json' and 'scripts/archive/generate_horoscope.py', and references local user paths (e.g., 'C:/Users/liuyan/...') for icons in 'scripts/generate_horoscope_tianapi.py', these are identified as unintentional configuration flaws rather than malicious intent. No evidence of data exfiltration, remote code execution, or harmful prompt injection was found.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The skill's name/description match the included code (scripts call TianAPI and generate images). However repository files include a hard-coded TianAPI key (scripts/config.json and archive/generate_horoscope.py) and absolute local icon paths referencing C:/Users/liuyan/.openclaw/..., which are not disclosed in SKILL.md and are unexpected for a reusable skill. Hard-coded keys and baked-in user-specific paths do not align with the stated idea of a configurable API-key-based script and suggest poor hygiene or accidental leakage.
Instruction Scope
SKILL.md instructs only to add your own TianAPI key into config.json.example and run the main script. The runtime code, however, contains additional behaviors not explicitly surfaced: it will attempt to load icon image files from absolute paths under a specific user home, and an archived script includes a different hard-coded API key constant. The scripts perform network calls only to TianAPI endpoints (fortune/pair), and generate local PNG/TXT outputs — no other external endpoints are present — but the presence of embedded secrets and local filesystem assumptions expands the actual runtime scope beyond the README instructions.
Install Mechanism
This is instruction-only (no install spec) and includes Python scripts and docs. There are no remote download/install steps or archives fetched from untrusted URLs. Dependencies are standard (Pillow, requests).
Credentials
The skill does not declare required env vars, but it requires a TianAPI key in a local config.json — appropriate for its purpose. The problem: a TianAPI key is already present in scripts/config.json and an older script has a TIANAPI_KEY constant. Shipping an API key in the repo is disproportionate and risky (leaked credential). Also the main script references absolute user-specific icon paths, which means the skill may attempt to read files from the host filesystem outside its own folder; that access is not justified in SKILL.md and may fail or inadvertently expose local data.
Persistence & Privilege
The skill does not request persistent or elevated privileges. Flags show always:false and normal user-invocable/autonomous invocation behavior. The code writes output image/text files into specified output directories (expected). It does not attempt to modify other skills or global agent config.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install horoscope-daily-china
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /horoscope-daily-china 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: TianAPI integration for Chinese users, 5-page output (1080x1400), 5 color templates, social media optimized for Xiaohongshu/Douyin/Toutiao, secure config management, strict error handling
元数据
Slug horoscope-daily-china
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Horoscope Daily China 是什么?

Create 12 constellation fortune images with TianAPI - 5-page output with large fonts for social media publishing (Xiaohongshu/Douyin/Toutiao). 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 63 次。

如何安装 Horoscope Daily China?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install horoscope-daily-china」即可一键安装,无需额外配置。

Horoscope Daily China 是免费的吗?

是的,Horoscope Daily China 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Horoscope Daily China 支持哪些平台?

Horoscope Daily China 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Horoscope Daily China?

由 zhangj85(@zhangj85)开发并维护,当前版本 v1.0.0。

💬 留言讨论