Agent skill

MoviePilot Custom Identifier Generator

by jxxghp in jxxghp/MoviePilot

Writes custom recognition rules for MoviePilot so misidentified torrent or file names resolve to the right title, season and episode.

GPL-3.0Auto-check passedProductivity & Automation

Install MoviePilot Custom Identifier Generator

skills CLI
$ npx skills add jxxghp/MoviePilot --skill generate-identifiers -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jxxghp/MoviePilot generate-identifiers --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jxxghp/MoviePilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/generate-identifiers .claude/skills/generate-identifiers && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
generate-identifiers
GitHub stars
12k
Token cost
~2.8k tokens
SKILL.md length
1,142 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
GPL-3.0

At a glance

Writes custom recognition rules for MoviePilot so misidentified torrent or file names resolve to the right title, season and episode.

  • Works in 11 steps: Block Word (屏蔽词) → Replacement (被替换词 => 替换词) → Episode Offset (集偏移) → …
  • A release or file name is recognized with the wrong title, season or episode
  • SKILL.md covers Prerequisites, Supported Rule Formats, Important Rules for Writing… and Global Scope Guardrails, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Custom identifiers clean up names before MoviePilot's recognition engine runs, and this skill produces them through the `moviepilot_api` tool. It fetches the current list with `config.identifiers.get`, checks the new rule against existing ones for duplicates, saves with `config.identifiers.update` (which replaces the whole list), and can try the result with `media.recognize`. Four rule formats exist: block words, regex replacements, episode offsets written with an `EP` placeholder, and a combined replacement plus offset joined by `&&`.

Replacements can also pin a title directly by source-native ID using `tmdbid`, `doubanid`, `bangumiid` or `anilistid`, with optional season and episode, and `g` selects a TMDB episode group for TV. Because identifiers are global, the skill defaults to conservative regex patterns tied to the sample name instead of broad matches, unless you ask for global cleanup. Operators need spaces on both sides, special characters must be escaped, and each list entry is one rule.

When your agent uses it

  • A release or file name is recognized with the wrong title, season or episode
  • Blocking unwanted keywords from names before recognition
  • Shifting episode numbers for a series with non-standard numbering
  • Forcing recognition of a specific title by its TMDB or Douban ID

Example prompts

  • “This downloaded file is matched to the wrong show, write an identifier rule that only affects that release name.”
  • “Add an episode offset rule for a series whose second season keeps counting episodes from the first.”
  • “Make recognition use a specific TMDB episode group for this TV series.”

Requirements

  • A running MoviePilot instance reachable through the `moviepilot_api` tool
  • Pre-approved tools (allowed-tools): moviepilot_api

Workflow steps

11 steps, taken from the step headings in SKILL.md.

  1. Block Word (屏蔽词)
  2. Replacement (被替换词 => 替换词)
  3. Episode Offset (集偏移)
  4. Combined Replacement + Episode Offset
  5. Analyze the Problem
  6. Generate the Identifier Rule(s)
  7. Query Existing Identifiers
  8. Check for Duplicates
  9. Save the Updated Identifiers
  10. Verify (Optional)
  11. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 6034dcc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • moviepilot_api

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

MoviePilot Custom Identifier Generator loads about 2.8k tokens when it runs. Until then it costs about 243 tokens; SKILL.md has 1,142 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~243
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jxxghp/MoviePilot at commit 6034dcc, republished under its GPL-3.0 licence (© jxxghp). 1,142 words, ~2,791 tokens.

