kimei-global-co/react-native-boilerplate/enhanced-message-context
Claude Code and agent skill by kimei-global-co/react-native-boilerplate
- community
Checking that the SKILL.md file is still in the repository.
Provide additional context for messages based on the codebase and the context of the message to improve the quality of the translations.
Install
npx vskill@latest install kimei-global-co/react-native-boilerplate/enhanced-message-contextSKILL.md
The same SKILL.md was published earlier as jprokopski/picnivo/enhanced-message-context.
Enhanced Message Context
When implementing Lingui i18n, add translator comments to messages so translators have context to provide the best translation. Even when the message text is self-explanatory, it is important to know where and how it appears in the UI to choose the correct tone, length, and wording.
When to Add Comments
Add a comment field when the message:
- Is ambiguous: Short words/phrases that can be different parts of speech
- "Back" (noun or verb?), "Delete" (button or confirmation?), "Close" (verb or adjective?)
- Lacks UI context: Labels isolated from their surroundings
- Table column headers, tooltip content, standalone button labels, menu items
- Has domain-specific meaning: Terms with different meanings across contexts
- "Post" (verb or noun?), "Tag" (noun or verb?), "Follow" (social media or instruction?)
- Depends on grammatical gender: The translation depends on what the message refers to
- "Selected" (masculine/feminine/neutral depends on what is selected)
- Uses unclear variables: Placeholder names don't reveal what they contain
{count}(count of what?),{name}(user name, file name, project name?)- Could benefit from UI context even if clear: Where the text appears (button, dialog, banner, form field) affects tone and length - add a brief location or purpose comment when it helps.
Writing Effective Comments
A good translator comment includes:
- 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"
- 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"
- 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"
API Reference
Lingui provides three ways to add translator comments:
1. JS Macro (t)
For JavaScript code outside JSX:
2. React Macro (Trans)
For JSX elements:
3. Deferred/Lazy Messages (defineMessage / msg)
For messages defined separately from their usage:
Examples
Example 1: Ambiguous Short Word
Before (no context):
After (with context):
Example 2: UI Label Without Context
Before (no context):
After (with context):
Example 3: Domain-Specific Term
Before (ambiguous):
After (clarified as verb):
Example 4: Variable Without Clear Meaning
Before (unclear what count represents):
After (clarified):
Example 5: Self-Explanatory Message (Comment Still Optional but Helpful)
Workflow
When implementing or reviewing Lingui messages:
- Read the message: Look at the string itself
- Check context: Consider where and how it's used in the code
- Ask: "Could a translator misinterpret this without seeing the UI?"
- If yes: Add a
commentfield with location, purpose, and any disambiguation - If no: Skip the comment and keep the code clean
Notes
- Comments are extracted into message catalogs for translators
- Comments are stripped from production builds (zero runtime cost)
- Comments appear in translation management systems (TMS)
- Use consistent terminology across all comments in your project
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtemplate/dotfiles/agents-setup/skills/enhanced-message-context/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kimei-global-co/react-native-boilerplate/enhanced-message-context)