← 返回
未分类

Gihub Trending

Generate weekly GitHub trending analysis every Monday at 9 AM
Analyze weekly GitHub trending repositories with strategic insights. Use when user wants GitHub trending analysis, 开源趋势分析, 每周开源热点, GitHub 周报, or 开发者趋势洞察. Extracts GitHub trending data via feedship fetch, generates First Principles analysis via LLM, and replaces citation placeholders. Requires feedship skill.
user_b4850184
未分类 community v1.0.0 1 版本 99038.5 Key: 无需
★ 0
Stars
📥 103
下载
💾 0
安装
1
版本
#latest

概述

GitHub Trending 周报 (Feedship GitHub Trending)

Version: 1.0.0

For: OpenClaw compatible agents

Description: Analyze weekly GitHub trending repositories with strategic First Principles thinking

为什么需要引用替换(Step 3.5)

LLM 生成的引用有两大幻觉风险:

  1. 编号幻觉:引用列表中不存在的编号(如 ${99} for a 10-item list)
  2. 展开幻觉:在引用中直接输出标题/链接时捏造内容

解决方案: LLM 只输出 ${N} 占位符,标题和链接由 replace_refs.py 脚本从权威 JSON 中注入。


1. Setup

This skill requires feedship v1.8.0+. Use the local project version:

cd /Users/y3/feedship && uv run feedship --version

Verify fetch command is available:

cd /Users/y3/feedship && uv run feedship fetch --help

2. Usage

On-Demand (Manual)

User triggers:

"GitHub trending", "开源趋势", "每周开源热点", "GitHub 周报", "开发者趋势洞察", "github trending analysis"

The agent will activate this skill and run the Generate Trending Report flow (see section 3).

Automatic (Cron)

Schedule weekly reports every Monday at 9 AM Beijing time:

openclaw cron add \
  --name "feedship-github-trending" \
  --agent feedship-github-trending \
  --cron "0 9 * * 1" \
  --tz Asia/Shanghai \
  --session isolated \
  --announce \
  --channel <your-channel> \
  --to <your-destination> \
  --timeout-seconds 600 \
  --message "使用 feedship-github-trending skill 生成本周开源趋势分析。" \
  --thinking xhigh

3. Generate Trending Report

Step 1. 提取 GitHub Trending 数据

# 提取 GitHub trending 数据
cd /Users/y3/feedship && uv run feedship fetch \
  --url "https://github.com/trending?since=weekly" \
  --json > /tmp/github_trending.json

# 验证数据
python3 -c "
import json
data = json.load(open('/tmp/github_trending.json'))
articles = data.get('articles', [])
print(f'获取到 {len(articles)} 个 trending 仓库')
for i, a in enumerate(articles[:5]):
    stars = a.get('meta', {}).get('stars', 0)
    print(f'{i}. [{stars}★] {a.get(\"title\", \"\")[:80]}')
"

输出示例:

获取到 25 个 trending 仓库
0. [110927★] microsoft/markitdown: Python tool for converting files...
1. [95748★] NousResearch/hermes-agent: The agent that grows with you
2. [53271★] forrestchang/andrej-karpathy-skills: A single CLAUDE.md file...

Step 2. 拼接提示词

references/prompt.md 读取提示词模板:

# 读取提示词模板
PROMPT=$(cat skills/feedship-github-trending/references/prompt.md)

# 将仓库数据格式化为简洁的标题列表
python3 -c "
import json
data = json.load(open('/tmp/github_trending.json'))
articles = data.get('articles', [])
for i, a in enumerate(articles[:10]):  # 取前 10 个
    stars = a.get('meta', {}).get('stars', 0)
    lang = a.get('meta', {}).get('language', '')
    title = a.get('title', '').split(']', 1)[-1].strip() if ']' in a.get('title', '') else a.get('title', '')
    desc = a.get('description', '')[:100]
    print(f'{i}. [{stars}★] {lang} - {title}')
    print(f'   {desc}')
"

Step 3. 发送至 LLM

$FULL_PROMPT 发送给 LLM(MiniMax-M2.7 或同类模型)生成分析。

⚠️ 重要提示给 LLM: 在回复中,严格只使用 ${N} 格式引用仓库,禁止展开标题或链接。最多引用 10 个仓库(${0} 到 ${9})。

Step 3.5. 替换引用占位符

# 准备 JSON 数据
GITHUB_TRENDING_JSON=$(cat /tmp/github_trending.json | python3 -c "
import json, sys
data = json.load(sys.stdin)
# 简化:只保留前 10 个
data['articles'] = data.get('articles', [])[:10]
print(json.dumps(data))
")

# 替换引用
cat LLM_OUTPUT.txt | GITHUB_TRENDING_JSON="$GITHUB_TRENDING_JSON" \
  python3 skills/feedship-github-trending/scripts/replace_refs.py > /tmp/trending_final.md

脚本功能:

  • ${N}owner/repo (stars★)
  • ${3,7} → 展开为两个独立链接(逗号分隔)
  • 无效编号 → [无效引用 #N]

Step 4. 输出最终报告

读取 /tmp/trending_final.md 输出给用户。


4. Prompt 模板参考

完整的提示词模板位于 references/prompt.md,包含:

  • Role: Principal Tech Strategist & Open-Source Trend Forecaster
  • Citation Rules: 防幻觉核心规则——LLM 只输出 ${N},禁止展开标题/链接
  • Execution Steps: 4个步骤(分类解构 → 根本原因 → 暗线发现 → 价值翻译)
  • Output Rules: 语言、结构、约束条件

5. Troubleshooting

ProblemSolution
-------------------
feedship: command not found使用 cd /Users/y3/feedship && uv run feedship
fetch: Error fetching URLGitHub 可能限制了请求,检查网络或添加延时
Empty article listGitHub trending 页面结构可能变化,需更新解析逻辑
大量 [无效引用 #N]LLM 引用了不存在的编号(只应引用 ${0}-${9}),检查 prompt.md 中的 Citation Rules
LLM 直接展开标题/链接在 Step 3 发送时强调:禁止展开链接,只输出 ${N}

6. Change Log

  • v1.0.0: 初始版本,基于 feedship-ai-daily 最佳实践

版本历史

共 1 个版本

  • v1.0.0 Initial release 当前
    2026-04-17 20:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,903
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,236
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,358 📥 318,511