Communitygithub.com

metatools2023/pikpak-agent-skills

One-shot pipeline: yt-dlp download → PikPak upload → watch online → clean local. Resume-safe, verified upload before local deletion, supports URL list batch processing. Covers YouTube, TikTok, X (Twitter), Facebook, Bilibili, and other yt-dlp-supported sites. Cross-platform (Windows / macOS / Linux).

What is pikpak-agent-skills?

This skill provides a complete pipeline for downloading videos using yt-dlp and uploading them to PikPak via WebDAV, enabling online viewing and automatic local cleanup. It is designed for users who want to save disk space by storing downloaded content directly in the cloud, or for batch transferring videos from sites like YouTube, TikTok, X (Twitter), Facebook, and Bilibili to PikPak. The pipeline ensures safety by only deleting local files after verifying the remote upload size. It supports resume-safe operation, URL list batch processing, dry runs, and optional keep-local mode. The skill works on Windows, macOS, and Linux, and requires PikPak Premium (for WebDAV access), yt-dlp, and Python 3.8+.

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

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

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.

Related Skills