Download SKILL.mdSave it as .claude/skills/generate-identifiers/SKILL.md (or your agent's skills folder).
name
generate-identifiers
description
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.
allowed-tools
moviepilot_api
version
4
allowed-api-operations
config.identifiers.get config.identifiers.update media.recognize

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 rules
  • config.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
Comments

Lines starting with # are comments and will be skipped during processing.

Important Rules for Writing Identifiers

  1. Regex support: All patterns support regular expressions. Special characters (. * + ? ^ $ { } [ ] ( ) | \) must be escaped with \ when matching literally.
  2. Spaces matter: The operators =>, <>, >>, && must have spaces on both sides.
  3. One rule per string: Each element in the identifiers list is one rule.
  4. EP placeholder: In episode offset expressions, EP represents the original episode number. Common patterns:
    • EP-12 means subtract 12
    • EP+5 means add 5
    • EP*2 means multiply by 2
  5. Chinese number support: Episode offset handles Chinese numbers (一二三四五六七八九十).
  6. Empty replacement: Using nothing after => is equivalent to a block word.

Global Scope Guardrails

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:

  • Extract the sample's unique anchors first: wrong title alias, year, season/episode marker, group tag, source, resolution, release tag, file extension, or other distinctive fragments.
  • The matching side should usually contain at least two meaningful anchors, and one of them should normally be the title alias or another highly distinctive identifier from the user-provided sample.
  • Prefer matching the full wrong alias or a stable unique fragment from the sample, not a short generic substring.
  • Avoid generic global rules such as bare 1080p, WEB-DL, 中字, 国配, REPACK, S01E01, or pure numbers unless the user explicitly wants a global cleanup rule.
  • If the rule only needs to fix one specific naming pattern, prefer a contextual replacement with capture groups/backreferences over a bare block word.
  • For episode offset rules, the 前定位词 and 后定位词 should use sample-specific context so the offset only runs on the intended naming pattern.
  • For direct media binding, the left side should match the user's specific wrong alias or naming pattern, not a broad season/episode pattern that could hit other media.
Narrow vs Broad Examples

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-12

Before saving, mentally test the rule against:

  • the user's sample: it should match
  • unrelated titles with common release tags: it should usually not match

Workflow

Step 1: Analyze the Problem

Parse the torrent/file name provided by the user. Identify:

  • What is being incorrectly recognized (title, season, episode, year, quality, etc.)
  • What the correct recognition result should be
  • Which identifier format(s) will solve the problem
  • Which fragments in the provided sample are unique enough to use as regex anchors, so the rule does not accidentally affect unrelated titles
Step 2: Generate the Identifier Rule(s)

Write the rule using the appropriate format. Ensure:

  • Regex special characters are properly escaped
  • Add a comment line (starting with #) above the rule to describe what it does
  • Test the regex mentally against the provided name to verify correctness
  • Because the rule is global, prefer the most specific viable match; if a bare block word would be too broad, rewrite it as a contextual replacement that includes sample-specific anchors
Show full SKILL.md (429 more words)Show less
Step 3: Query Existing Identifiers

Use moviepilot_api with operation_id=config.identifiers.get to get all current rules:

{"operation_id": "config.identifiers.get"}
Step 4: Check for Duplicates

Compare each new rule against the existing identifiers:

  • Exact duplicate: The rule string is identical to an existing rule — skip it
  • Functional duplicate: A different rule that produces the same effect on the same input (e.g., same regex pattern with trivial whitespace differences) — warn the user
  • Conflict: An existing rule modifies the same text in a different way — warn the user and ask which to keep
Step 5: Save the Updated Identifiers

Merge new non-duplicate rules into the existing list, then use operation_id=config.identifiers.update to save the complete list:

{
  "operation_id": "config.identifiers.update",
  "body": {"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.

Step 6: Verify (Optional)

If the user wants to verify the rule works, use media.recognize to test:

{"operation_id": "media.recognize", "query": {"title": "the torrent title to test"}}
Step 7: Report

Tell the user:

  • What rule(s) were added
  • What effect they will have on the title
  • Whether any duplicates or conflicts were found

Common Scenarios and Examples

Wrong Season/Episode Parsing

User: "种子名 [SubGroup] My Show - 13 [1080P],这是第二季第1集,但被识别成第13集"

Solution: Episode offset to subtract 12:

# My Show 第二季集数偏移(13->1)
\[SubGroup\] <> \[1080P\] >> EP-12
Unwanted Text Causing Wrong Identification

User: "种子名 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\2
Non-Standard Naming

User: "文件名 [OldName] EP01.mkv,应该识别为 NewName"

Solution: Replacement scoped to the wrong alias:

# 将特定错误别名 OldName 替换为 NewName
\[OldName\] => [NewName]
Force TMDB ID Recognition

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]}
Force TMDB Episode Group Recognition

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]}
Combined Fix

