Xtoolsのロゴ

Xtools

コミュニティ
fuzheado
xtools

Query XTools — the canonical Wikimedia statistics API: page info, top editors, edit counts, prose stats, and admin/patroller metrics for any wiki

概要

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

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

  • どのLLMでも利用可能

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

  • 2個の同梱ファイル

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

  • オープンソース

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

インストール

AIスキルXtoolsを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/xtools
  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/xtools .claude/skills/xtools
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Xtoolsは作成時に想定されたモデルに縛られません。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.

XTools is the canonical Wikimedia statistics API (xtools.wmcloud.org/api) — the same engine behind the XTools web tools that editors use daily for edit counts, article info, and top-editor questions. Maintained by MusikAnimal and Samwilson. It pre-computes answers that would otherwise take many Action API calls.

When to use XTools: when the question is an aggregate statistic — "how many edits has user X made?", "who are the top editors of this page?", "what's this page's assessment and creator?", "how much prose does it have?", "how many edits did admins make last month?" — and you want one request instead of dozens.

⚠️ Prefer the Action/REST API first. XTools' own docs say the Action API and REST API are considerably faster and allow asynchronous requests. Use the Action API for: raw revision text, diffs, per-revision metadata, or anything a single prop=revisions/list=usercontribs call can answer. Use XTools when the aggregate is not cheaply derivable — or when you need XTools-only metrics (prose, bot data, admin/patroller stats).

API Basics

  • Base URL: https://xtools.wmcloud.org/api — not versioned (no /v1/). Breaking renames happen; the warning property in any response announces deprecations — always log it.
  • Parameters: {project} accepts a domain (en.wikipedia.org) or database name (enwiki). Article titles are full titles, URL-encoded. Dates are YYYY-MM-DD. Usernames accept IPs and CIDR ranges.
  • Docs: mediawiki.org/wiki/XTools/API (+ Page / User / Project) — full endpoint reference in references/.
  • Response: JSON with a project echo, the data, and an elapsed_time (server processing seconds). Errors are RFC 7807 problem+json: status, title, details.
  • Etiquette: make requests synchronously — one full round trip before the next. No parallel bursts. Responses are cache-control: private, must-revalidate — every request is a full compute round trip (0.1–1.9s typical, heavier for admin_stats).

Quick smoke test:

bash
curl -s "https://xtools.wmcloud.org/api/page/pageinfo/en.wikipedia.org/Albert_Einstein" \
  -H "User-Agent: MyBot/1.0 (me@example.com) ProjectName"
# {"project":"en.wikipedia.org","page":{"namespace":0,"page_title":"Albert Einstein",...},
#  "views":..., "watchers":..., "editors":..., "creator":..., "assessment":...,
#  "elapsed_time":0.47}

SOP: Page Statistics in One Call (pageinfo)

python
import requests

def pageinfo(project, title, ua):
    r = requests.get(f"https://xtools.wmcloud.org/api/page/pageinfo/{project}/{title}",
                     headers={'User-Agent': ua}, timeout=60)
    r.raise_for_status()
    d = r.json()
    if 'warning' in d:  # deprecation / behavior-change announcements — log these
        print("XTools warning:", d['warning'])
    return d

Returns (all in one call): views (30-day), watchers, editors (total distinct), creator/creator_editcount, assessment (class + badge), created_at/modified_at, anon_edits, minor_edits, page_length. ⚠️ Use pageinfo, not articleinfo — the old name was renamed in Aug 2024 and is excluded from the docs (it still returns 200, which makes it a silent-wrong-answer trap).

SOP: Top Editors of a Page

bash
curl -s "https://xtools.wmcloud.org/api/page/top_editors/en.wikipedia.org/Albert_Einstein/2024-01-01/2024-12-31/10" \
  -H "User-Agent: MyBot/1.0 (me@example.com) ProjectName"

Path: top_editors/{project}/{article}/{start}/{end}/{limit} — limit max 5000, ?nobots=1 excludes bots. Response: top_editors list with user_text (username or IP), count, rank, is_bot, edits_removed/edits_restored (revert stats).

SOP: User Edit Counts

bash
curl -s "https://xtools.wmcloud.org/api/user/simple_editcount/en.wikipedia.org/Fuzheado" \
  -H "User-Agent: MyBot/1.0 (me@example.com) ProjectName"
