Official agent skill

Language Injection

by microsoft in microsoft/data-formulator

LLM Agent 多语言注入规范。在修改 Agent 提示词、添加新的 Agent 端点、处理用户可见的后端消息(messagecode)时使用。

OfficialMITAuto-check passedFrontend & Design

Install Language Injection

skills CLI
$ npx skills add microsoft/data-formulator --skill language-injection -a claude-code

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

GitHub CLI
$ gh skill install microsoft/data-formulator language-injection --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/microsoft/data-formulator.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/language-injection .claude/skills/language-injection && 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
language-injection
GitHub stars
18k
Token cost
~1.2k tokens
SKILL.md length
283 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

LLM Agent 多语言注入规范。在修改 Agent 提示词、添加新的 Agent 端点、处理用户可见的后端消息(messagecode)时使用。

  • Works in 4 steps: Add language code + display name to… → Optionally add extra rules to… → Add frontend translations in… → …
  • Frontend & Design work in your project
  • SKILL.md covers Architecture, Code Examples, Anti-Patterns (with… and Adding a New Language
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Language Injection is an agent skill from microsoft/data-formulator, published by the product's own GitHub organization. LLM Agent 多语言注入规范。在修改 Agent 提示词、添加新的 Agent 端点、处理用户可见的后端消息(messagecode)时使用。

Its SKILL.md is about 1.2k 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 Frontend & Design. It works with Python. The repository describes itself as: 🪄 Data Formulator is an interactive AI-powered data analysis system makes it easy to connect, explore and visualize data. The licence is MIT.

When your agent uses it

  • Frontend & Design work in your project

Example prompts

  • “/language-injection”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Add language code + display name to LANGUAGE_DISPLAY_NAMES in agents/agent_language.py.
  2. Optionally add extra rules to LANGUAGE_EXTRA_RULES (e.g. simplified vs traditional Chinese).
  3. Add frontend translations in src/i18n/locales// — copy an existing locale folder as template.
  4. No Agent code changes needed — the existing flow picks up new languages automatically.

What it can do on your machine

Read from SKILL.md and the folder at commit 5477f0e. 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 python and typescript).

    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

Language Injection loads about 1.2k tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 283 words of instructions outside code blocks.

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

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 microsoft/data-formulator at commit 5477f0e, republished under its MIT licence (© microsoft). 283 words, ~1,230 tokens.

