Token导航 LogoToken导航

Agent Skill · 研究检索

i18n-rtl(国际化 RTL)

i18n-rtl 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

i18n-rtl 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 72,323。

总安装 188周安装 8GitHub Stars 11下载 66核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:i18n-rtl(国际化 RTL)
来源仓库:https://github.com/lobbi-docs/claude
仓库路径:skills/i18n-rtl
安装命令:
npx skills add https://github.com/lobbi-docs/claude --skill i18n-rtl
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lobbi-docs/claude --skill i18n-rtl

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

i18n-rtl 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。适用于国际化项目中 RTL(从右到左)布局、文本方向和样式适配的研究任务。通过关键词和来源仓库筛选,Agent 可返回相关文档或代码片段供进一步分析。

安装前建议确认权限范围和维护状态,注意是否会触发联网或文件读写操作。i18n-rtl 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/i18n-rtl

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/lobbi-docs/claude --skill i18n-rtl;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

i18n-rtl 怎么安装?

在终端执行 npx skills add https://github.com/lobbi-docs/claude --skill i18n-rtl。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

i18n-rtl 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

i18n-rtl 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

i18n-rtl 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

i18n-rtl 用的人多吗?

公开数据是累计安装 188 次,近一周安装 8 次,下载 66 次,GitHub 11 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

i18n-rtl 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
i18n-rtl

国际化 RTL · 本页

18811操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

MUI Internationalization & RTL Support

1. RTL Setup

Set the document direction and configure the MUI theme:

// index.html — set dir on <html>
<html dir="rtl" lang="ar">

// theme.ts
import { createTheme } from '@mui/material/styles';

const rtlTheme = createTheme({
  direction: 'rtl',
});

Install the Emotion RTL plugin for automatic style flipping:

npm install stylis-plugin-rtl stylis

Wrap the app with the RTL-aware cache provider:

import { CacheProvider } from '@emotion/react';
import createCache from '@emotion/cache';
import { ThemeProvider } from '@mui/material/styles';
import rtlPlugin from 'stylis-plugin-rtl';
import { prefixer } from 'stylis';

const cacheRtl = createCache({
  key: 'muirtl',
  stylisPlugins: [prefixer, rtlPlugin],
});

function App() {
  return (
    <CacheProvider value={cacheRtl}>
      <ThemeProvider theme={rtlTheme}>
        {/* All MUI components now render RTL */}
        <MyApplication />
      </ThemeProvider>
    </CacheProvider>
  );
}

2. Emotion RTL Cache

The RTL cache intercepts all Emotion-generated styles and flips directional properties (margin-left becomes margin-right, padding-left becomes padding-right, etc.).

import createCache from '@emotion/cache';
import rtlPlugin from 'stylis-plugin-rtl';
import { prefixer } from 'stylis';

// RTL cache — use for Arabic, Hebrew, Persian, Urdu
const rtlCache = createCache({
  key: 'muirtl',
  stylisPlugins: [prefixer, rtlPlugin],
});

// LTR cache — use for English, French, German, etc.
const ltrCache = createCache({
  key: 'muiltr',
  stylisPlugins: [prefixer],
});

Key points:

  • The key must be unique per cache instance (e.g. 'muirtl' vs 'muiltr').
  • prefixer adds vendor prefixes and should always be included.
  • rtlPlugin must come after prefixer in the array.

3. Dynamic Direction Switching

Toggle between LTR and RTL at runtime using React state:

import { useState, useMemo } from 'react';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import { CacheProvider } from '@emotion/react';
import createCache from '@emotion/cache';
import rtlPlugin from 'stylis-plugin-rtl';
import { prefixer } from 'stylis';
import CssBaseline from '@mui/material/CssBaseline';
import IconButton from '@mui/material/IconButton';
import FormatTextdirectionLToRIcon from '@mui/icons-material/FormatTextdirectionLToR';
import FormatTextdirectionRToLIcon from '@mui/icons-material/FormatTextdirectionRToL';

const rtlCache = createCache({
  key: 'muirtl',
  stylisPlugins: [prefixer, rtlPlugin],
});

const ltrCache = createCache({
  key: 'muiltr',
  stylisPlugins: [prefixer],
});

function App() {
  const [direction, setDirection] = useState<'ltr' | 'rtl'>('ltr');

  const theme = useMemo(
    () => createTheme({ direction }),
    [direction],
  );

  const toggleDirection = () => {
    const newDir = direction === 'ltr' ? 'rtl' : 'ltr';
    setDirection(newDir);
    document.dir = newDir; // sync <html> dir attribute
  };

  return (
    <CacheProvider value={direction === 'rtl' ? rtlCache : ltrCache}>
      <ThemeProvider theme={theme}>
        <CssBaseline />
        <IconButton onClick={toggleDirection}>
          {direction === 'ltr'
            ? <FormatTextdirectionRToLIcon />
            : <FormatTextdirectionLToRIcon />}
        </IconButton>
        <MyApplication />
      </ThemeProvider>
    </CacheProvider>
  );
}

Important: always sync document.dir with the theme direction so native browser layout matches MUI.

4. Component Localization