# {"user_id":..., "username":"Fuzheado", "live_edit_count":..., "deleted_edit_count":...,
#  "user_groups":[...], "global_user_groups":[...], "elapsed_time":0.77}
  • Usernames, IPs, and CIDR ranges all work as {username}.
  • High-edit-count users degrade gracefully: approximate: true + a warning array ("substantially high number of edits. Showing limited results."). Above 600,000 edits the API returns 501 — that's expected, not an error in your code.
  • simple_editcount/{project}/{username}/{namespace}/{start}/{end} for scoped counts.

SOP: What Has a User Done? (top_edits)

bash
curl -s "https://xtools.wmcloud.org/api/user/top_edits/en.wikipedia.org/Fuzheado/0" \
  -H "User-Agent: MyBot/1.0 (me@example.com) ProjectName"

top_edits/{project}/{username}/{namespace} — top-edited pages by a user, or pass a page title instead of namespace for all their edits to one page. ⚠️ Responses are large for active editors (hundreds of KB) — request only what you need and be prepared to paginate via offset timestamps.

SOP: Prose Statistics

bash
curl -s "https://xtools.wmcloud.org/api/page/prose/en.wikipedia.org/Albert_Einstein" \
  -H "User-Agent: MyBot/1.0 (me@example.com) ProjectName"
# {"bytes":..., "characters":..., "words":..., "sections":..., "references":..., "unique_references":...}

Prose/reference counts (the old "Prosesize" metric) — not available from the Action API in this form. Useful for article-quality checks and the "how big is the readable content" question.

Constraint & Guardrails

  1. Prefer Action/REST API when it suffices — XTools is compute-heavy by design; the official docs say the standard APIs are considerably faster. XTools is for aggregates, not bulk or raw data.
  2. Synchronous requests only — one round trip at a time. No parallel fan-out, no retry storms. 503 = overloaded, back off for minutes.
  3. Log the warning property — it announces deprecations and behavior changes. The API is unversioned; names have been renamed before (articleinfo→pageinfo).
  4. 501 is a feature — "user has made too many edits (max 600,000)". Also expect approximate + warning for very high counts. Handle both without retry loops.
  5. 504 after 900s — heavy queries are killed server-side after 15 minutes. Use date ranges and limit to keep requests small.
  6. top_edits responses are huge — never dump them; use namespace/page scoping and offsets.
  7. Assessments overlap — XTools assessments batches multiple pages in one call; for deep per-page assessment queries (all WikiProjects, importance), use wikimedia-page-assessment.
  8. No pageviews here — XTools has no traffic endpoints; that's wikimedia-pageviews.

Example Use Cases

  • "What share of this article did the top 5 editors write, and how many bots edited it this year?" (top_editors + bot_data)
  • "How many edits has this user made, in which namespaces, and what's their global edit count?" (simple_editcount + globalcontribs)
  • "Which pages did this user create, and do any carry an assessment?" (pages + assessments)
  • "How active were admins on this wiki last quarter?" (project/admin_stats)
  • "How much readable prose does this article have vs. template cruft?" (prose)
  • "What's this page's WikiProject assessment and who created it?" (pageinfo)

Tooling

📚 Endpoint Reference (references/)

  • page-api.md — pageinfo, top_editors, prose, links, assessments, bot_data, automated_edits: full schemas + worked examples
  • user-project-api.md — all user endpoints + project-level stats (admin/patroller/steward): full schemas + worked examples

Cross-References

Related SkillWhy
wikimedia-api-accessUser-Agent header and request patterns for all calls
wikipedia-edit-historyRevision-level history — XTools aggregates the same data; use it when one call beats many
wikimedia-pageviewsTraffic statistics — XTools deliberately has no pageviews endpoints; pair them for readership + editor context
wikiwhoToken-level authorship — XTools' Authorship tool is powered by WikiWho but counts characters, not tokens
wikimedia-page-assessmentDeep per-page assessment queries; XTools assessments is the batch variant
wikimedia-api-strategyDeciding between APIs — XTools vs Action API trade-offs

同梱ファイル

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

よくある質問

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

Query XTools — the canonical Wikimedia statistics API: page info, top editors, edit counts, prose stats, and admin/patroller metrics for any wiki

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

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

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

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

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

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

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

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

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

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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