Mintのロゴ

Mint

コミュニティ
fuzheado
mint

Translate text and rich content via MinT — the Wikimedia machine translation service: 200+ languages, open NMT models (NLLB-200, OpusMT, IndicTrans2), plain/HTML/JSON/markdown formats

概要

公開者fuzheado
リポジトリWikipedia-AI-Skills
スキル名mint
スター
27
フォーク
10
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    fuzheadoがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルMintをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/fuzheado/Wikipedia-AI-Skills/tree/main/.claude/skills/mint
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fuzheado/Wikipedia-AI-Skills.git /tmp/Wikipedia-AI-Skills
mkdir -p .claude/skills
cp -r /tmp/Wikipedia-AI-Skills/.claude/skills/mint .claude/skills/mint
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでMintを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にMintを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Mintは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

⚠️ User-Agent required: All requests below require a descriptive User-Agent header. See the wikimedia-api-access skill for the correct format and rate-limiting patterns.

MinT (Machine in Translation) is the Wikimedia Foundation Language team's open-source machine translation service. It runs open NMT models — NLLB-200 (Meta), OpusMT (Helsinki), IndicTrans2 (AI4Bharat), Softcatalà, MADLAD-400 (Google) — optimized with CTranslate2 to run on CPU (no GPU needed). It supports 200+ languages, including 70+ no other service covers and 25+ with no Wikipedia yet. MinT powers machine translation inside Content Translation, Section Translation, and translatewiki.net.

When to use MinT: when the task is translation — "translate this article/sentence to Spanish", "what does this text say in Arabic?", "produce a localized version of this content", or translating structured content (HTML/JSON/markdown) while preserving markup. No other skill in this catalog provides machine translation.

⚠️ Test instance vs. production: translate.wmcloud.org is the public test instance — fine for experiments, benchmarks, and low-volume use, but the docs warn performance and availability "may be reduced" compared to the production instances that serve Content Translation. Treat benchmark numbers (below) as lower bounds for production.

API Basics

  • Base URL: https://translate.wmcloud.org — FastAPI service. Docs: /docs (Swagger UI) and /openapi.json (machine-readable spec).
  • ⚠️ /api alone returns 404. The real endpoints are POST /api/translate, GET /api/languages, and GET /healthz. Do not guess paths — consult /openapi.json.
  • Request body (POST /api/translate, JSON): content (text to translate), source_language, target_language (2-letter codes; auto is not supported — detect language first, see Cross-References), provider (optional; defaults to the first matching model for the pair), format (one of html, json, markdown, text, svg, webpage).
  • ⚠️ Field names are content/source_language/target_language — NOT text/from/to. Using the wrong names returns 422 with a list of missing fields.
  • Response: translation (translated text), translationtime (seconds), sourcelanguage, targetlanguage, model (which model served it).
  • Etiquette: synchronous requests, ≥1s pacing between calls. Inference is CPU-bound: ~30–100 words/s per request, and latency grows under concurrency — do not parallelize.

Quick smoke test:

bash
curl -s -X POST "https://translate.wmcloud.org/api/translate" \
  -H "User-Agent: MyBot/1.0 (me@example.com) ProjectName" \
  -H "Content-Type: application/json" \
  -d '{"content":"Jazz is a music genre that originated in New Orleans.","source_language":"en","target_language":"es","format":"text"}'
# {"translation":"El jazz es un género musical que se originó en Nueva Orleans.",
#  "translationtime":0.49,"sourcelanguage":"en","targetlanguage":"es","model":"nllb200-600M"}

SOP: Discover Languages and Providers

GET /api/languages returns a map of target_language → source_language → [available models]:

bash
curl -s "https://translate.wmcloud.org/api/languages" \
  -H "User-Agent: MyBot/1.0 (me@example.com) ProjectName"
# {"as":{"en":["indictrans2-indic-en","nllb200-600M"],"bn":["indictrans2-indic-indic","nllb200-600M"],...}}

Always fetch this live before translating — supported languages and models change as new models are added (fetch-on-demand; never hardcode the language list). A pair not in the map is not translatable, even if both languages exist individually.

SOP: Translate Plain Text

python
import requests