MUI ships built-in locale strings for 50+ languages. Pass a locale object as the second argument to createTheme:

import { createTheme } from '@mui/material/styles';
import { deDE } from '@mui/material/locale';

// German locale — translates MUI component strings
// (e.g. TablePagination "Rows per page" -> "Zeilen pro Seite")
const theme = createTheme(
  {
    palette: {
      primary: { main: '#1976d2' },
    },
  },
  deDE, // locale object as second argument
);

Common locale imports:

import { enUS } from '@mui/material/locale'; // English (default)
import { frFR } from '@mui/material/locale'; // French
import { esES } from '@mui/material/locale'; // Spanish
import { jaJP } from '@mui/material/locale'; // Japanese
import { zhCN } from '@mui/material/locale'; // Chinese (Simplified)
import { arSA } from '@mui/material/locale'; // Arabic (Saudi Arabia)
import { heIL } from '@mui/material/locale'; // Hebrew (Israel)
import { koKR } from '@mui/material/locale'; // Korean
import { ptBR } from '@mui/material/locale'; // Portuguese (Brazil)
import { trTR } from '@mui/material/locale'; // Turkish

For RTL languages, combine direction with locale:

import { arSA } from '@mui/material/locale';

const arabicTheme = createTheme(
  {
    direction: 'rtl',
    typography: {
      fontFamily: '"Noto Sans Arabic", "Roboto", sans-serif',
    },
  },
  arSA,
);

5. MUI X Localization

MUI X components (DataGrid, DatePicker, TreeView) have their own locale strings, imported separately:

import { createTheme } from '@mui/material/styles';
import { deDE as coreDeDE } from '@mui/material/locale';
import { deDE as dataGridDeDE } from '@mui/x-data-grid/locales';
import { deDE as datePickerDeDE } from '@mui/x-date-pickers/locales';

// Combine core + DataGrid + DatePicker locales
const theme = createTheme(
  {
    palette: { primary: { main: '#1976d2' } },
  },
  dataGridDeDE,    // DataGrid locale
  datePickerDeDE,  // DatePicker locale
  coreDeDE,        // Core MUI locale (last to allow overrides)
);

DataGrid locale strings cover:

  • Column menu labels (columnMenuLabel, columnMenuSortAsc, columnMenuFilter)
  • Toolbar labels (toolbarColumns, toolbarFilters, toolbarExport)
  • Pagination (MuiTablePagination labels)
  • Filter panel labels (filterPanelOperator, filterPanelColumns, filterPanelInputLabel)
  • No rows overlay (noRowsLabel, noResultsOverlayLabel)

DatePicker locale strings cover:

  • Field placeholders and labels
  • Calendar navigation (previousMonth, nextMonth)
  • Toolbar labels (datePickerToolbarTitle, timePickerToolbarTitle)
  • Action bar labels (okButtonLabel, cancelButtonLabel, clearButtonLabel)

6. Custom Locale

Override individual translation strings by deep-merging with a built-in locale:

import { createTheme } from '@mui/material/styles';
import { enUS } from '@mui/material/locale';
import { enUS as dataGridEnUS } from '@mui/x-data-grid/locales';
import deepmerge from 'deepmerge';

// Custom locale: override specific DataGrid strings
const customDataGridLocale = deepmerge(dataGridEnUS, {
  components: {
    MuiDataGrid: {
      defaultProps: {
        localeText: {
          noRowsLabel: 'No records found',
          footerRowSelected: (count: number) =>
            count === 1
              ? '1 record selected'
              : `${count.toLocaleString()} records selected`,
          toolbarExport: 'Download',
          toolbarExportCSV: 'Download as CSV',
          toolbarExportPrint: 'Print view',
        },
      },
    },
  },
});

// Custom locale: override core MUI strings
const customCoreLocale = deepmerge(enUS, {
  components: {
    MuiTablePagination: {
      defaultProps: {
        labelRowsPerPage: 'Items per page:',
        labelDisplayedRows: ({ from, to, count }: { from: number; to: number; count: number }) =>
          `Showing ${from}-${to} of ${count !== -1 ? count : `more than ${to}`}`,
      },
    },
    MuiAlert: {
      defaultProps: {
        closeText: 'Dismiss',
      },
    },
  },
});

const theme = createTheme(
  { palette: { primary: { main: '#1976d2' } } },
  customDataGridLocale,
  customCoreLocale,
);

Per-component override (without theme-level locale):

import { DataGrid } from '@mui/x-data-grid';

<DataGrid
  rows={rows}
  columns={columns}
  localeText={{
    noRowsLabel: 'Nothing here yet',
    toolbarFilters: 'Search filters',
    columnMenuSortAsc: 'Sort A to Z',
    columnMenuSortDesc: 'Sort Z to A',
  }}
/>

7. Portal Components & RTL

Portal-based components (Dialog, Popper, Menu, Popover, Snackbar, Tooltip) render outside the main React tree into document.body. They inherit the document direction from document.dir, but they need the Emotion cache and theme context to style correctly.

This works automatically when:

  1. document.dir is set to 'rtl'
  2. The CacheProvider with rtlCache wraps the app root
