Anki Monolingual Hints
This skill automates the conversion of target language hints in Anki cloze deletions (e.g., {{c1::French::TargetLang}}) into cues in the target language, following a specific hierarchy of "thinking" strategies.
Strategy
When transforming a cloze hint, replace the original hint with a concise monolingual cue and keep the original translation (translated to the --target-language if different) at the end in parentheses (e.g., {{c1::Target::TL_Cue (TargetLang)}}).
Rules:
- Keep it small: Both the TL cue and the target language part should be as short as possible. Encourage common abbreviations (e.g.,
p.c. for passé composé, f. for féminin, m. for masculin) to keep the total length minimal.
- Single Strategy: Do not combine priorities (e.g., don't use both a synonym and a grammar cue). Pick the best one from the list below.
- No Self-Reference: The cue must not contain the target word itself or its clearly recognizable root.
Apply the following priority for the TL cue:
- Zero Hint: Use only the target language hint in parentheses if the sentence context makes the answer obvious (e.g.,
{{c1::de::(de)}}).
- Definition (TL): Provide a simple definition in the Target Language (e.g.,
{{c1::voiture::moyen de transport (coche)}}).
- Synonym/Antonym (TL): Use
= for synonyms or ≠ for antonyms (e.g., {{c1::triste::≠ content (triste)}}).
- Grammar Cue: Use a short label for conjugation or rules (e.g.,
{{c1::suis::être, présent (soy)}}).
Parameters
--deck: (Required) The Anki Deck Name to process.
--target-language: (Optional) The language to use for the parenthetical translation. Defaults to English.
--target-field: (Optional) The name of the field containing the cloze deletions. Defaults to Expression.
--limit: (Optional) Maximum number of notes to process in one run. Defaults to 5.
--dry-run: (Optional) Show the proposed changes without applying them.
--interactive / -i: (Optional) If enabled, process notes interactively, prompting the user to review and accept each transformation before updating.
Workflow
Step 1: Fetch Notes
Query AnkiConnect at http://localhost:8765.
- Use
findNotes with deck:"<deck-name>" and a query that targets notes with hints (e.g., {{c1::*::*}}).
- Use
notesInfo to fetch the field data for the identified notes.
- Sort the notes numerically by Frequency if available (descending) or by their creation ID.
- Limit the list to the number specified in
--limit.
Step 2: Analyze and Transform
For each note, identify the cloze deletions in the --target-field. For each deletion:
- Extract the Target Word and the Original Hint.
- Use your AI capabilities to evaluate the sentence context, the Target Word, and the
--target-language.
- Select the best strategy (Zero Hint, Definition, Synonym, or Grammar Cue) to replace the original hint.
- Construct the new cloze deletion (e.g.,
{{c1::word::new_hint}} or {{c1::word}}). Ensure the parenthetical translation is in the --target-language.
- If
--interactive (or -i) is enabled, present the transformation to the user for approval. Provide options: accept (y), reject (n), skip remaining (s), or quit (q).
Step 3: Apply Updates
- If
--dry-run is NOT specified, update Anki using the multi action to bundle multiple updateNoteFields and addTags requests into a single network call.
- For each note, save the modified field and add a tag
monolingual_conversion and the current date (YYYY-MM-DD).
Requirements
- Anki must be running with AnkiConnect installed.
- Access to the local network to communicate with
http://localhost:8765.
1---2name: anki-monolingual-hints3description: Transform Anki cloze deletion hints from your target language to monolingual cues (definitions, synonyms, or grammar cues) in the target language. Use this to help users "think" in the target language by removing crutches.4---56# Anki Monolingual Hints78This skill automates the conversion of target language hints in Anki cloze deletions (e.g., `{{c1::French::TargetLang}}`) into cues in the target language, following a specific hierarchy of "thinking" strategies.910## Strategy1112When transforming a cloze hint, replace the original hint with a **concise** monolingual cue and **keep the original translation (translated to the `--target-language` if different) at the end in parentheses** (e.g., `{{c1::Target::TL_Cue (TargetLang)}}`).1314**Rules:**15- **Keep it small:** Both the TL cue and the target language part should be as short as possible. **Encourage common abbreviations** (e.g., `p.c.` for `passé composé`, `f.` for `féminin`, `m.` for `masculin`) to keep the total length minimal.16- **Single Strategy:** Do not combine priorities (e.g., don't use both a synonym and a grammar cue). Pick the best one from the list below.17- **No Self-Reference:** The cue must not contain the target word itself or its clearly recognizable root.1819Apply the following priority for the TL cue:20211. **Zero Hint:** Use only the target language hint in parentheses if the sentence context makes the answer obvious (e.g., `{{c1::de::(de)}}`).222. **Definition (TL):** Provide a simple definition in the Target Language (e.g., `{{c1::voiture::moyen de transport (coche)}}`).233. **Synonym/Antonym (TL):** Use `=` for synonyms or `≠` for antonyms (e.g., `{{c1::triste::≠ content (triste)}}`).244. **Grammar Cue:** Use a short label for conjugation or rules (e.g., `{{c1::suis::être, présent (soy)}}`).2526## Parameters2728- `--deck`: (Required) The Anki Deck Name to process.29- `--target-language`: (Optional) The language to use for the parenthetical translation. Defaults to English.30- `--target-field`: (Optional) The name of the field containing the cloze deletions. Defaults to `Expression`.31- `--limit`: (Optional) Maximum number of notes to process in one run. Defaults to 5.32- `--dry-run`: (Optional) Show the proposed changes without applying them.33- `--interactive` / `-i`: (Optional) If enabled, process notes interactively, prompting the user to review and accept each transformation before updating.3435## Workflow3637### Step 1: Fetch Notes38Query AnkiConnect at `http://localhost:8765`.391. Use `findNotes` with `deck:"<deck-name>"` and a query that targets notes with hints (e.g., `{{c1::*::*}}`).402. Use `notesInfo` to fetch the field data for the identified notes.413. Sort the notes numerically by Frequency if available (descending) or by their creation ID.424. Limit the list to the number specified in `--limit`.4344### Step 2: Analyze and Transform45For each note, identify the cloze deletions in the `--target-field`. For each deletion:461. Extract the **Target Word** and the **Original Hint**.472. Use your AI capabilities to evaluate the sentence context, the Target Word, and the `--target-language`.483. Select the best strategy (Zero Hint, Definition, Synonym, or Grammar Cue) to replace the original hint.494. Construct the new cloze deletion (e.g., `{{c1::word::new_hint}}` or `{{c1::word}}`). Ensure the parenthetical translation is in the `--target-language`.505. If `--interactive` (or `-i`) is enabled, present the transformation to the user for approval. Provide options: accept (y), reject (n), skip remaining (s), or quit (q).5152### Step 3: Apply Updates531. If `--dry-run` is NOT specified, update Anki using the `multi` action to bundle multiple `updateNoteFields` and `addTags` requests into a single network call.542. For each note, save the modified field and add a tag `monolingual_conversion` and the current date (YYYY-MM-DD).5556## Requirements57- **Anki** must be running with **AnkiConnect** installed.58- Access to the local network to communicate with `http://localhost:8765`.