element-plus-dark-mode

element-plus-dark-mode is a skill for Claude Code, Codex from jiaiyan/element-plus-skills. It costs 35 tokens per session (2,074 once invoked), scanned A, original, MIT.

Instructions for adding and customising a dark theme in Element Plus applications, including switching between light and dark modes.

In plain words
What is it for?
Use it to enable dark mode, let users toggle themes, customise dark colours, and preserve a theme preference.
Why use it?
It avoids separately rewriting the colours and styles of every Element Plus component for a dark interface.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: $skill-name invocation.

Good fit Use it to enable dark mode, let users toggle themes, customise dark colours, and preserve a theme preference.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jiaiyan/element-plus-skills/element-plus-dark-mode
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jiaiyan/element-plus-skills --skill element-plus-dark-mode
Clone the repo
git clone --depth 1 https://github.com/jiaiyan/element-plus-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for element-plus-dark-mode

README.md
[![agentmods](https://agentmods.dev/badge/skills/jiaiyan/element-plus-skills/element-plus-dark-mode/github.svg)](https://agentmods.dev/skills/jiaiyan/element-plus-skills/element-plus-dark-mode)
Your own site
<a href="https://agentmods.dev/skills/jiaiyan/element-plus-skills/element-plus-dark-mode"><img src="https://agentmods.dev/badge/skills/jiaiyan/element-plus-skills/element-plus-dark-mode/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for element-plus-dark-mode

Your own site · 80×15
<a href="https://agentmods.dev/skills/jiaiyan/element-plus-skills/element-plus-dark-mode"><img src="https://agentmods.dev/badge/skills/jiaiyan/element-plus-skills/element-plus-dark-mode.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,074 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.02074
Opus 5 $0.00017 $0.01037
Sonnet 5 $0.00007 $0.00415
Haiku 4.5 $0.00003 $0.00207

Measured 8d ago against content hash a5a15718c2d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

element-plus-dark-mode scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

element-plus-dark-mode/SKILL.md · 355 lines

How it starts

The opening of the file, as written. The whole thing — 355 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Element Plus Dark Mode

This skill provides comprehensive guidance for implementing and customizing dark mode in Element Plus applications (available since version 2.2.0).

When to Invoke

Invoke this skill when:

  • User wants to enable dark mode
  • User needs to toggle between light and dark themes
  • User wants to customize dark mode colors
  • User asks about dark mode CSS variables
  • User needs to persist dark mode preference

Quick Start

Enable Dark Mode

Add the dark class to the HTML element:

<html class="dark">
  <head></head>
  <body></body>
</html>

Import Dark Mode CSS

Import the dark mode CSS variables:

import 'element-plus/theme-chalk/dark/css-vars.css'

That's it! Your Element Plus components will now use dark mode styles.

Implementation Methods

1. Static Dark Mode

If you only need dark mode, simply add the dark class to HTML:

<html class="dark">

And import the CSS:

import 'element-plus/theme-chalk/dark/css-vars.css'

2. Toggle Dark Mode (Recommended)

Use VueUse's useDark for easy toggling:

<script setup>
import { useDark, useToggle } from '@vueuse/core'

const isDark = useDark()
const toggleDark = useToggle(isDark)
</script>

<template>
  <el-button @click="toggleDark()">
    Toggle Dark Mode
  </el-button>
</template>

3. Manual Toggle

Implement your own toggle:

<script setup>
import { ref, watch } from 'vue'

const isDark = ref(false)

watch(isDark, (value) => {
  if (value) {
    document.documentElement.classList.add('dark')
  } else {
    document.documentElement.classList.remove('dark')
  }
})
</script>

<template>
  <el-switch v-model="isDark" active-text="Dark" inactive-text="Light" />
</template>

4. System Preference

Follow system preference:

<script setup>
import { ref, onMounted, onUnmounted } from 'vue'

const isDark = ref(false)

const updateTheme = (e) => {
  isDark.value = e.matches
  document.documentElement.classList.toggle('dark', e.matches)
}

onMounted(() => {
  const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')
  isDark.value = mediaQuery.matches
  updateTheme(mediaQuery)
  mediaQuery.addEventListener('change', updateTheme)
})

onUnmounted(() => {
  window.matchMedia('(prefers-color-scheme: dark)')
    .removeEventListener('change', updateTheme)
})
</script>

Read the full file on GitHub · 355 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 355 lines · 35 tokens per session scan A a5a15718c2d2

Subscribe to this mod's changes

element-plus-dark-mode is a skill published in the GitHub repository jiaiyan/element-plus-skills (25 stars, last pushed 6mo ago), licensed MIT. It adds 35 tokens to every session and 2,074 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

vue-base-skill

A parent guide for building Vue interface components with shared rules for cards, buttons, labels, and tables. It requires these components to sit inside a base card and use shared CSS design values.

jiushiwon/wg-skills · 108 tokens

ui-ux-design

Generate design systems and implement UX/UI for software products using Astro, Svelte, Tailwind CSS, Material Design 3, and OKLCH color system. Covers style selection, color palettes, typography, layout patterns, accessibility, and frontend code generation. Triggers on "design system", "UI design", "color palette"…

nexus-substrate/nexus-agents · 99 tokens

shadcn-sveltekit-design

Use when building, redesigning, beautifying, or refactoring SvelteKit pages and reusable components with shadcn-svelte, Bits UI, or the shadcn-svelte MCP. Trigger on landing pages, dashboards, marketing sites, app shells, forms, navbars, tables, dialogs, responsive layouts, theming, icon selection, and requests to…

Michael-Obele/shadcn-svelte-mcp · 99 tokens

pandacss-styling

Use when panda CSS zero-runtime styling — token system, patterns, recipes, conditions, JSX styles. Use when working with pandacss styling.

oyi77/1ai-skills · 36 tokens

atai-design-system

Build the front-end for a Newton demo with the Archetype AI Design System — the published, versioned packages (@archetypeai/ds-lib-tokens, @archetypeai/ds-ui-svelte-console, @archetypeai/ds-ui-svelte-labs) and the ds scaffolding CLI (@archetypeai/ds-cli) — instead of hand-rolling tokens, components, fonts, or brand…

archetypeai/agent-skills · 259 tokens

od-vue-export

Use this plugin when the user wants to hand an accepted Open Design artifact to a Vue 3 project.

wolfenazz/YzPzCode · 0 tokens