Use this skill when a user provides a torrent name or file name and wants to fix recognition issues, or asks to add/manage custom identifiers (自定义识别词). This skill generates identifier rules based on the WordsMatcher preprocessing logic, checks for duplicates against existing rules, and saves them via MCP tools. Because custom identifiers are global, generated rules must default to conservative, sample-specific regex patterns instead of broad matches unless the user explicitly wants global cleanup. Applicable scenarios include: 1) A torrent or file name is incorrectly recognized (wrong title, season, episode, etc.); 2) The user wants to block unwanted keywords from torrent names; 3) The user needs episode offset rules for series with non-standard numbering; 4) The user wants to force recognition of a specific media by TMDB/Douban ID; 5) The user wants TV recognition to use a specific TMDB episode group.
72
88%
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
This skill helps generate custom identifier rules for MoviePilot's media recognition system. Custom identifiers preprocess torrent/file names before the recognition engine runs, correcting naming issues that cause misidentification.
You need the following tools:
query_custom_identifiers - Query all existing custom identifier rulesupdate_custom_identifiers - Save the updated identifier list (replaces the full list)recognize_media - Test recognition of a torrent title or file path (optional, for verification)There are four formats. Operators must have spaces on both sides.
Removes matched text from the title. Supports regex.
SomeUniqueAliasUse a bare block word only when the token itself is specific enough globally, or when the user explicitly wants a global cleanup rule.
Regex substitution. The left side is a regex pattern, the right side is the replacement (supports backreferences).
被替换词 => 替换词Special replacement for direct ID specification:
被替换词 => {[tmdbid=xxx;type=movie/tv;s=xxx;e=xxx]}
被替换词 => {[doubanid=xxx;type=movie/tv;s=xxx;e=xxx]}Where s (season) and e (episode) are optional. For TMDB TV recognition, add g=xxx to specify an episode group:
被替换词 => {[tmdbid=xxx;type=tv;g=xxx;s=xxx;e=xxx]}Shifts episode numbers found between the front and back delimiter words. EP is the placeholder for the original episode number.
前定位词 <> 后定位词 >> EP-12First performs replacement; episode offset only runs if replacement succeeded.
被替换词 => 替换词 && 前定位词 <> 后定位词 >> EP-12Lines starting with # are comments and will be skipped during processing.
. * + ? ^ $ { } [ ] ( ) | \) must be escaped with \ when matching literally.=>, <>, >>, && must have spaces on both sides.EP represents the original episode number. Common patterns:
EP-12 means subtract 12EP+5 means add 5EP*2 means multiply by 2=> is equivalent to a block word.Custom identifiers are global. A new rule affects all future torrent/file recognition, not just the sample provided by the user.
When generating a new rule, default to the narrowest regex that still fixes the user's sample:
1080p, WEB-DL, 中字, 国配, REPACK, S01E01, or pure numbers unless the user explicitly wants a global cleanup rule.前定位词 and 后定位词 should use sample-specific context so the offset only runs on the intended naming pattern.Bad (too broad for a global rule):
REPACK
1080p
S01E01 => {[tmdbid=12345;type=tv;s=1;e=1]}Better (scoped to the user's sample pattern):
(\[SubGroup\].*?My\.Show.*?2024.*?)REPACK => \1
Some\.Weird\.Name(?:\.2024)?(?:\.S01E\d+)? => {[tmdbid=12345;type=tv;s=1]}
\[Baha\] <> \[1080P\] >> EP-12Before saving, mentally test the rule against:
Parse the torrent/file name provided by the user. Identify:
Write the rule using the appropriate format. Ensure:
#) above the rule to describe what it doesUse the query_custom_identifiers tool to get all current rules:
query_custom_identifiers()Compare each new rule against the existing identifiers:
Merge new non-duplicate rules into the existing list, then use update_custom_identifiers to save the complete list:
update_custom_identifiers(
identifiers=["existing rule 1", "existing rule 2", "# new comment", "new rule"]
)CRITICAL: Always include ALL existing rules in the list. This tool replaces the entire list.
If the user wants to verify the rule works, use recognize_media to test:
recognize_media(title="the torrent title to test")Tell the user:
User: "种子名 [SubGroup] My Show - 13 [1080P],这是第二季第1集,但被识别成第13集"
Solution: Episode offset to subtract 12:
# My Show 第二季集数偏移(13->1)
\[SubGroup\] <> \[1080P\] >> EP-12User: "种子名 My.Show.2024.REPACK.1080p.mkv,REPACK导致识别异常"
Solution: Contextual replacement, scoped to this title pattern:
# 仅在 My.Show.2024 命名中移除 REPACK
(My\.Show\.2024\.)REPACK(\.1080p) => \1\2User: "文件名 [OldName] EP01.mkv,应该识别为 NewName"
Solution: Replacement scoped to the wrong alias:
# 将特定错误别名 OldName 替换为 NewName
\[OldName\] => [NewName]User: "种子名 Some.Weird.Name.S01E01.1080p.mkv,识别不到,TMDB ID是12345,是电视剧"
Solution: Direct ID specification with a sample-specific alias pattern:
# 仅在 Some.Weird.Name 这一命名模式下强制绑定 TMDB ID 12345
Some\.Weird\.Name(?:\.S01E\d+)?(?:\.1080p)? => {[tmdbid=12345;type=tv;s=1]}User: "种子名 Some.Weird.Name.S01E01.1080p.mkv,这是按 TMDB 剧集组 5ad0ec240e0a26303f00d84d 排序的电视剧"
Solution: Direct TMDB ID specification with g=...:
# 仅在 Some.Weird.Name 命名模式下绑定 TMDB ID 12345 并指定剧集组
Some\.Weird\.Name(?:\.S01E\d+)?(?:\.1080p)? => {[tmdbid=12345;type=tv;g=5ad0ec240e0a26303f00d84d;s=1]}User: "种子名 [Baha][OldTitle][13][1080P],标题应该是NewTitle,而且13应该是第二季第1集"
Solution: Combined replacement + episode offset:
# OldTitle替换为NewTitle并偏移集数
OldTitle => NewTitle && \[Baha\] <> \[1080P\] >> EP-12User: "种子名 [Group] Title - 13-14 [1080P],应该是第1-2集"
Solution: Episode offset (handles multiple numbers between delimiters):
# Title 集数偏移
\[Group\] <> \[1080P\] >> EP-12The WordsMatcher.prepare() method (in app/core/meta/words.py) processes each rule in order:
#=> AND && AND >> AND <> → Combined format (4)=> → Replacement format (2)>> AND <> → Episode offset format (3)custom_words parameter takes precedence over global CustomIdentifiers1b065cc
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.