Agent skill

Enhanced Message Context

by B0und in B0und/WikiSpeedrun

Add translator comments to Lingui messages so translations are accurate.

MITAuto-check passedWriting & Content

Install Enhanced Message Context

skills CLI
$ npx skills add B0und/WikiSpeedrun --skill enhanced-message-context -a claude-code

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

GitHub CLI
$ gh skill install B0und/WikiSpeedrun enhanced-message-context --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/B0und/WikiSpeedrun.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/enhanced-message-context .claude/skills/enhanced-message-context && 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
enhanced-message-context
GitHub stars
133
Token cost
~3.3k tokens
SKILL.md length
1,437 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Add translator comments to Lingui messages so translations are accurate.

  • Works in 3 steps: JS Macro (t) → React Macro (Trans) → Deferred/Lazy Messages (defineMessage /…
  • Modifying translatable messages
  • SKILL.md covers Know the App Domain First, When to Add Comments, t tagged templates cannot… and Leave vendored component…, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Enhanced Message Context is an agent skill from B0und/WikiSpeedrun. Add translator comments to Lingui messages so translations are accurate. Use when adding or modifying translatable messages, when strings are short or ambiguous ("Back", "Delete", "Post"), when placeholders are unclear ({count}, {name}), when deciding between comment and context, or when auditing extracted .po catalogs for missing translator context.

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Writing & Content, covering Translation. The repository describes itself as: Wikipedia Speedrun Game. The licence is MIT.

When your agent uses it

  • Modifying translatable messages
  • Strings are short
  • Ambiguous (Back
  • Placeholders are unclear ({count}

Example prompts

  • “Delete”
  • “/enhanced-message-context”

Workflow steps

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

  1. JS Macro (t)
  2. React Macro (Trans)
  3. Deferred/Lazy Messages (defineMessage / msg)

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript, bash and po).

    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

Enhanced Message Context loads about 3.3k tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 1,437 words of instructions outside code blocks.

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

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 B0und/WikiSpeedrun at commit a03d655, republished under its MIT licence (© B0und). 1,437 words, ~3,349 tokens.

Download SKILL.mdSave it as .claude/skills/enhanced-message-context/SKILL.md (or your agent's skills folder).
name
enhanced-message-context
description
Add translator comments to Lingui messages so translations are accurate. Use when adding or modifying translatable messages, when strings are short or ambiguous ("Back", "Delete", "Post"), when placeholders are unclear ({count}, {name}), when deciding between comment and context, or when auditing extracted .po catalogs for missing translator context.

Enhanced Message Context

When implementing Lingui i18n, add translator comments to the messages that need them, so translators have the context to choose the right tone, length, and wording. Which messages need them is the whole question, and the tiers below answer it: a short label carries almost no context of its own and a full sentence carries most of it, so they earn very different treatment.

Know the App Domain First

Before writing comments, identify what the product is about — check package.json description, the README, and route/component names. The domain disambiguates terms that are otherwise unresolvable: in a parking app, "Park" is a parking spot, not a nature park; in a social app, "Post" is likely a noun. Reference the domain in comments whenever a term is domain-sensitive.

When to Add Comments

Prioritize in tiers:

Must comment — translations will be wrong without it:

  • Ambiguous short strings: 1-2 word phrases with multiple meanings or parts of speech
    • "Back" (noun or verb?), "Delete" (button or confirmation?), "Close" (verb or adjective?)
  • Action labels without a visible object: the code shows what's acted on, the translator can't see it
    • "Remove" (remove what?), "Apply" (apply to what?)
  • Domain-sensitive terms: words whose meaning depends on the product
    • "Post" (verb or noun?), "Tag" (noun or verb?), "Park" (spot or greenspace?)
  • Grammatical-gender dependence: the translation depends on what the message refers to
    • "Selected" (masculine/feminine/neutral depends on what is selected)
  • Unclear placeholders: names that don't reveal what they contain
    • {count} (count of what?), {name} (user name, file name, project name?)

Should comment — quality improves noticeably:

  • UI jargon: "Toast", "Drawer", "Chip", "Modal" — component names translators may read literally
  • Abbreviations: "Qty", "Avg", "N/A"
  • Sentence fragments: text completed by surrounding UI ("per month", "of 24")
  • Labels isolated from surroundings: table column headers, tooltips, menu items

Ship uncommented — the message already carries its own context:

  • Full, self-explanatory sentences. "We couldn't reach the server. Check your connection and try again." tells a translator everything a location note would. Comment one only where tone or length is genuinely constrained — a 40-character table cell, a legal phrase with a required register.
  • Strings whose comment would only restate the text or its file path. "Feature card body text on the features page" attached to a three-sentence paragraph is cost without information.

Plural branches don't need separate comments — one comment on the whole message covers all forms.

Aim for coverage, not saturation

A catalog where nearly every message carries a comment is evidence the tiers were skipped, not evidence of quality. The must-comment tier at 100% is the target; the whole catalog at 100% is not.

Two costs make that real, and both fall on people rather than tooling: comments on everything train translators to skim past comments, so the load-bearing ones stop being read; and every comment is a claim about the UI that rots when the UI moves.

When auditing an existing catalog, measure the must-comment tier specifically rather than overall #. coverage — short messages with no comment are the finding, and a headline percentage hides them. This lists every uncommented entry with its #: reference, which is enough to sort by tier at a glance:

bash
awk -v RS='' '/msgid "[^"]/ && !/#\./' src/locales/en/messages.po

Paragraph mode (RS='') matches against the whole entry, so leave the patterns unanchored — ^msgid only fires on entries that begin with msgid, and most begin with a #: reference line.

t tagged templates cannot carry a comment

This is the single most common way a wrapping pass ends up with no context: the tagged-template form has nowhere to put one.

jsx
// ❌ No comment possible — there is no argument to attach one to
<img alt={t`Company logo`} />

// ✅ Object form takes `comment`
<img alt={t({ comment: "Alt text for the logo in the site header", message: "Company logo" })} />

The same applies to msg`…` versus msg({ … }), and to plural(count, { … }) used bare.

Decide the comment while wrapping, not afterwards. For anything in the must-comment tier, reach for the object form the first time. The tagged-template form is the natural thing to type, so leaving it until later turns one decision into a mechanical edit across every attribute, placeholder, and toast in the codebase.

Trans has no such limitation: comment is just a prop, so JSX content can always be commented in place.

jsx
<Trans comment="Button in the toolbar that returns to the previous page">Back</Trans>

Leave vendored component libraries alone

Copy inside components/ui/** — shadcn/ui, or any generator-vendored Radix wrapper — is not yours to comment or wrap. shadcn add overwrites those files wholesale, so a macro or a comment added there disappears on the next update, silently and with a green build.

That governs this skill's audit pass too: when a catalog entry's #: reference points into a vendored directory, record it as a known residual and move to the next entry — the file itself stays closed.

If that copy genuinely needs translating, the fix is a project-owned wrapper component that holds the strings and delegates presentation to the primitive — a deliberate design decision for the project, not something a context pass introduces.

Writing Effective Comments

A good translator comment includes:

  1. Location: Where in the UI the message appears

    • "Button in the top navigation bar"
    • "Tooltip for the save icon"
    • "Column header in the users table"
  2. Action/Purpose: What happens or what it means

    • "Navigates back to the previous page"
    • "Deletes the selected item permanently"
    • "Shows the number of unread notifications"
  3. Disambiguation: Clarify part of speech or meaning

    • "Used as a verb, not a noun"
    • "Refers to email addresses, not postal addresses"
    • "Singular form, user will see 'item' or 'items' based on count"
Show full SKILL.md (569 more words)Show less
Quality Rules
  • Describe where it appears and what it refers to — not what the word means.
    • Bad: "Save — means to store"
    • Good: "Save button in the document editor toolbar"
  • Keep it under ~80 characters. A comment is a hint, not documentation.
  • Reference the app domain when the term is domain-sensitive: "Park — a parking spot, not a nature park"
  • Write comments in the source language of the project.
  • Use consistent terminology across all comments (same words for the same UI areas).
comment vs context

They solve different problems — don't mix them up:

  • comment is advice for the translator. It never changes the message identity.
  • context changes the message ID: the same text with two context values becomes two catalog entries translated independently. Use it only when the same source text genuinely needs different translations ("right" as direction vs. correctness).
  • Never use context as a namespace (auth.login, settings.title). Identical strings with identical meaning should share one catalog entry; namespacing splits them into duplicate translation work.

API Reference

Lingui provides three ways to add translator comments:

1. JS Macro (t)

For JavaScript code outside JSX:

js
import { t } from "@lingui/core/macro";

// With comment
const backLabel = t({
  comment: "Button in the navigation bar that returns to the previous page",
  message: "Back",
});

// With comment and variable
const uploadSuccess = t({
  comment: "Success message showing the name of the file that was uploaded",
  message: `File ${fileName} uploaded successfully`,
});
2. React Macro (Trans)

For JSX elements:

jsx
import { Trans } from "@lingui/react/macro";

// With comment
<Trans comment="Button that deletes the selected email message">Delete</Trans>

// With comment in a component
<button>
  <Trans comment="Label for button that saves changes to user profile">
    Save
  </Trans>
</button>
3. Deferred/Lazy Messages (defineMessage / msg)

For messages defined separately from their usage:

js
import { defineMessage } from "@lingui/core/macro";

const messages = {
  deleteButton: defineMessage({
    comment: "Button that permanently removes the item from the database",
    message: "Delete",
  }),

  statusLabel: defineMessage({
    comment: "Shows whether the service is currently operational. Values: 'Active', 'Inactive', 'Pending'",
    message: "Status: {status}",
  }),
};

Examples

Example 1: Ambiguous Short Word

Before (no context):

jsx
<button onClick={goBack}>
  <Trans>Back</Trans>
</button>

After (with context):

jsx
<button onClick={goBack}>
  <Trans comment="Button in the toolbar that navigates to the previous page">
    Back
  </Trans>
</button>
Example 2: UI Label Without Context

Before (no context):

jsx
const columns = [
  { key: "name", label: t`Name` },
  { key: "status", label: t`Status` },
];

After (with context):

jsx
const columns = [
  { 
    key: "name", 
    label: t({
      comment: "Column header in the projects table showing project name",
      message: "Name"
    })
  },
  { 
    key: "status", 
    label: t({
      comment: "Column header showing project status: Active, Inactive, or Archived",
      message: "Status"
    })
  },
  { 
    key: "created", 
    label: t({
      comment: "Column header showing the date when the project was created",
      message: "Created"
    })
  },
];
Example 3: Domain-Specific Term

Before (ambiguous):

jsx
<button onClick={handlePost}>
  <Trans>Post</Trans>
</button>

After (clarified as verb):

jsx
<button onClick={handlePost}>
  <Trans comment="Button that publishes the content. Used as a verb (to post), not a noun (a post)">
    Post
  </Trans>
</button>
Example 4: Variable Without Clear Meaning

Before (unclear what count represents):

js
const message = t`${count} items selected`;

After (clarified):

js
const message = t({
  comment: "Shows the number of email messages currently selected in the inbox",
  message: `${count} items selected`,
});
Example 5: Self-Explanatory Message (Lower Priority, Still Valuable)
jsx
// Message is clear on its own; adding a comment with location still helps translators
<Trans comment="Validation hint shown below the password field on the sign-up form">
  Your password must contain at least 8 characters, including one uppercase letter and one number.
</Trans>

Workflow

When implementing or reviewing Lingui messages:

  1. Know the domain: Identify what the app is about (see above) so comments can disambiguate domain terms
  2. Read the message: Look at the string itself
  3. Check context: Consider where and how it's used in the code
  4. Ask: "Could a translator misinterpret this without seeing the UI?"
  5. If yes: reach for the object form (t({ comment, message }), Trans comment=…) at the moment you wrap, and give it location, purpose, and any disambiguation
  6. If no: leave it uncommented and move on. A self-explanatory sentence does not need a location note, and adding one costs more than it returns

Post-Extraction Review Pass

After a batch of i18n work, audit the catalog instead of trusting that comments were added along the way:

  1. Run lingui extract
  2. Scan the source-locale .po file for entries with no #. line (that's where comment lands)
  3. Triage by tier — do not treat every uncommented entry as a defect. Short or ambiguous strings, unclear placeholders and domain terms go back to the source and get a comment. Full self-explanatory sentences are a correct outcome, not a gap
  4. Skip entries whose #: reference points into a vendored directory (components/ui/**) and record them as known residuals
  5. Re-run lingui extract and confirm the #. lines appear

Report the result as the must-comment tier's coverage plus what you deliberately left alone — "every short label commented, 120 self-explanatory sentences left as-is, 25 vendored residuals" — rather than a single catalog-wide percentage, which cannot distinguish those three.

po
#. Button in the toolbar that navigates to the previous page
#: src/components/Toolbar.tsx:24
msgid "Back"
msgstr ""

Notes

  • Comments are extracted into message catalogs for translators
  • Comments are stripped from production builds — zero runtime cost, which is not the same as zero cost: the cost is a translator's attention and a maintainer's upkeep, and that is what the tiers ration
  • Comments appear in translation management systems (TMS)
  • Use consistent terminology across all comments in your project

© B0und, MIT. 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 .agents/skills/enhanced-message-context of B0und/WikiSpeedrun.

Open the folder on GitHubat commit a03d655

Compare with similar skills

Enhanced Message Context 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.

Enhanced Message Context compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Enhanced Message Context this skillB0und/WikiSpeedrun133—~3.3kAutomated safety check: PassMIT
Translation Diff ExportDevolutions/UniGetUI26k—~1.1kAutomated safety check: PassMIT
Sync Translationssymfony/symfony31k—~1.9kAutomated safety check: PassMIT
Translation Diff ImportDevolutions/UniGetUI26k—~750Automated safety check: PassMIT
Translation Diff TranslateDevolutions/UniGetUI26k—~934Automated safety check: PassMIT
Generate Translationspayloadcms/payload45k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Translation Diff Export

    Devolutions/UniGetUI

    Compares UniGetUI JSON locale files against English, identifies untranslated or source-changed keys, and generates patch, reference, and handoff files for a target language.

    26k GitHub stars~1.1k tokensUpdated today
    Writing & ContentAuto-check passed
  • Sync Translations

    symfony/symfony

    Synchronize translation catalogs across maintained Symfony branches: find messages that newer branches added to the English catalogs but that are still missing from the oldest maintained branch…

    31k GitHub stars~1.9k tokensUpdated today
    Writing & ContentAuto-check passed
  • Translation Diff Import

    Devolutions/UniGetUI

    Merges translated key-value pairs from a UniGetUI JSON localization patch back into the full language file and validates the merged result.

    26k GitHub stars~750 tokensUpdated today
    Writing & ContentAuto-check passed
  • Translation Diff Translate

    Devolutions/UniGetUI

    Translates a sparse UniGetUI JSON language patch, writes completed entries into the working copy, preserves placeholders and terminology, and prepares the patch for merge-back.

    26k GitHub stars~934 tokensUpdated today
    Writing & ContentAuto-check passed
  • Generate Translations

    payloadcms/payload

    A skill your agent uses when new translation keys are added to packages to generate new translations strings

    45k GitHub stars~1.1k tokensUpdated today
    Writing & ContentAuto-check passed
  • Drives long-form fiction, scripts, storyboards, interactive films and long-document translation through InkOS, with every change made by a typed action.

    10k GitHub starsUsed in 1 repo~1.1k tokens
    Writing & ContentAuto-check passed

More from B0und/WikiSpeedrun

  • Lingui Best Practices

    B0und/WikiSpeedrun

    Implement internationalization with Lingui in React and JavaScript applications.

    133 GitHub starsUsed in 2 repos~4.2k tokens
    Auto-check passed
  • Find Unwrapped Strings

    B0und/WikiSpeedrun

    Audit a Lingui project for hardcoded user-facing strings that were never wrapped in macros.

    133 GitHub stars~2.1k tokensUpdated 18 days ago
    Auto-check passed
  • Lingui Framework Setup

    B0und/WikiSpeedrun

    Set up Lingui in a React framework. An agent skill from B0und/WikiSpeedrun.

    133 GitHub stars~1.9k tokensUpdated 18 days ago
    Auto-check passed
  • Migrate I18next To Lingui

    B0und/WikiSpeedrun

    Migrate i18next/react-i18next projects to Lingui. An agent skill from B0und/WikiSpeedrun.

    133 GitHub stars~3.1k tokensUpdated 18 days ago
    Auto-check passed
  • Swc Plugin Compatibility

    B0und/WikiSpeedrun

    Diagnose and fix Lingui SWC plugin compatibility errors with Next.js, Vite, Rspack, or other SWC runtimes.

    133 GitHub stars~2.3k tokensUpdated 18 days ago
    Auto-check passed

Questions about Enhanced Message Context

What does Enhanced Message Context do?

Add translator comments to Lingui messages so translations are accurate. Enhanced Message Context is an agent skill from B0und/WikiSpeedrun. Add translator comments to Lingui messages so translations are accurate.

When should I use Enhanced Message Context?

Enhanced Message Context fits situations like: modifying translatable messages; strings are short; ambiguous (Back; placeholders are unclear ({count}.

How do I install Enhanced Message Context in Claude Code?

Run `npx skills add B0und/WikiSpeedrun --skill enhanced-message-context -a claude-code`. Or copy the skill folder (.agents/skills/enhanced-message-context in B0und/WikiSpeedrun) into .claude/skills/enhanced-message-context in your project. Claude Code loads it when a task matches its description.

How do I install Enhanced Message Context in Codex?

Run `npx skills add B0und/WikiSpeedrun --skill enhanced-message-context -a codex`. Or copy the skill folder (.agents/skills/enhanced-message-context in B0und/WikiSpeedrun) into .agents/skills/enhanced-message-context in your project. Codex loads it when a task matches its description.

Can I use Enhanced Message Context 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 B0und/WikiSpeedrun --skill enhanced-message-context -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/enhanced-message-context, .gemini/skills/enhanced-message-context, .github/skills/enhanced-message-context and .opencode/skills/enhanced-message-context in your project.

What does Enhanced Message Context need to run?

SKILL.md names no scripts, command-line tools or credentials: Enhanced Message Context is instructions for the agent only.

Does Enhanced Message Context 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 Enhanced Message Context 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 Enhanced Message Context use?

Enhanced Message Context is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Enhanced Message Context use?

About 3.3k tokens (SKILL.md is roughly 13k 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 Enhanced Message Context?

Skills that share tags, products or a category with Enhanced Message Context: Translation Diff Export (Devolutions/UniGetUI, 26k stars), Sync Translations (symfony/symfony, 31k stars), Translation Diff Import (Devolutions/UniGetUI, 26k stars) and Translation Diff Translate (Devolutions/UniGetUI, 26k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Enhanced Message Context?

B0und (a GitHub user) maintains it in B0und/WikiSpeedrun, which has 133 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on September 19, 2026.

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