Chuyển đến nội dung
Skillpedia
Tự động hóa12k · #11484

generate-identifiers

Skill này làm gì

Skill xây các quy tắc làm sạch hoặc sửa tên torrent và tên file trước khi MoviePilot nhận diện, rồi lưu vào cài đặt của bạn. Skill dành cho người dùng MoviePilot có media bị khớp với sai tiêu đề.

Khi nào nên dùng

  • ✓Khi một tên torrent hoặc tên file bị nhận diện thành sai phim hoặc sai chương trình.
  • ✓Khi bạn muốn thêm một quy tắc định danh tùy chỉnh vào MoviePilot.
  • ✓Khi bạn muốn kiểm tra một quy tắc mới có trùng với quy tắc có sẵn không.

Liên kết skill

https://github.com/jxxghp/MoviePilot/blob/v3/skills/generate-identifiers/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/jxxghp/MoviePilot/blob/v3/skills/generate-identifiers/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tên file này bị khớp sai với một bộ phim. Bạn có thể tạo một quy tắc để MoviePilot nhận diện đúng không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

AI đọc các quy tắc hiện có, viết một quy tắc mới theo định dạng được hỗ trợ, kiểm tra trùng lặp rồi lưu toàn bộ danh sách qua API MoviePilot.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

Be

Câu hỏi thường gặp

Các quy tắc có áp dụng cho mọi thứ không?

Có, định danh tùy chỉnh là toàn cục, nên skill khuyên giữ quy tắc cụ thể để tránh tác dụng phụ.

Nó có thể viết những loại quy tắc nào?

Nó có thể viết từ khóa chặn, quy tắc thay thế, và quy tắc trỏ một tiêu đề tới một ID TMDB, Douban, Bangumi hoặc AniList cụ thể.

Lưu có thay thế các quy tắc hiện có của tôi không?

Lần lưu thay thế toàn bộ danh sách, nên skill đảm bảo các quy tắc hiện có của bạn được đưa vào khi lưu.

Chi tiết

Mô tả gốc của tác giả

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 incorr

repo: jxxghp/MoviePilot

Độ phổ biến

Sao GitHub
12k
Vị trí xếp hạng
#11484
Giấy phép
GPL-3.0
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự