local-link/skills/save-to-eagle/SKILL.md
归档网络内容到 Eagle 素材库。支持:(1) Behance/Pixiv 图片归档,(2) 网页视频录制(页面动画、滚动录制)。使用方式:'归档 [URL]' 归档图片;'录制网页视频 [URL]' 录制页面动画;'滚动录制 [URL]' 自动滚动截图。支持评分如 '归档 [URL], 3/5'。
npx skillsauth add lionad-morotar/simple-local-llm-server save-to-eagleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
将网络内容归档到本地 Eagle 素材库。支持图片归档和网页屏幕录制。
| 功能 | 触发方式 | 输出 | |------|---------|------| | 图片归档 | "归档 [URL]" | 下载原图到 Eagle | | 视频录制 | "录制网页视频 [URL]" | WebM 视频文件 | | 滚动截图 | "滚动录制 [URL]" | 多页 PNG 截图 |
录制参数:
详细录制指南见 references/screen-recording.md
当用户提供类似 "归档 URL, 3/5" 的输入时,Claude 应解析出 URL 和评分:
import re
def parse_archive_args(user_input: str) -> tuple[str, int]:
"""
解析归档参数
Returns:
(url, star)
"""
# 匹配评分模式: ", 3/5" 或 ", 5"
star_match = re.search(r',\s*(\d)(?:/\d)?\s*$', user_input)
if star_match:
star = int(star_match.group(1))
star = max(0, min(5, star)) # 限制在 0-5
url = user_input[:star_match.start()].strip()
else:
url = user_input.strip()
star = 0
return url, star
# 使用示例
url, star = parse_archive_args("https://www.pixiv.net/artworks/141349217, 3/5")
# url = "https://www.pixiv.net/artworks/141349217"
# star = 3
解析参数后,通过命令行调用脚本:
python scripts/main.py "<URL>" --star <N>
示例:
python scripts/main.py "https://www.pixiv.net/artworks/141349217" --star 3
当需要归档的图片超过 6 张时,自动启用批量脚本以避免触发反爬虫机制。
批量模式特点:
使用方式:
cd ~/.claude/skills/save-to-eagle
python scripts/batch_archive.py --template
# 编辑生成的 batch_template.json
JSON 格式示例:
[
{"url": "https://www.pixiv.net/artworks/142542530", "star": 4},
{"url": "https://www.pixiv.net/artworks/142565679", "star": 5},
{"url": "https://www.behance.net/gallery/123456", "star": 3}
]
# 通过 main.py 调用(推荐)
python scripts/main.py --batch urls.json
# 或直接调用 batch_archive.py
python scripts/batch_archive.py --input urls.json
# 调整延迟参数(如需更快/更慢)
python scripts/main.py --batch urls.json --delay-min 3 --delay-max 6
python scripts/batch_archive.py \
--urls "url1" "url2" "url3" \
--stars 4 5 3
Pixiv 文件夹Pixiv > {作者} - {标题}p1.jpg, p2.jpg...p1 自动设为文件夹封面(通过 coverId 字段)文件夹封面数据结构:
{
"id": "A7wr2MJeCl0tA",
"name": "たぬま - 絵",
"description": "作者: たぬま",
"coverId": "KwSneSgHhvnQI",
"children": [],
"modificationTime": 1772033456059,
"tags": [],
"password": "",
"passwordTips": ""
}
coverId: 指向文件夹内某个资源的 ID,Eagle 用此资源作为文件夹缩略图显示Pixiv 需要 cookies 文件:
{Eagle库}/.secrets/pixiv_cookies.json使用 Playwright 访问页面,提取:
// 提取脚本
() => {
const images = [];
document.querySelectorAll('img').forEach((img) => {
if (img.src && img.src.includes('mir-s3-cdn')) {
images.push({
src: img.src,
alt: img.alt || '',
width: img.width,
height: img.height
});
}
});
const mainImages = images.filter(img =>
img.src.includes('project_modules') &&
!img.src.includes('/projects/404/')
);
return {
title: document.querySelector('h1')?.textContent?.trim() || '',
creativeField: document.querySelector('a[href*="field="]')?.textContent?.trim() || '',
author: document.querySelector('[data-testid="profile-name"]')?.textContent?.trim() || '',
images: mainImages
};
}
| Creative Field | Eagle 文件夹 | |---------------|-------------| | Illustration | 插图 | | Graphic Design | 图形设计 | | Photography | 摄影 | | UI/UX | UI/UX | | Motion Graphics | 动画 | | Typography | 字体设计 | | 3D Art | 3D Art | | Architecture | 建筑 | | Fashion | 时尚 | | Advertising | 广告 | | Fine Arts | 美术 | | Crafts | 手工艺 | | Game Design | 游戏设计 |
每个项目都会在其分类下创建独立的子文件夹。
所有归档的图片都包含完整的 Eagle 元数据:
{
"id": "Kxxxxxxxxxxxx",
"name": "图片名称",
"size": 2260783,
"width": 1333,
"height": 2000,
"orientation": 1,
"folders": ["文件夹ID"],
"url": "原始链接",
"annotation": "作者: xxx",
"tags": [],
"isDeleted": false,
"star": 3
}
star: 评分(1-5星,0表示无评分)coverId: 文件夹封面资源 ID(多图作品自动设置 p1 为封面)~/.claude/skills/save-to-eagle/scripts/
├── main.py # 入口,URL 路由(支持单条/批量模式)
├── batch_archive.py # 批量归档(带反爬虫速率限制)
├── pixiv.py # Pixiv 归档逻辑(支持多图封面设置)
├── behance.py # Behance 归档逻辑
├── eagle_utils.py # 共用工具函数
│ ├── create_eagle_asset() # 创建资源
│ ├── create_subfolder() # 创建子文件夹
│ ├── set_folder_cover() # 设置文件夹封面
│ ├── rebuild_mtime_index() # 重建索引
│ ├── clean_mtime_json() # 清理异常键
│ ├── verify_asset_integrity() # 验证资源完整性
│ └── repair_library() # 修复素材库
└── record_webpage.py # 网页屏幕录制
日志归档位置:
~/.claude/skills/save-to-eagle/logs/
├── batch_pixiv_YYYYMMDD_HHMMSS.log
└── ...
录制脚本用法:
# 录制页面动画(10秒)
python scripts/record_webpage.py "https://boardmix.cn" --duration 10
# 滚动截图
python scripts/record_webpage.py "https://example.com" --scroll
当 Eagle 出现启动缓慢、重建索引、资源不显示等问题时,使用维护工具:
from eagle_utils import repair_library, clean_mtime_json, verify_asset_integrity
# 一键修复素材库常见问题
repair_library()
# 单独清理 mtime.json 异常键
clean_mtime_json()
# 验证单个资源
result = verify_asset_integrity('Kxxxxxxxxxxxx')
print(result['valid']) # True/False
print(result['errors']) # 错误列表
Eagle 启动时重建索引(耗时很长):
from eagle_utils import clean_mtime_json, rebuild_mtime_index
# 清理异常键(通常有数千个)
clean_mtime_json()
# 重建索引
rebuild_mtime_index()
文件夹只显示部分资源:
repair_library() 一键修复tools
分批提交 Git 变更的完整工作流。当用户说"提交这个文件"、"帮我 commit"、"分批提交"、"整理提交计划"、"staged 的文件"、"git 提交"时触发
tools
从用户给出的文档片段中,提取"进阶必知"的深层知识,当用户提到"太简单了,给我几条秘密","面试必备的那种","八股文进阶"时触发
data-ai
批量给技能目录添加 disable-model-invocation,节省 token 开销。只保留需要 LLM 生成/分析/决策的技能有模型调用能力。
tools
open understand dashboard for user