Logo vun Wikimedia Codex

Wikimedia Codex

Communautéit
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.

Iwwersiicht

Editeurfuzheado
RepositoryWikipedia-AI-Skills
Skill-Nummwikimedia-codex
Stären
27
Forks
10
Matgeliwwert Fichieren
7
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 7 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum fuzheado op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Wikimedia Codex an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/fuzheado/Wikipedia-AI-Skills/tree/main/.claude/skills/wikimedia-codex
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Wikimedia Codex an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Wikimedia Codex automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Wikimedia Codex net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill 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.

Firwat Wikimedia Codex op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Wikimedia Codex besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Wikimedia Codex an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/fuzheado/Wikipedia-AI-Skills/tree/main/.claude/skills/wikimedia-codex an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Wikimedia Codex benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Wikimedia Codex benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Wikimedia Codex domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Wikimedia Codex gratis?

Jo. De Skill gëtt vum fuzheado ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