Logo di Generate Identifiers

Generate Identifiers

CommunityPopolare
jxxghp
generate-identifiers

Usa questa skill quando un utente fornisce il nome di un torrent o di un file e vuole correggere problemi di riconoscimento, oppure chiede di aggiungere o gestire identificatori personalizzati (自定义识别词). Questa skill genera regole per gli identificatori in base alla logica di preelaborazione di WordsMatcher, controlla i duplicati rispetto alle regole esistenti e li salva tramite il gateway API strutturato di MoviePilot. Poiché gli identificatori personalizzati sono globali, le regole generate devono usare per impostazione predefinita espressioni regolari prudenti e specifiche per il campione, anziché corrispondenze generiche, a meno che l’utente non voglia esplicitamente una pulizia globale. Scenari pertinenti: 1) Il nome di un torrent o di un file viene riconosciuto in modo errato (titolo, stagione, episodio ecc.); 2) L’utente vuole bloccare parole chiave indesiderate nei nomi dei torrent; 3) L’utente ha bisogno di regole di offset degli episodi per serie con numerazione non standard; 4) L’utente vuole forzare il riconoscimento di un contenuto specifico tramite l’ID nativo della fonte; 5) L’utente vuole che il riconoscimento delle serie TV usi uno specifico gruppo di episodi TMDB.

Add to TypingMind

Panoramica

Pubblicato dajxxghp
RepositoryMoviePilot
Nome della skillgenerate-identifiers
Stelle
11.8K
Fork
1.5K
File inclusi
Solo istruzioni
LicenzaGPL-3.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da jxxghp su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Generate Identifiers in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/jxxghp/MoviePilot/tree/v3/skills/generate-identifiers
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jxxghp/MoviePilot.git /tmp/MoviePilot
mkdir -p .claude/skills
cp -r /tmp/MoviePilot/skills/generate-identifiers .claude/skills/generate-identifiers
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Generate Identifiers in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Generate Identifiers non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Generate Identifiers non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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

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

Domande frequenti

Cosa fa la skill IA Generate Identifiers?

Usa questa skill quando un utente fornisce il nome di un torrent o di un file e vuole correggere problemi di riconoscimento, oppure chiede di aggiungere o gestire identificatori personalizzati (自定义识别词). Questa skill genera regole per gli identificatori in base alla logica di preelaborazione di WordsMatcher, controlla i duplicati rispetto alle regole esistenti e li salva tramite il gateway API strutturato di MoviePilot. Poiché gli identificatori personalizzati sono globali, le regole generate devono usare per impostazione predefinita espressioni regolari prudenti e specifiche per il campione...

Perché usare Generate Identifiers su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Generate Identifiers è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Generate Identifiers in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/jxxghp/MoviePilot/tree/v3/skills/generate-identifiers. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Generate Identifiers?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Generate Identifiers?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Generate Identifiers: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Generate Identifiers è gratuita?

Sì. È pubblicata su GitHub da jxxghp con licenza GPL-3.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