Logo Wikimedia Codex

Wikimedia Codex

Cộng đồng
fuzheado
wikimedia-codex

Build Wikimedia-consistent UIs with the Codex design system: Vue 3 and CSS-only components, design tokens, icons, composables. For Toolforge tools and MediaWiki frontends.

Tổng quan

Nhà phát hànhfuzheado
Kho mãWikipedia-AI-Skills
Tên kỹ năngwikimedia-codex
Sao
27
Bản fork
10
Tệp đi kèm
7
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 7 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được fuzheado công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Wikimedia Codex trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/fuzheado/Wikipedia-AI-Skills/tree/main/.claude/skills/wikimedia-codex
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân 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/wikimedia-codex .claude/skills/wikimedia-codex
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Wikimedia Codex trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Wikimedia Codex ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Wikimedia Codex không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Codex (Wikimedia design system)

⚠️ Known status (2026-06-24): the codex package on cdnjs is stale — it serves 2.3.2 while the current npm release is 2.6.2. The codex.json fix was merged but not yet deployed (large cdnjs backlog, expected to last a long time). Prefer loading Codex from npm, unpkg, or jsDelivr. If you must use cdnjs, pin the version explicitly and be aware you get an outdated build with a different file layout (no codex.umd.cjs). See the "CDN / plain script tag" section below for working URLs.

Codex is the official design system for Wikimedia projects (MediaWiki, Toolforge tools, and more). It provides a style guide, design tokens, icons, Vue 3 components (each with a CSS-only variant), and composables — all with internationalization, accessibility, and broad browser/device support built in.

Canonical sources:

Packages

