npx skills add ...
npx skills add crowdin/skills --skill context-extraction
Writes meaningful ai_context values in Crowdin JSONL files for strings that need translator context. Use when extracting context, filling ai_context fields, adding context to ambiguous strings, or working with Crowdin JSONL context files.
npx skills add crowdin/skills --skill context-extraction
For each string, use these JSONL fields in order - stop when you have enough to write a confident ai_context:
text - the source string itself; always the primary signalkey - often encodes structure (e.g. button.save, modal.title.delete_user, error.network.timeout)context - may contain a free-text description, a translator comment, a source file reference, or be empty; treat as supplementary and don't assume any specific formatcontext contains a parseable file path + line number and the string is still ambiguous; read ±10–15 lines around the reference to identify UI element type, surrounding component, and propsPrioritize these - skip strings that are already clear from text + key alone:
ai_context values# is replaced with| String | Key | Good ai_context |
|---|---|---|
"Red" | color.red | "Color option label in a color picker. Refers to the color red as a selectable choice." |
"Blue" | (none) | "Color name used as a selectable option or status label. Clarify based on surrounding UI." |
"{count, plural, one {# month} other {# months}}" | duration.months | "Displays a duration in months. '#' is replaced by the numeric count." |
"Edit <0>src/App.tsx</0> and save to test HMR" | (none) | "Instructional UI message. The tagged portion is rendered as an inline code element highlighting a filename." |
"New" | button.new | "Label for a button that creates a new item. The exact entity depends on the current page context." |
When another workflow invokes this skill with extra context, use it:
context field carries a #: path:line reference (PO uploads add these automatically) and the repo is available, read the surrounding code instead of guessing: identify the component type, the props, and what any placeholder is replaced with.Neither input changes the safety rules below - still edit only ai_context.
Only ever edit the ai_context field value. Never touch id, key, text, file, or context.
Single-string (1–5 lines): Use StrReplace scoped to the exact line. Target the "ai_context":"" substring (or the full current value if already set):
Batch (many strings): When dozens or hundreds of lines need context, work in batches instead of one string at a time.
ai_context, fill context for a batch of those lines (parse line as JSON, set ai_context, serialize back to a single line), then write or apply that batch of changes. Repeat for the next batch until done.ai_context value is a quoted string\"" → \"\ → \\