def translate(content, source, target, ua, provider=None, fmt="text"):
    body = {"content": content, "source_language": source,
            "target_language": target, "format": fmt}
    if provider:
        body["provider"] = provider
    r = requests.post("https://translate.wmcloud.org/api/translate",
                      json=body, headers={"User-Agent": ua}, timeout=60)
    r.raise_for_status()
    return r.json()["translation"]
  • Omit provider to use the default model for the pair (preference order is defined by MinT's config.yaml).
  • Pass provider explicitly when you need a specific model (e.g. "nllb200-600M" for broad coverage, "indictrans2-indic-indic" for Indic pairs). An invalid provider for the pair returns 422 — verify against /api/languages first.

SOP: Translate Rich Content (Markup Preservation)

MinT transfers markup from source to translation for structured formats — HTML tags survive translation:

bash
curl -s -X POST "https://translate.wmcloud.org/api/translate" \
  -H "User-Agent: MyBot/1.0 (me@example.com) ProjectName" \
  -H "Content-Type: application/json" \
  -d '{"content":"<p>Jazz is a <b>music genre</b> that originated in New Orleans.</p>","source_language":"en","target_language":"es","format":"html"}'
# {"translation":"<p>El jazz es un <b>género musical</b> que se originó en Nueva Orleans.</p>",...}

Supported formats: html, json, markdown, text, svg, webpage. Use text when the content is plain prose (fastest, no markup overhead); use html/markdown/json when you need the structure preserved in the output.

Constraint & Guardrails

  1. The /api 404 trap. The bare /api path returns 404 — the real endpoints are POST /api/translate and GET /api/languages. When in doubt, read /openapi.json — never guess paths.
  2. The field-name trap. The body fields are content, source_language, target_language (plus optional provider, format). Using text/from/to returns 422. The 422 error lists exactly which fields are missing — read it and fix, don't retry blindly.
  3. Provider must match the pair. Check /api/languages for the pair's model list before passing provider; an unsupported provider or pair returns 422.
  4. Test-instance performance. Measured 2026-08-17: ~0.6s for 16 words, ~1.3–4.4s for 101 words (pair-dependent; en→hi slowest), ~4s for 400 words; throughput ~28–101 words/s. Aggregate throughput degrades under concurrency (0.9 → 0.4 req/s at 1 → 8 parallel) — the instance is CPU-bound. Keep requests synchronous with ≥1s pacing.
  5. Licensing & accuracy. Translations are derivative works under the source content's CC-BY-SA license; MinT makes no accuracy warranties (see the MinT disclaimer). Machine output must be reviewed before publishing anywhere.
  6. Privacy. Only freely-licensed content is sent; no nonpublic user information (per the MinT service FAQ).
  7. Freshness. Language/model support changes as new models are added — always fetch /api/languages live and re-verify this skill's facts periodically (bump last_verified).
  8. Health first. If requests fail, check GET /healthz (200 = up) before retrying; a 422 means your request is wrong, a 503 means the service is overloaded — back off.

Example Use Cases

  • "Translate this article's lead section to Spanish and show me the result" (text or html format)
  • "Localize this tool's UI strings from English to Arabic" (translate each string via text; or json for structured message files)
  • "Summarize what this Catalan Wikipedia article says" — translate to English first, then summarize
  • "Which model can translate Xhosa, and does MinT support it at all?" (/api/languages lookup)
  • "Produce a machine-translated first draft for a new Wikipedia article, clearly marked as unedited MT" (Content Translation workflow pattern)

Tooling

🔧 Translation CLI (scripts/translate.py)

Stdlib-only command-line client for MinT:

bash
python3 scripts/translate.py "Jazz is a music genre." en es          # plain text
python3 scripts/translate.py --file article.md --format markdown en fr
python3 scripts/translate.py --list-languages en                     # what can 'en' translate into?
python3 scripts/translate.py "Hello world" en hi --provider indictrans2-indic-en

🧪 Tests (../../tests/test_mint.py)

Content-anchor tests (no network) verifying the documented facts, traps, and cross-references in this skill.

Cross-References

Related SkillWhy
wikimedia-api-accessUser-Agent header and request patterns for all calls
wikimedia-api-strategyChoosing between APIs — MinT is the translation surface; the Action/REST APIs have no translation endpoint
wikimedia-ml-servicesLanguage identification (Lift Wing) — MinT has no auto source-language detection, so detect the language first
wikimedia-i18n-l10n-for-toolsLocalizing tools — MinT provides the raw translation; i18n covers message files and conventions

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Mint」では何ができますか?

Translate text and rich content via MinT — the Wikimedia machine translation service: 200+ languages, open NMT models (NLLB-200, OpusMT, IndicTrans2), plain/HTML/JSON/markdown formats

TypingMindでMintを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Mintはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにMintをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/fuzheado/Wikipedia-AI-Skills/tree/main/.claude/skills/mintを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Mintを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Mintは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもMintを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Mint」は無料ですか?

はい。fuzheadoがGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