Generate Identifiers
Use this skill when a user provides a torrent name or file name and wants to fix...
Install
npx skills add jxxghp/MoviePilot --skill generate-identifiers -g -a claude-code -y- Repository
- jxxghp/MoviePilot12k
- Category
- Engineering
- Updated
- 3d ago
- License
- GPL-3.0
- Context cost
- Mediumabout 2,501 tokens
- Runs scripts
- No, instructions only
What it does
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 through the structured MoviePilot API gateway. 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 source-native ID; 5) The user wants TV recognition to use a specific TMDB episode group.
Generate Custom Identifiers (生成自定义识别词)
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.
Prerequisites
Use these moviepilot_api operations:
config.identifiers.get- Query all existing custom identifier rulesconfig.identifiers.update- Save the updated identifier list (replaces the full list)media.recognize- Test recognition of a torrent title or file path (optional)
Supported Rule Formats
There are four formats. Operators must have spaces on both sides.
1. Block Word (屏蔽词)
Removes matched text from the title. Supports regex.
SomeUniqueAlias
Use a bare block word only when the token itself is specific enough globally, or when the user explicitly wants a global cleanup rule.
2. Replacement (被替换词 => 替换词)
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]}
Use the source-specific field that matches the target metadata provider:
tmdbid, doubanid, bangumiid, or anilistid. 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]}
3. Episode Offset (集偏移)
Shifts episode numbers found between the front and back delimiter words. EP is the placeholder for the original episode number.
前定位词 <> 后定位词 >> EP-12
4. Combined Replacement + Episode Offset
First performs replacement; episode offset only runs if replacement succeeded.
被替换词 => 替换词 && 前定位词 <> 后定位词 >> EP-12