User: "种子名 [Baha][OldTitle][13][1080P],标题应该是NewTitle,而且13应该是第二季第1集"

Solution: Combined replacement + episode offset:

# OldTitle替换为NewTitle并偏移集数
OldTitle => NewTitle && \[Baha\] <> \[1080P\] >> EP-12
Multiple Episode Numbers in One Title

User: "种子名 [Group] Title - 13-14 [1080P],应该是第1-2集"

Solution: Episode offset (handles multiple numbers between delimiters):

# Title 集数偏移
\[Group\] <> \[1080P\] >> EP-12

WordsMatcher Processing Logic Reference

The WordsMatcher.prepare() method (in app/domain/meta/words.py) processes each rule in order:

  1. Skip empty lines and lines starting with #
  2. Detect format by checking operator presence:
    • Contains => AND && AND >> AND <> → Combined format (4)
    • Contains => → Replacement format (2)
    • Contains >> AND <> → Episode offset format (3)
    • Otherwise → Block word format (1)
  3. For combined format, replacement runs first; episode offset only runs if replacement succeeded
  4. Returns the modified title and a list of rules that were actually applied
  5. Priority: per-subscribe custom_words parameter takes precedence over global CustomIdentifiers

Safety Notes

  • Always query existing rules first before updating
  • Never remove existing rules unless the user explicitly asks
  • Add comment lines before new rules for maintainability
  • Remember that new rules are global. If a rule looks broad, rewrite it to include more sample-specific anchors before saving.
  • When uncertain about the correct approach, present multiple options and let the user choose

© jxxghp, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/generate-identifiers of jxxghp/MoviePilot.

Open the folder on GitHubat commit 6034dcc

Compare with similar skills

MoviePilot Custom Identifier Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

MoviePilot Custom Identifier Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MoviePilot Custom Identifier Generator this skilljxxghp/MoviePilot12k—~2.8kAutomated safety check: PassGPL-3.0
Disk Storage AnalyzerKKKKhazix/khazix-skills21k1 repos~1.4kAutomated safety check: PassMIT
Answer Me With HTMLQingYunA/answer-me-with-html2.4k—~4.1kAutomated safety check: PassMIT
Abp App Nolayersabpframework/abp14k—~575Automated safety check: PassLGPL-3.0
Mole Mac Cleanup CLI Safetytw93/Mole70k—~1.9kAutomated safety check: PassGPL-3.0
Feishu Driveraucvr/Group-Goki1123 repos~587Automated safety check: PassMIT

Similar skills

  • Disk Storage Analyzer

    KKKKhazix/khazix-skills

    Scans a Mac or Windows PC read-only to find what fills the disk, grades each item by how safe it is to clean and builds an interactive HTML report.

    21k GitHub starsUsed in 1 repo~1.4k tokens
    Productivity & AutomationAuto-check passed
  • Answer Me With HTML

    QingYunA/answer-me-with-html

    Turns an answer into a one-page visual HTML explainer: the model writes a short Markdown draft and the bundled CLI builds one page.

    2.4k GitHub stars~4.1k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Abp App Nolayers

    abpframework/abp

    ABP Single-Layer (No-Layers / nolayers) application template - single project structure, feature-based file organization, no separate Domain/Application.Contracts projects.

    14k GitHub stars~575 tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Teaches an agent to drive the Mole (mo) Mac cleaning CLI safely: preview first, use JSON output, and leave destructive runs to the user.

    70k GitHub stars~1.9k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Feishu Drive

    raucvr/Group-Goki

    Feishu cloud storage file management. An agent skill from raucvr/Group-Goki.

    112 GitHub starsUsed in 3 repos~587 tokens
    Productivity & AutomationAuto-check passed
  • Azldev Comp Toml

    microsoft/azurelinux

    Official

    Read this before authoring, editing, or reviewing a .comp.toml file; do not work from memory.

    5.3k GitHub stars~1.8k tokensUpdated today
    Productivity & AutomationAuto-check passed

