Agent skill

Enhanced Message Context

by platformplatform in platformplatform/PlatformPlatform

Provide additional context for messages based on the codebase and the context of the message to improve the quality of the translations.

MITAuto-check passedWriting & Content

Install Enhanced Message Context

skills CLI
$ npx skills add platformplatform/PlatformPlatform --skill enhanced-message-context -a claude-code

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

GitHub CLI
$ gh skill install platformplatform/PlatformPlatform 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/platformplatform/PlatformPlatform.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/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
440
Token cost
~1.6k tokens
SKILL.md length
478 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

Provide additional context for messages based on the codebase and the context of the message to improve the quality of the translations.

  • Works in 3 steps: JS Macro (t) → React Macro (Trans) → Deferred/Lazy Messages (defineMessage /…
  • Tasks that involve Translation
  • SKILL.md covers When to Add Comments, Writing Effective Comments, API Reference and Examples, plus 2 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 platformplatform/PlatformPlatform. Provide additional context for messages based on the codebase and the context of the message to improve the quality of the translations.

Its SKILL.md is about 1.6k 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: A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc. The licence is MIT.

When your agent uses it

  • Tasks that involve Translation

Example prompts

  • “/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 269de1c. 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).

    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 1.6k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 478 words of instructions outside code blocks.

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

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 platformplatform/PlatformPlatform at commit 269de1c, republished under its MIT licence (© platformplatform). 478 words, ~1,572 tokens.

Download SKILL.mdSave it as .claude/skills/enhanced-message-context/SKILL.md (or your agent's skills folder).
name
enhanced-message-context
description
Provide additional context for messages based on the codebase and the context of the message to improve the quality of the translations.

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:

  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 (191 more words)Show less

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 (Comment Still Optional but Helpful)
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. Read the message: Look at the string itself
  2. Check context: Consider where and how it's used in the code
  3. Ask: "Could a translator misinterpret this without seeing the UI?"
  4. If yes: Add a comment field with location, purpose, and any disambiguation
  5. 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

© platformplatform, 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 .claude/skills/enhanced-message-context of platformplatform/PlatformPlatform.

Open the folder on GitHubat commit 269de1c

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 skillplatformplatform/PlatformPlatform440—~1.6kAutomated 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 yesterday
    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 yesterday
    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 yesterday
    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 platformplatform/PlatformPlatform

All 18 skills in this repo
  • Create Prd

    platformplatform/PlatformPlatform

    Create a product requirement document (PRD) for a new feature.

    440 GitHub stars~3k tokensUpdated 13 days ago
    Auto-check passed
  • Rebuild Branch

    platformplatform/PlatformPlatform

    Rebuild a stale branch by cherry-picking each commit onto a fresh branch off main, using a ralph-loop to validate each commit (build, test, format, lint, optional e2e) before moving on.

    440 GitHub stars~2.1k tokensUpdated 13 days ago
    Auto-check: notes
  • Swc Plugin Compatibility

    platformplatform/PlatformPlatform

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

    440 GitHub stars~873 tokensUpdated 13 days ago
    Auto-check passed
  • Aspire Restart

    platformplatform/PlatformPlatform

    Start or restart the .NET Aspire AppHost via the developer CLI.

    440 GitHub stars~415 tokensUpdated 13 days ago
    Auto-check passed
  • Commit

    platformplatform/PlatformPlatform

    Commit session changes to git. An agent skill from platformplatform/PlatformPlatform.

    440 GitHub stars~567 tokensUpdated 13 days ago
    Auto-check passed
  • E2E

    platformplatform/PlatformPlatform

    Run end-to-end Playwright tests via the developer CLI. An agent skill from platformplatform/PlatformPlatform.

    440 GitHub stars~542 tokensUpdated 13 days ago
    Auto-check passed

Questions about Enhanced Message Context

What does Enhanced Message Context do?

Provide additional context for messages based on the codebase and the context of the message to improve the quality of the translations. Enhanced Message Context is an agent skill from platformplatform/PlatformPlatform. Provide additional context for messages based on the codebase and the context of the message to improve the quality of the translations.

When should I use Enhanced Message Context?

Enhanced Message Context fits situations like: tasks that involve Translation.

How do I install Enhanced Message Context in Claude Code?

Run `npx skills add platformplatform/PlatformPlatform --skill enhanced-message-context -a claude-code`. Or copy the skill folder (.claude/skills/enhanced-message-context in platformplatform/PlatformPlatform) 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 platformplatform/PlatformPlatform --skill enhanced-message-context -a codex`. Or copy the skill folder (.claude/skills/enhanced-message-context in platformplatform/PlatformPlatform) 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 platformplatform/PlatformPlatform --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 1.6k tokens (SKILL.md is roughly 6.3k 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?

platformplatform (a GitHub organization) maintains it in platformplatform/PlatformPlatform, which has 440 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on September 24, 2026.

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