PackageContents
@wikimedia/codex (v2.x)Vue 3 components (CdxButton, CdxTextInput, …), CSS-only components, composables (useComputedDirection, …), TypeScript prop types. Ships dist/codex.js (CJS), dist/codex.umd.js (UMD), dist/codex.mjs (ESM), dist/codex.style.css (+ codex.style-rtl.css, experimental codex.style-bidi.css), dist/mixins/*.less, dist/modules/, dist/types/
@wikimedia/codex-iconsMonochrome icons named cdxIconFoo (SVG strings/objects) + utilities (resolveIcon, shouldIconFlip) + the Icon type. Files: codex-icons.mjs (ESM), codex-icons.js (CJS/Node), codex-icons.json (used by MediaWiki)
@wikimedia/codex-design-tokensTokens as theme-wikimedia-ui.css (CSS variables), .less (Less variables), .scss (Sass variables), .json (detailed data)

The components package uses tokens internally; installing @wikimedia/codex alone is enough to use CSS-only components. Install @wikimedia/codex-icons for icons and @wikimedia/codex-design-tokens to style your own components consistently.

Loading Codex

npm

bash
npm install @wikimedia/codex

Load the compiled styles once per page (both usage modes need the CSS) — via JS:

js
import '@wikimedia/codex/dist/codex.style.css';

or with a plain CSS @import:

css
@import '@wikimedia/codex/dist/codex.style.css';

CDN / plain script tag (e.g. Toolforge)

The npm package ships a UMD build for use via a plain <script> tag. Note the UMD filename is dist/codex.umd.cjs (not codex.umd.js — that name no longer exists). Serve it together with codex.style.css:

html
<link rel="stylesheet" href=".../codex.style.css">
<script src=".../codex.umd.cjs"></script>

CDN status (verified 2026-06-24):

  • cdnjs (codex package) is stale: the latest available version is 2.3.2, while the current npm release is 2.6.2. The fix for packages/c/codex.json was merged, but there is a large deployment backlog, so newer versions are not yet published. cdnjs also serves a different file layout (codex.js/codex.min.js + codex.style*.css, no UMD build, no messageKeys.json/mixins/modules).
  • For current versions, use a CDN that mirrors npm directly, e.g. jsDelivr or unpkg:
    • https://cdn.jsdelivr.net/npm/@wikimedia/codex@2.6.2/dist/codex.umd.cjs
    • https://cdn.jsdelivr.net/npm/@wikimedia/codex@2.6.2/dist/codex.style.css
    • (also available: codex.style-rtl.css, codex.style-bidi.css, messageKeys.json)
  • The cdnjs packages for Codex are codex, codex-icons, codex-design-tokens.

MediaWiki

Use ResourceLoader (CodexModule, vue.createMwApp) — see https://www.mediawiki.org/wiki/Codex for the JavaScript and CSS-only instructions.

Two ways to use components

1. Vue 3 components (interactive — needs Vue 3 + JavaScript)

Import only the components you need and register them:

vue
<template>
	<div>
		<cdx-button action="progressive" weight="primary">Save</cdx-button>
	</div>
</template>
<script>
import { defineComponent } from 'vue';
import { CdxButton } from '@wikimedia/codex';
export default defineComponent( {
	components: { CdxButton }
} );
</script>

Vue components do not work with Vue 2.

2. CSS-only components (no JavaScript required)

Output the documented HTML with the documented CSS classes. Every component page has a "CSS-only version" section (e.g. the CSS-only Button):

html
<button class="cdx-button cdx-button--action-progressive cdx-button--weight-primary">
	Save
</button>

Some CSS-only components are provided as Less mixins instead of markup (e.g. mixins/link.less).

Icons

  • Vue: import the icon from @wikimedia/codex-icons and render it with CdxIcon (from @wikimedia/codex). Expose icons to the template via setup() (Composition API) or data (Options API):
    vue
    <cdx-button action="destructive">
        <cdx-icon :icon="cdxIconTrash" /> Delete this item
    </cdx-button>
    <script>
    import { CdxButton, CdxIcon } from '@wikimedia/codex';
    import { cdxIconTrash } from '@wikimedia/codex-icons';
    </script>
  • CSS-only: apply the css-icon Less mixin to a <span>:
    less
    @import ( reference ) '@wikimedia/codex-design-tokens/theme-wikimedia-ui.less';
    @import ( reference ) '@wikimedia/codex/mixins/css-icon.less';
    .my-icon {
        &--trash { .cdx-mixin-css-icon( @cdx-icon-trash, @param-is-button-icon: true ); }
    }
    html
    <span class="my-icon--trash"></span>
  • Performance: never ship the whole icon package to the browser — use a bundler that tree-shakes (only extracted icons are included) or another minimization technique.
  • Icons adapt to the surrounding text direction (they flip in RTL).

Design tokens

Design tokens are the smallest style pieces of the system — use them instead of hard-coded values:

css
@import '@wikimedia/codex-design-tokens/theme-wikimedia-ui.css';
.my-custom-element {
	background-color: var( --background-color-interactive );
	width: calc( var( --size-icon-medium ) + 2 * var( --spacing-100 ) );
	margin-left: calc( var( --size-icon-medium ) * -1 );
	padding: var( --spacing-25 ) var( --spacing-50 );
}

Less and Sass equivalents exist (@background-color-interactive, $background-color-interactive).

Token categories (each has a demo page in the docs): color, spacing, size, font, border, box-shadow, box-sizing, breakpoint, cursor, opacity, outline, position, z-index, animation, transition.

Caveat: several token categories are exposed as CSS custom properties (CSS variables) rather than raw values, so arithmetic on them must use CSS calc() — preprocessor math like Less unit() will not work on those tokens.

Dark mode

Codex 1.5+ supports automatic light/dark switching based on the user's environment:

css
@import url( ./node_modules/@wikimedia/codex-design-tokens/theme-wikimedia-ui-root.css );
@import url( ./node_modules/@wikimedia/codex-design-tokens/theme-wikimedia-ui-mode-dark.css )
	only screen and ( prefers-color-scheme: dark );

(or as <link media="( prefers-color-scheme: dark )"> elements). Always reference color tokens (e.g. var( --background-color-base )) in custom CSS instead of hardcoding hex values so dark mode keeps working.

Composables (from @wikimedia/codex)

useBreakpoint, useButtonGroupKeyboardNav, useComputedDirection, useComputedDisabled, useComputedLanguage, useFieldData, useFloatingMenu, useFocusTrap, useGeneratedId, useI18n, useI18nWithOverride, useIconOnlyButton, useIntersectionObserver, useLabelChecker, useModelWrapper, useOptionalModelWrapper, useResizeObserver, useScrollLock, useSlotContents, useSplitAttributes, useWarnOnce. Frequently used: useComputedDirection, useModelWrapper, useFloatingMenu, useResizeObserver, useIntersectionObserver.

Bidirectionality & accessibility

  • Fully-LTR pages: codex.style.css; fully-RTL pages: codex.style-rtl.css. (Experimental codex.style-bidi.css supports client-side direction flipping via [dir] selectors as of v1.12+.)
  • Codex supports pages entirely LTR or entirely RTL; mixed or runtime-changing directionality is not supported except special cases.
  • Accessibility is baked into every component (see the style-guide accessibility page).

Component selection guide

Pick the component by need (full details in references/components.md):

  • Text entry: text-input, text-area, search-input, select, combobox, lookup, multiselect-lookup, typeahead-search, chip-input, field (label + input wrapper)
  • Selection: checkbox, radio, toggle-switch, toggle-button, toggle-button-group
  • Actions: button, button-group, menu-button
  • Overlays / feedback: dialog, menu, menu-button, menu-item, popover, tooltip, toast, message
  • Navigation / structure: tabs, tab, accordion, breadcrumb, container, table, card
  • Media / indicators: icon, image, thumbnail, search-result-title, progress-bar, progress-indicator, info-chip, input-chip, label

Working from the local checkout

The canonical docs are checked out at codex-source/packages/codex-docs/docs/ (Markdown) with per-component demos under codex-source/packages/codex-docs/component-demos/<component>/ and component source under codex-source/packages/codex/src/components/<component>/. Run scripts/list-codex-checkout.ps1 to list all components and demo folders found locally.

Cross-References

Related SkillWhy
wikimedia-toolforgePlatform for tool frontends — account setup, deployment, and the privacy-preserving CDN that Codex assets load from
toolforge-nodejsnpm/UMD packaging — installing Codex in a Node.js project or serving the bundle as a static asset
wikimedia-page-stylingThe on-wiki CSS path (TemplateStyles) — a different venue from Codex components
mediawiki-page-navigationMenus, tabs, and subpage navigation for on-wiki interfaces
wikimedia-i18n-l10n-for-toolsRTL/bidi layout and message files for multilingual tool UIs

References

  • references/accessing-codex.md — what Codex is, resources, Figma/MediaWiki/Gerrit/GitHub
  • references/developing.md — installation, usage modes, packages, dark mode, bidirectionality
  • references/components.md — component types overview
  • references/design-tokens.md — token system overview and categories
  • references/icons.md — icon system overview
  • references/composables.md — composables overview and demo pages

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Wikimedia Codex làm được gì?

Build Wikimedia-consistent UIs with the Codex design system: Vue 3 and CSS-only components, design tokens, icons, composables. For Toolforge tools and MediaWiki frontends.

Vì sao nên dùng Wikimedia Codex trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Wikimedia Codex là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Wikimedia Codex trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/fuzheado/Wikipedia-AI-Skills/tree/main/.claude/skills/wikimedia-codex. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Wikimedia Codex?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Wikimedia Codex với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Wikimedia Codex với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Wikimedia Codex có miễn phí không?

Có. Kỹ năng này được fuzheado phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