一键导入
image-rating
多轮决策为论文图片批量打分(0-10) + 推荐放置 section(opening/intro/method/results/none),用于视频图片筛选;公式/约束截图自动降权 ≤ 3 分。当需要从一组论文图候选中挑出适合视频展示的图片并推荐放在哪一段时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
多轮决策为论文图片批量打分(0-10) + 推荐放置 section(opening/intro/method/results/none),用于视频图片筛选;公式/约束截图自动降权 ≤ 3 分。当需要从一组论文图候选中挑出适合视频展示的图片并推荐放在哪一段时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
具身人机三平台 (B站 / 小红书 / 抖音) 账号运营运维:定时跑评论自动回复 (LLM 互动话术 + 风控随机化)、拉取创作者中心数据写 sqlite + 推飞书多维表格、巡检 cookie 是否失效。当用户提到"运营这周的视频/查粉丝评论/拉一下数据/B站 cookie 又掉了"等场景时使用。
多轮 reasoning 把英文论文标题翻译为"具身人机"频道风格的中文标题(≤20 字, 保留专有名词, 突出动词)。当需要为 paper2video 视频片段生成中文封面 / 投稿标题时使用。
多轮 reasoning 分析论文方法图,输出 components/connections/key_innovation/layout_direction 等结构化 JSON,用于 Manim 架构场景生成。当需要把论文方法图转成 Manim 可渲染的语义结构时使用。
为论文生成 5 段式结构化视频讲解脚本(opening/intro/method/results/conclusion),中文、课堂讲解风格、目标 5 分钟。输入是 paper_meta JSON(含 title/abstract/authors/key_points),输出是 5 段 JSON(含 text/duration_sec/key_points 字段)。
Use when the user wants to search arXiv (by topic, by venue/year) or HuggingFace Daily Papers for academic papers from inside the JushenRenji repo. Returns structured JSON with arxiv_id, title, abstract, url, github_repo, project_page, etc. Useful for picking topics for paper-explainer videos or feeding the manim engine.
Use when working in the JushenRenji repo and the user asks to update the latest paper video, generate a paper explainer by title, publish or republish to Bilibili/Xiaohongshu, update Bilibili cookies, or verify upload results.
| name | image-rating |
| description | 多轮决策为论文图片批量打分(0-10) + 推荐放置 section(opening/intro/method/results/none),用于视频图片筛选;公式/约束截图自动降权 ≤ 3 分。当需要从一组论文图候选中挑出适合视频展示的图片并推荐放在哪一段时使用。 |
本 skill 把 JushenRenji.src.llm_tools.llm_agent:rate_image_importance 的"图片重要性打分"步骤抽出来,
用 opencode 多轮决策 替代原有的 LLM 单次打分。
| 维度 | 单次 (旧) | 多轮 (本 skill) |
|---|---|---|
| 打分依据 | 一次问一组 caption,易粗放 | 第 1 轮基于元数据初步分 |
| 自检 | 无 | 第 2 轮自检视觉化效果 + 重复检测 |
| 落位 | 不输出 section | 第 3 轮给最终分 + 推荐 section |
| 公式图 | prompt 提示但容易给高分(LESSONS Bug1) | prompt + 代码层双重硬约束 ≤ 3 |
LESSONS 2026-04-15 Bug1 记过——某次公式图被 LLM 给到 0.92 高分,导致视频里出现长时间公式截图。
本 skill 在 prompt 里写明"公式/约束 ≤ 3 分,section=none",在 CLI 代码层 (_enforce_formula_constraint)
再 enforce 一遍作为双重保险。
必须先激活 paperagent 环境:
source ~/miniconda3/etc/profile.d/conda.sh
conda activate paperagent
cd ~/Projects/VlogCutter/JushenRenji
python -m src.llm_tools.cli rate-images \
--candidates cache/test_image_candidates.json \
--target-count 5 \
--out /tmp/scores.json
多轮决策为候选图片打分 + 推荐 section,输出 score JSON。
候选图片文件,JSON 数组,每项:
| 字段 | 类型 | 说明 |
|---|---|---|
image_index | int | 候选图序号(下游对齐用) |
caption | string | 图片题注 / 描述 |
figure_role | string | 角色: opening/intro/method/results/architecture/ablation 等(可空) |
paper_context | string | 论文上下文(标题/abstract/method 段落,可空) |
示例:
[
{
"image_index": 0,
"caption": "Figure 1: Overall architecture of ViTacFormer",
"figure_role": "method",
"paper_context": "ViTacFormer: cross-modal transformer..."
},
{
"image_index": 1,
"caption": "Equation 3: Cross-attention loss function L_attn = ...",
"figure_role": "method",
"paper_context": "ViTacFormer..."
}
]
| Flag | Type | Default | Description |
|---|---|---|---|
--candidates | string | (required) | 候选 JSON 文件路径 |
--out | string | (required) | 输出 score JSON 路径 |
--opencode-model | string | (空) | opencode 模型,缺省读 config.yaml: opencode_model (deepseek/deepseek-v4-pro) |
--target-count | int | 8 | 期望保留多少张评分 ≥ 5 的图(软目标,不强求) |
每张候选图对应一条记录,长度与输入相同:
[
{
"image_index": 0,
"caption": "Figure 1: Overall architecture of ViTacFormer",
"score": 8.5,
"reason": "高层架构图,核心方法可视化",
"recommended_section": "method",
"rejected": false
},
{
"image_index": 1,
"caption": "Equation 3: Cross-attention loss...",
"score": 3.0,
"reason": "公式/约束截图,不适合长时间画面展示",
"recommended_section": "none",
"rejected": true
}
]
成功:
{"ok": true, "scored": 5, "above_5": 3}
失败 (退码 1):
{"ok": false, "error": "candidates file not found: /tmp/x.json"}
| 约束 | 实现位置 |
|---|---|
| 公式/方程/约束/损失/定理截图 → score ≤ 3, section="none" | prompt + _enforce_formula_constraint 双重保险 |
| recommended_section 必须 ∈ {opening, intro, method, results, none} | _normalize_score_record 做白名单兜底 |
| score 夹钳到 0-10 浮点 | _normalize_score_record |
| 输出列表长度 = 输入候选长度 | _rate_images_via_opencode 用 image_index 对齐 |
cat > /tmp/cands.json <<'EOF'
[
{"image_index": 0, "caption": "Figure 1: Overall architecture", "figure_role": "method", "paper_context": "ViTacFormer"},
{"image_index": 1, "caption": "Equation 3: Loss function", "figure_role": "method", "paper_context": "ViTacFormer"},
{"image_index": 2, "caption": "Figure 4: Quantitative comparison", "figure_role": "results", "paper_context": "ViTacFormer"}
]
EOF
JSR_NETWORK_PROFILE=gsjts python -m src.llm_tools.cli rate-images \
--candidates /tmp/cands.json \
--target-count 3 \
--out /tmp/scores.json
期望输出:
{"ok": true, "scored": 3, "above_5": 2}
/tmp/scores.json 里 idx=0 (architecture) ≈ 8 分 method, idx=1 (equation) ≤ 3 分 none, idx=2 (quantitative) ≈ 7 分 results。
src.llm_tools.llm_agent.rate_image_importance() 已新增 via_skill kwarg:
from src.llm_tools.llm_agent import rate_image_importance
# 默认走原 LLM 单次(行为不变)
scores = rate_image_importance(captions)
# 显式走 skill
scores = rate_image_importance(captions, via_skill=True)
或环境变量级开关:
JSR_USE_SKILL_RATE_IMAGES=1 python src/main.py --paper-link https://arxiv.org/abs/2506.15953
skill 失败 (subprocess 超时 / opencode 上游 404 / JSON 解析全错) 自动 fallback 到原 LLM 单次,
不会让主流程挂掉。返回值始终是 list[int] (legacy API 兼容)。
_rate_images_via_opencode 通过 prompt 让 opencode 内部依次完成 3 轮:
每一轮失败都会优雅降级:
_fallback_default_scores 给每张图固定 5 分 + 按 figure_role 简单分流CLI 在所有失败路径都输出合法 JSON 到 stdout:
{"ok": false, "error": "candidates must be JSON list"}
logging 全走 stderr,不污染 stdout。