Use this skill when you need to retry failed file transfers/organizations. Given one or more failed transfer history record IDs, this skill guides you through querying the failure details, deleting the old records, and re-identifying and re-organizing the files. Supports batch processing of multiple files from the same media (e.g., multiple episodes of a TV show). This skill is automatically triggered when the system detects transfer failures and the AI agent retry feature is enabled.
60
70%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/transfer-failed-retry/SKILL.mdThis skill handles retrying failed file transfers/organizations. When file transfers fail, you can use this skill to analyze the failures, remove stale history records, and attempt to re-identify and re-organize the files. It supports both single-file and batch retry scenarios.
You need the following tools:
query_transfer_history - Query transfer history recordsdelete_transfer_history - Delete a transfer history recordrecognize_media - Recognize media info from file path or titletransfer_file - Transfer/organize files to the media librarysearch_media - Search TMDB for media informationUse query_transfer_history to get details about the failed record(s). Filter by status failed to find the specific records.
If you are given a specific history record ID (or multiple IDs), query with those IDs to understand the failure context:
query_transfer_history(status="failed")From each record, extract the following key information:
Common failure reasons and how to handle them:
| Error Message | Cause | Solution |
|---|---|---|
| 未识别到媒体信息 | File name couldn't be matched to any media | Use search_media to find the correct TMDB ID, then use transfer_file with explicit tmdbid |
| 源目录不存在 | Source file was moved or deleted | Cannot retry - skip this record |
| 目标路径不存在 | Target directory issue | Retry transfer - the directory config may have been fixed |
| 文件已存在 | Target file already exists | May need to use force mode or skip |
| 未找到有效的集数信息 | Episode number not recognized | Use recognize_media with the file path to get better metadata, or specify season/episode in transfer_file |
| 未获取到转移目录设置 | No transfer directory configured for this media type | Cannot auto-fix - notify user about directory configuration |
Before retrying, you must delete the old failed history record(s). The system skips files that already have a transfer history entry (even failed ones).
delete_transfer_history(history_id=<record_id>)Based on the failure analysis in Step 2:
Try recognizing the media from file path:
recognize_media(path="<source_file_path>")If recognition fails, try searching TMDB with keywords extracted from the filename:
search_media(title="<extracted_title>", media_type="movie" or "tv")Once you have the correct TMDB ID, re-transfer with explicit identification:
transfer_file(file_path="<source_path>", tmdbid=<tmdb_id>, media_type="movie" or "tv")Simply retry the transfer:
transfer_file(file_path="<source_path>")For TV shows where episode info couldn't be determined:
recognize_media to get better metadatatransfer_file(file_path="<source_path>", tmdbid=<tmdb_id>, media_type="tv", season=<season_number>)After the retry attempt, report the result:
When multiple files from the same source fail simultaneously (e.g., 10 episodes of the same TV show all fail with the same error), the system groups them and triggers a single batch retry.
Identify media ONCE, apply to ALL files: Since batch files typically belong to the same media, perform media recognition (recognize_media) or search (search_media) only ONCE using the first file, then reuse the result (tmdbid, media_type) for all subsequent files.
Process each file individually for delete + transfer: Even though the media identity is shared, you must still:
Stop early if root cause is unfixable: If the first file fails due to an unfixable issue (e.g., missing directory configuration), skip all remaining files with the same error rather than retrying each one.
Process in order: Handle files sequentially to avoid race conditions.
# Given failed records: IDs = [42, 43, 44, 45] (4 episodes of the same show)
# All have errmsg="未识别到媒体信息"
# 1. Query all failed records
query_transfer_history(status="failed")
# 2. Identify media ONCE using the first file
recognize_media(path="/downloads/Show.Name.S01E01.1080p.mkv")
# Found: tmdb_id=789, media_type="tv"
# 3. For each record: delete history, then re-transfer
delete_transfer_history(history_id=42)
transfer_file(file_path="/downloads/Show.Name.S01E01.1080p.mkv", tmdbid=789, media_type="tv")
delete_transfer_history(history_id=43)
transfer_file(file_path="/downloads/Show.Name.S01E02.1080p.mkv", tmdbid=789, media_type="tv")
delete_transfer_history(history_id=44)
transfer_file(file_path="/downloads/Show.Name.S01E03.1080p.mkv", tmdbid=789, media_type="tv")
delete_transfer_history(history_id=45)
transfer_file(file_path="/downloads/Show.Name.S01E04.1080p.mkv", tmdbid=789, media_type="tv")
# 4. Report summary: "重试完成:4/4 成功"recognize_media with the file path first before falling back to search_media.history_id(s) directly. Start from Step 1 with those specific IDs.# 1. Query the failed record
query_transfer_history(status="failed", page=1)
# Found: id=42, src="/downloads/Movie.Name.2024.1080p.mkv", errmsg="未识别到媒体信息"
# 2. Try to recognize the media from path
recognize_media(path="/downloads/Movie.Name.2024.1080p.mkv")
# Recognition failed
# 3. Search TMDB
search_media(title="Movie Name", year="2024", media_type="movie")
# Found: tmdb_id=123456
# 4. Delete old history record
delete_transfer_history(history_id=42)
# 5. Re-transfer with correct identification
transfer_file(file_path="/downloads/Movie.Name.2024.1080p.mkv", tmdbid=123456, media_type="movie")
# Success!1b065cc
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.