// Dialogs automatically flip their layout in RTL
import Dialog from '@mui/material/Dialog';
import DialogTitle from '@mui/material/DialogTitle';
import DialogContent from '@mui/material/DialogContent';
import DialogActions from '@mui/material/DialogActions';
import Button from '@mui/material/Button';

function RTLDialog({ open, onClose }: { open: boolean; onClose: () => void }) {
  return (
    <Dialog open={open} onClose={onClose}>
      <DialogTitle>{"title"}</DialogTitle>
      <DialogContent>
        {/* Content flows right-to-left automatically */}
        <p>{"content"}</p>
      </DialogContent>
      <DialogActions>
        {/* Buttons position correctly: primary action on left in RTL */}
        <Button onClick={onClose}>{"cancel"}</Button>
        <Button onClick={onClose} variant="contained">{"confirm"}</Button>
      </DialogActions>
    </Dialog>
  );
}

If using multiple directions in the same page (e.g., an LTR widget inside an RTL page), wrap the LTR section:

import { ThemeProvider, createTheme } from '@mui/material/styles';
import { CacheProvider } from '@emotion/react';

function LTRSection({ children }: { children: React.ReactNode }) {
  const ltrTheme = createTheme({ direction: 'ltr' });

  return (
    <div dir="ltr">
      <CacheProvider value={ltrCache}>
        <ThemeProvider theme={ltrTheme}>
          {children}
        </ThemeProvider>
      </CacheProvider>
    </div>
  );
}

8. Bidirectional Layout Tips

Icons that need flipping

Some icons have directional meaning and should be mirrored in RTL:

import { useTheme } from '@mui/material/styles';
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import SendIcon from '@mui/icons-material/Send';

function DirectionalIcon() {
  const theme = useTheme();
  const isRtl = theme.direction === 'rtl';

  // Option 1: Swap icons based on direction
  const NextIcon = isRtl ? ArrowBackIcon : ArrowForwardIcon;
  const PrevIcon = isRtl ? ArrowForwardIcon : ArrowBackIcon;

  // Option 2: CSS flip for icons that should mirror
  return (
    <SendIcon
      sx={{
        transform: isRtl ? 'scaleX(-1)' : 'none',
      }}
    />
  );
}

Icons that should NOT flip: icons without directional meaning (close, add, delete, search, settings).

Icons that SHOULD flip: arrows, navigation chevrons, send, reply, undo/redo, text indent, list bullets, external link.

Spacing in RTL

Use logical properties in the sx prop instead of physical ones:

// BAD: physical properties — break in RTL
<Box sx={{ marginLeft: 2, paddingRight: 1 }} />

// GOOD: logical properties — work in both LTR and RTL
<Box sx={{ marginInlineStart: 2, paddingInlineEnd: 1 }} />

// ALSO GOOD: MUI shorthand with theme-aware flipping
// ml/mr are auto-flipped by the RTL plugin
<Box sx={{ ml: 2, pr: 1 }} />

The stylis-plugin-rtl automatically converts margin-left to margin-right (and vice versa), so MUI shorthand (ml, mr, pl, pr) works correctly. However, if you use inline styles (style={{marginLeft: 16}}), those are NOT flipped — always prefer sx.

Logical CSS properties reference

Physical (avoid)Logical (prefer)
left / rightinset-inline-start / inset-inline-end
margin-left / margin-rightmargin-inline-start / margin-inline-end
padding-left / padding-rightpadding-inline-start / padding-inline-end
border-left / border-rightborder-inline-start / border-inline-end
text-align: lefttext-align: start
float: leftfloat: inline-start

Opt out of RTL flipping

For elements that should remain LTR even in an RTL context (e.g., code blocks, phone numbers, LTR brand names):

// Use the noflip directive in sx
<Box
  sx={{
    /* @noflip */
    textAlign: 'left',
    direction: 'ltr',
  }}
/>

// Or wrap in a dir="ltr" container
<span dir="ltr" style={{ unicodeBidi: 'embed' }}>
  +1 (555) 123-4567
</span>

TextField and input alignment

Text inputs automatically inherit direction. For mixed-direction inputs (e.g., a search field that might contain Arabic or English):

import TextField from '@mui/material/TextField';

<TextField
  label="Search"
  inputProps={{
    dir: 'auto', // browser auto-detects direction from content
  }}
/>

RTL testing checklist

  1. Verify document.dir="rtl" is set
  2. Check createTheme({direction: 'rtl'}) is configured
  3. Confirm CacheProvider with rtlCache wraps the app
  4. Test all Dialogs, Menus, and Drawers open/close correctly
  5. Verify navigation icons (arrows, chevrons) point correctly
  6. Check form layouts and label alignment
  7. Verify DataGrid column order and sort icons
  8. Test text truncation with ellipsis in RTL
  9. Check absolute/fixed positioned elements
  10. Verify scrollbar position (should be on the left in RTL)

平台分布

Codex

33.04%
按下载量换算22

Claude

31.95%
按下载量换算21

Cursor

19.05%
按下载量换算13

Gemini CLI

9.27%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills