Communitygithub.com

metatools2023/pikpak-agent-skills

yt-dlp 下载 → 上传 PikPak → 在线观看 → 清理本地 的一条龙管道:断点续跑、上传校验后才删本地、支持 URL 清单批量处理。覆盖 YouTube、TikTok、X(Twitter)、Facebook、B站 等 yt-dlp 支持的站点。支持 Windows / macOS / Linux。 One-shot pipeline: yt-dlp download -> upload to PikPak via WebDAV -> watch online -> clean local copies. Covers YouTube, TikTok, X(Twitter), Facebook, Bilibili and other yt-dlp-supported sites. Resume-safe; local files are deleted only after verified upload. Cross-platform. Must use this skill when: - 用户想「下载视频并存到 PikPak」「看完就删,本地不留」/ download a video straight into PikPak - 用户给了一堆 yt-dlp 支持的链接(YouTube、TikTok、X、Facebook、B站等),想批量转存云盘 / batch-save TikTok/X/YouTube links to cloud - 用户磁盘空间紧张,想把下载成果直接入云 / save disk space by downloading straight to cloud 关键词:yt-dlp / PikPak / 管道 / pipeline / 下载转存 / download to cloud / TikTok / Twitter / X 视频下载

pikpak-agent-skills 是什么?

pikpak-agent-skills is a Claude Code agent skill that yt-dlp 下载 → 上传 PikPak → 在线观看 → 清理本地 的一条龙管道:断点续跑、上传校验后才删本地、支持 URL 清单批量处理。覆盖 YouTube、TikTok、X(Twitter)、Facebook、B站 等 yt-dlp 支持的站点。支持 Windows / macOS / Linux。 One-shot pipeline: yt-dlp download -> upload to PikPak via WebDAV -> watch online -> clean local copies. Covers YouTube, TikTok, X(Twitter), Facebook, Bilibili and other yt-dlp-supported sites. Resume-safe; local files are deleted only after verified upload. Cross-platform. Must use this skill when: - 用户想「下载视频并存到 PikPak」「看完就删,本地不留」/ download a video straight into PikPak - 用户给了一堆 yt-dlp 支持的链接(YouTube、TikTok、X、Facebook、B站等),想批量转存云盘 / batch-save TikTok/X/YouTube links to cloud - 用户磁盘空间紧张,想把下载成果直接入云 / save disk space by downloading straight to cloud 关键词:yt-dlp / PikPak / 管道 / pipeline / 下载转存 / download to cloud / TikTok / Twitter / X 视频下载.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/metatools2023/pikpak-agent-skills/tree/HEAD/skills/pikpak-yt-dlp-pipeline

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

yt-dlp → PikPak Pipeline / Download-to-Cloud Pipeline

One command: yt-dlp downloads a video, uploads it to PikPak over WebDAV, verifies, then removes the local copy.

Safety promise: Local files are deleted only after a verified upload (code-enforced, cleanup_local only handles verified files).

Site coverage: yt-dlp supports 1000+ sites, commonly used: YouTube, TikTok, X (Twitter), Facebook, Instagram, Bilibili, Vimeo – precisely covering the social media transfer scenarios PikPak officially promotes (PikPak's own social media transfer is limited to its App; this pipeline brings it to command-line batch mode). TikTok/X and other sites change rules frequently; if parsing fails, first try yt-dlp -U to upgrade.

0. Prerequisites

  1. PikPak Premium (WebDAV requires membership). No account? Start with the pikpak-onboarding skill.
  2. yt-dlp: pip install yt-dlp (or winget install yt-dlp).
  3. Python 3.8+ and requests.
  4. Copy webdav.config.json.example to webdav.config.json and fill in your WebDAV credentials (plaintext password, git-ignored, do not share).

1. Usage

# Single URL
python scripts/pipeline.py "https://youtube.com/watch?v=..." --remote-dir my_videos

# URL list batch
python scripts/pipeline.py --url-file urls.txt --remote-dir my_videos

# Dry run (no download, no upload)
python scripts/pipeline.py --url-file urls.txt --remote-dir my_videos --dry-run

# Keep local copies
python scripts/pipeline.py "URL" --remote-dir my_videos --keep-local
ArgumentDescription
URL... / --url-fileLinks supported by yt-dlp; one per line in list, lines starting with # are comments
--remote-dirPikPak target folder (auto-created)
--work-dirLocal download staging directory, default scripts/../downloads_tmp
--keep-localKeep local files after successful upload
--retryNumber of upload retries per file, default 5
--dry-runOnly print processing plan
--yt-dlp-argsAdditional arguments passed to yt-dlp, e.g., --yt-dlp-args -f best

2. How it works

Each URL goes through four steps:

  1. Download: yt-dlp → --work-dir (new files detected by snapshot comparison)
  2. Upload: Streaming PUT per file → PikPak, remote size verification
  3. Cleanup: Verified local copies removed (unless --keep-local)
  4. Bookkeeping: state/pipeline_<folder>.json records each URL as done/failed → resume-safe, automatically skips completed on rerun

3. Gotchas

  • If yt-dlp is not in PATH, the script will immediately exit with an error—verify that yt-dlp --version works.
  • Running the same URL again will skip it (state marks it done); to rerun, delete the corresponding record in state/.
  • WebDAV cannot permanently delete cloud files; use the official App/website for cloud cleanup.
  • Some sites require cookies/login; pass --yt-dlp-args --cookies-from-browser chrome.
  • Compliance reminder: Only download content you have the right to access.

4. Related skills

  • pikpak-onboarding: Don't have a PikPak account yet? Start from registration (includes official CLI installation guide).
  • pikpak-webdav-upload: Already have local downloads? Batch upload directly.

相关技能