| name | add-platform |
| description | Scaffold a new video platform module (like kinescope/) for downloading from a different service. |
| allowed-tools | Read, Write, Edit, Glob, Grep |
| argument-hint | ["platform-name"] |
Add a new platform
Scaffold a new platform package named $ARGUMENTS following the kinescope package structure.
Steps
-
Study the existing kinescope/ package structure:
- Read
kinescope/config.py — config parsing pattern (dataclass + parse function + custom exception)
- Read
kinescope/hls.py — media stream handling pattern
- Read
kinescope/drm.py — key acquisition pattern
- Read
kinescope/runner.py — orchestrator pattern
- Read
kinescope/downloaders/ — downloader interface
-
Create the new package $ARGUMENTS/ with:
__init__.py
config.py — platform-specific config dataclass and parser, with a custom ConfigError
runner.py — process_single() and run_batch() orchestrator
downloaders/__init__.py
- Reuse
kinescope/downloaders/base.py Protocol or create a shared one
-
Create or update the CLI entry point to support --platform $ARGUMENTS
-
Verify all files compile: python3 -m py_compile <file>
Conventions
- Each platform is a self-contained package
- Frozen dataclasses for configs
- Typed exceptions, never
sys.exit() in library code
- Downloaders behind Protocol interface for extensibility