| name | add-downloader |
| description | Scaffold a new video downloader implementation following the Downloader Protocol. |
| allowed-tools | Read, Write, Edit, Glob, Grep |
| argument-hint | ["downloader-name"] |
Add a new downloader
Create a new downloader named $ARGUMENTS following existing patterns.
Steps
- Read
kinescope/downloaders/base.py to understand the Downloader Protocol
- Read
kinescope/downloaders/n_m3u8dl.py and kinescope/downloaders/ffmpeg.py as reference implementations
- Create
kinescope/downloaders/$ARGUMENTS.py with:
- A class that implements the
download(**kwargs) -> bool interface
- A static
is_available() method to check if the tool is installed
- Proper error handling (return
False on failure, raise DownloadError for fatal issues)
- Read
kinescope/runner.py and add the new downloader to the fallback chain in process_single()
- Verify all files compile:
python3 -m py_compile <file>
Conventions
- Never call
sys.exit() — raise exceptions or return False
- Use
TMP_DIR = "/tmp/kinescope" for temp files
- Binary lookup:
shutil.which() first, then ~/bin/ fallback
- Match the keyword-only argument signature from
base.py