More from jxxghp/MoviePilot

All 16 skills in this repo
  • Inspects, diagnoses and directly controls qBittorrent, Transmission or rTorrent downloaders configured in MoviePilot through a bundled Python helper.

    12k GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Turns a confirmed MoviePilot bug or feature request into a structured upstream GitHub issue, but only after local diagnosis and an explicit request to file.

    12k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Inspects and operates Emby, Jellyfin, Plex and other media servers configured in MoviePilot through one helper script, without exposing stored credentials.

    12k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Publish MoviePilot Plugin

    jxxghp/MoviePilot

    Publishes and syncs a local MoviePilot plugin to a GitHub repository, merging only that plugin's package entry and previewing differences before writing.

    12k GitHub stars~1.9k tokensUpdated today
    Auto-check: notes
  • Submits code changes as a GitHub pull request through an isolated Git clone, reusing or creating your fork and pushing only after you confirm the real diff.

    12k GitHub stars~1.1k tokensUpdated today
    Auto-check: notes
  • AnySearch

    jxxghp/MoviePilot

    Gives your agent a real-time search service for web queries, domain-specific lookups, parallel batch searches and full-page URL extraction.

    12k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check: notes

Questions about MoviePilot Custom Identifier Generator

What does MoviePilot Custom Identifier Generator do?

Writes custom recognition rules for MoviePilot so misidentified torrent or file names resolve to the right title, season and episode. Custom identifiers clean up names before MoviePilot's recognition engine runs, and this skill produces them through the `moviepilot_api` tool.recognize`.

When should I use MoviePilot Custom Identifier Generator?

MoviePilot Custom Identifier Generator fits situations like: A release or file name is recognized with the wrong title, season or episode; blocking unwanted keywords from names before recognition; shifting episode numbers for a series with non-standard numbering; forcing recognition of a specific title by its TMDB or Douban ID.

How do I install MoviePilot Custom Identifier Generator in Claude Code?

Run `npx skills add jxxghp/MoviePilot --skill generate-identifiers -a claude-code`. Or copy the skill folder (skills/generate-identifiers in jxxghp/MoviePilot) into .claude/skills/generate-identifiers in your project. Claude Code loads it when a task matches its description.

How do I install MoviePilot Custom Identifier Generator in Codex?

Run `npx skills add jxxghp/MoviePilot --skill generate-identifiers -a codex`. Or copy the skill folder (skills/generate-identifiers in jxxghp/MoviePilot) into .agents/skills/generate-identifiers in your project. Codex loads it when a task matches its description.

Can I use MoviePilot Custom Identifier Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jxxghp/MoviePilot --skill generate-identifiers -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generate-identifiers, .gemini/skills/generate-identifiers, .github/skills/generate-identifiers and .opencode/skills/generate-identifiers in your project.

What does MoviePilot Custom Identifier Generator need to run?

SKILL.md names no scripts, command-line tools or credentials: MoviePilot Custom Identifier Generator is instructions for the agent only. Our summary lists: A running MoviePilot instance reachable through the `moviepilot_api` tool. Its frontmatter pre-approves these tools: moviepilot_api.

Does MoviePilot Custom Identifier Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is MoviePilot Custom Identifier Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does MoviePilot Custom Identifier Generator use?

MoviePilot Custom Identifier Generator is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does MoviePilot Custom Identifier Generator use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to MoviePilot Custom Identifier Generator?

Skills that share tags, products or a category with MoviePilot Custom Identifier Generator: Disk Storage Analyzer (KKKKhazix/khazix-skills, 21k stars), Answer Me With HTML (QingYunA/answer-me-with-html, 2.4k stars), Abp App Nolayers (abpframework/abp, 14k stars) and Mole Mac Cleanup CLI Safety (tw93/Mole, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MoviePilot Custom Identifier Generator?

jxxghp (a GitHub user) maintains it in jxxghp/MoviePilot, which has 11,853 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on October 9, 2026.

Source: jxxghp/MoviePilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.