Download SKILL.mdSave it as .claude/skills/language-injection/SKILL.md (or your agent's skills folder).
name
language-injection
description
LLM Agent 多语言注入规范。在修改 Agent 提示词、添加新的 Agent 端点、处理用户可见的后端消息(message_code)时使用。

Language Injection for Agent Prompts

Authoritative developer guide: docs/dev-guides/6-i18n-language-injection.md.

Prerequisites: Read docs/dev-guides/6-i18n-language-injection.md before changing Agent prompts, Agent routes, backend user-visible messages, or frontend i18n strings. If your work introduces new language injection patterns or conventions, update this file and related dev-guides accordingly.

Architecture

Frontend i18n.language  →  Accept-Language header  →  get_language_instruction()
                                                           │
                                                   build_language_instruction()
                                                   (agents/agent_language.py)
                                                           │
                                              ┌────────────┴────────────┐
                                              ▼                         ▼
                                        mode="full"               mode="compact"
                                    (text-heavy agents)        (code-gen agents)
Core Modules
ModuleRole
agents/agent_language.pybuild_language_instruction(lang, mode) — generates prompt fragments; inject_language_instruction() — injects into system prompts; supports 20 languages; returns "" for English
routes/agents.py → get_language_instruction()Reads Accept-Language header, delegates to build_language_instruction
routes/agents.py → _get_ui_lang()Extracts primary language code from Accept-Language header
src/app/utils.tsx → fetchWithIdentity()Sets Accept-Language header on every API request from i18n.language
src/app/utils.tsx → translateBackend()Translates backend message_code / content_code using frontend i18n

Code Examples

Route handler — inject language
python
# In a Flask route handler:
lang_instruction = get_language_instruction(mode="compact")
lang_suffix = f"\n\n{lang_instruction}" if lang_instruction else ""

messages = [
    {"role": "system", "content": "You are a helpful assistant." + lang_suffix},
    {"role": "user", "content": user_input},
]
Agent constructor — use inject_language_instruction()
python
from data_formulator.agents.agent_language import inject_language_instruction

# Simple append (most agents)
system_prompt = inject_language_instruction(system_prompt, language_instruction)

# Insert before a marker (complex prompts)
system_prompt = inject_language_instruction(
    system_prompt, language_instruction,
    marker="**About the execution environment:**"
)
Python-side user-visible messages — message_code pattern

For fixed strings in Python that appear in the UI, do NOT translate in Python. Return a message_code and let the frontend translate:

python
# In an Agent or route handler:
yield {
    "type": "error",
    "message": "Output DataFrame is empty (0 rows).",  # English fallback
    "message_code": "agent.emptyDataframe",             # frontend i18n key
}

# With parameters:
result = {
    "status": "error",
    "content": f"Fields not found: {missing}",
    "content_code": "agent.fieldsNotFound",
    "content_params": {"missing": missing, "available": available},
}

Frontend consumption:

tsx
import { translateBackend } from '../app/utils';
const msg = translateBackend(event.message, event.message_code, event.message_params);

Translation keys go in src/i18n/locales/{en,zh}/messages.json under messages.agent.*.

Anti-Patterns (with explanations)

PatternWhy it's wrong
os.environ.get("DF_DEFAULT_LANGUAGE")Process-level — all users get same language; breaks multi-user
Global LLM client interceptorHidden behavior; can't distinguish full/compact mode; fragile string detection
New MessageBuilder classDuplicates agent_language.py; creates parallel conflicting abstractions
Hardcoded "回答请使用中文" in promptsNot configurable; skips the mode system; breaks for other languages
Backend-side translation dict (agent_messages.py)Forces adding every new language to Python; translations should all live in src/i18n/locales/
Hardcoded English UI strings in .tsx without t()Not translatable; use useTranslation + t('key')

Adding a New Language

  1. Add language code + display name to LANGUAGE_DISPLAY_NAMES in agents/agent_language.py.
  2. Optionally add extra rules to LANGUAGE_EXTRA_RULES (e.g. simplified vs traditional Chinese).
  3. Add frontend translations in src/i18n/locales/<lang>/ — copy an existing locale folder as template.
  4. No Agent code changes needed — the existing flow picks up new languages automatically.

© microsoft, 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 .cursor/skills/language-injection of microsoft/data-formulator.

Open the folder on GitHubat commit 5477f0e

Compare with similar skills

Language Injection 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.

Language Injection compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Language Injection this skillmicrosoft/data-formulator18k—~1.2kAutomated safety check: PassMIT
Claude Desktop Chinese Localizationjavaht/claude-desktop-zh-cn7.5k—~1.6kAutomated safety check: PassMIT
DocsPrefectHQ/fastmcp28k—~1kAutomated safety check: PassApache-2.0
Oil UIoil-oil/oil-ui1k—~1.7kAutomated safety check: PassMIT
Jarvis Setupethanplusai/jarvis838—~2.5kAutomated safety check: NotesCustom licence
Ibm A11y Route Scanlangflow-ai/langflow156k—~1.6kAutomated safety check: PassMIT

Similar skills

  • Claude Desktop Chinese Localization

    javaht/claude-desktop-zh-cn

    Adds missing Simplified and Traditional Chinese translations to the Claude Desktop Chinese patch across three layers, then checks how many mappings actually hit.

    7.5k GitHub stars~1.6k tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Docs

    PrefectHQ/fastmcp

    Write or revise a page under docs/ for gofastmcp.com. An agent skill from PrefectHQ/fastmcp.

    28k GitHub stars~1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Oil UI

    oil-oil/oil-ui

    Design, improve, and review interfaces for websites, apps, dashboards, and components: explore distinct design directions, compare styles side by side, and refine visual hierarchy against real…

    1k GitHub stars~1.7k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Jarvis Setup

    ethanplusai/jarvis

    A skill your agent uses when helping someone install, configure, or debug a fresh clone of JARVIS (this repo) — especially "the mic doesn't work", "JARVIS says his language systems are down", any…

    838 GitHub stars~2.5k tokensUpdated 27 days ago
    Frontend & DesignAuto-check: notes
  • Ibm A11y Route Scan

    langflow-ai/langflow

    Batch-scan Langflow frontend routes for accessibility issues using the Python IBM Equal Access scanner (scripts/a11y/a11yscan.py) and produce JSON/Markdown/HTML reports.

    156k GitHub stars~1.6k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Build Fluentqt Gui

    calvinhxx/Fluent-Qt

    Create, integrate, redesign, or fix C++ and PySide6 GUIs using FluentQt, including component and Gallery work.

    155 GitHub stars~1.6k tokensUpdated today
    Frontend & DesignAuto-check passed

More from microsoft/data-formulator

  • Error Handling

    microsoft/data-formulator

    Official

    统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用. An agent skill from microsoft/data-formulator.

    18k GitHub stars~3.8k tokensUpdated today
    Auto-check passed
  • Path Safety

    microsoft/data-formulator

    Official

    服务端路径安全与文件访问编码规范。在编写文件下载路由、Agent 工具(文件读取/目录列出)、数据连接器/Loader、Workspace 路径操作、沙箱配置时使用。

    18k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Data Loading

    microsoft/data-formulator

    Official

    Discover connected data sources, add new data connectors through a user-confirmed form, inspect table metadata, and run bounded read-only probes when the current workspace data is insufficient.

    18k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Report

    microsoft/data-formulator

    Official

    Turn an exploration (threads, findings, charts) into a single Markdown report — note, blog post, executive summary, KPI dashboard, slide brief, or multi-section analytical report, with embedded…

    18k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Core

    microsoft/data-formulator

    Official

    The analyst's built-in capabilities: data-inspection tools and the always-available actions (visualize and askuser).

    18k GitHub stars~5.4k tokensUpdated today
    Auto-check passed

Works with

Questions about Language Injection

What does Language Injection do?

LLM Agent 多语言注入规范。在修改 Agent 提示词、添加新的 Agent 端点、处理用户可见的后端消息(messagecode)时使用。. Language Injection is an agent skill from microsoft/data-formulator, published by the product's own GitHub organization.

When should I use Language Injection?

Language Injection fits situations like: frontend & Design work in your project.

How do I install Language Injection in Claude Code?

Run `npx skills add microsoft/data-formulator --skill language-injection -a claude-code`. Or copy the skill folder (.cursor/skills/language-injection in microsoft/data-formulator) into .claude/skills/language-injection in your project. Claude Code loads it when a task matches its description.

How do I install Language Injection in Codex?

Run `npx skills add microsoft/data-formulator --skill language-injection -a codex`. Or copy the skill folder (.cursor/skills/language-injection in microsoft/data-formulator) into .agents/skills/language-injection in your project. Codex loads it when a task matches its description.

Can I use Language Injection 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 microsoft/data-formulator --skill language-injection -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/language-injection, .gemini/skills/language-injection, .github/skills/language-injection and .opencode/skills/language-injection in your project.

What does Language Injection need to run?

SKILL.md names no scripts, command-line tools or credentials: Language Injection is instructions for the agent only. Our summary lists: Python 3.

Does Language Injection 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 Language Injection 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 Language Injection use?

Language Injection 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 Language Injection use?

About 1.2k tokens (SKILL.md is roughly 4.9k 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 Language Injection?

Skills that share tags, products or a category with Language Injection: Claude Desktop Chinese Localization (javaht/claude-desktop-zh-cn, 7.5k stars), Docs (PrefectHQ/fastmcp, 28k stars), Oil UI (oil-oil/oil-ui, 1k stars) and Jarvis Setup (ethanplusai/jarvis, 838 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Language Injection?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/data-formulator, which has 17,540 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 8, 2026.

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