Agent skill

CJK Font Setup for Plots

by xjtulyc in xjtulyc/MedgeClaw

Detects a usable Chinese, Japanese or Korean font and configures matplotlib so chart labels, titles and legends render instead of showing empty boxes.

No licenceAuto-check passedData & Analytics

SKILL.md written in Chinese; this summary is our English description.

Install CJK Font Setup for Plots

skills CLI
$ npx skills add xjtulyc/MedgeClaw --skill cjk-viz -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install xjtulyc/MedgeClaw cjk-viz --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/xjtulyc/MedgeClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cjk-viz .claude/skills/cjk-viz && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cjk-viz
GitHub stars
617
Used in
1 other repo
Token cost
~1.3k tokens
SKILL.md length
171 words
Files
2 (incl. scripts)
Skills in repo
6
Repo updated
First seen
Licence
None found

At a glance

Detects a usable Chinese, Japanese or Korean font and configures matplotlib so chart labels, titles and legends render instead of showing empty boxes.

  • Works in 3 steps: 优先找 .ttf 文件 → 可以用 rcParams 全局设置,最省事 → 只有 .ttc 文件 → 必须用 FontProperties(fname=)… → 都没有 → 安装字体或用内嵌 .ttf
  • Plotting with Chinese titles, axis labels or legends
  • SKILL.md covers 何时使用, 快速使用, 关键陷阱:.ttc 文件与 matplotlib and 字体优先级, plus 2 more sections
  • Runs Python scripts from its folder; calls apt-get and pip

What it does

Before any plot that contains Chinese text, the agent runs font detection rather than assuming a font exists. The helper scripts/setup_cjk_font.py, imported as setup_cjk_font, tries a priority list of fonts including Noto Sans CJK SC, Source Han Sans SC, WenQuanYi, SimHei, Microsoft YaHei and PingFang SC, and sets plt.rcParams so plotting continues normally. An inline snippet and a font install route, fonts-noto-cjk inside Docker, are given as alternatives.

The main trap is .ttc files, common on Linux and Docker: matplotlib may find NotoSansCJK-Regular.ttc yet still draw squares after rcParams are set. The fix is to pass a FontProperties(fname=path) object to each text element, and the helper prefers .ttf files, returns the .ttc path otherwise and exposes get_cjk_fp(). After installing fonts, the matplotlib font cache must be cleared. The same setup applies to plotly static exports, and a quick render check closes the workflow. The SKILL.md is written in Chinese.

When your agent uses it

  • Plotting with Chinese titles, axis labels or legends
  • Fixing charts that show square boxes instead of CJK characters
  • Configuring fonts in a Docker container for matplotlib
  • Exporting static plotly images that contain Chinese text

Example prompts

  • “Plot monthly sales with Chinese axis labels and make sure the font renders correctly.”
  • “My matplotlib chart shows boxes instead of Chinese characters, so fix the font setup.”
  • “Set up CJK fonts in this Docker container before generating the report figures.”

Requirements

  • Python with matplotlib
  • A CJK font such as Noto Sans CJK installed on the machine

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 优先找 .ttf 文件 → 可以用 rcParams 全局设置,最省事
  2. 只有 .ttc 文件 → 必须用 FontProperties(fname=) 逐个传参
  3. 都没有 → 安装字体或用内嵌 .ttf

What it can do on your machine

Read from SKILL.md and the folder at commit fef51d3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • apt-get
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

CJK Font Setup for Plots loads about 1.3k tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 171 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 171 words (~1,256 tokens).

name
cjk-viz
version
1.0.0

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file (scripts) in skills/cjk-viz of xjtulyc/MedgeClaw.

  • SKILL.md
  • scripts/setup_cjk_font.py

Open the folder on GitHubat commit fef51d3

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in xjtulyc/MedgeClaw, which our catalogue first saw on October 7, 2026.

Compare with similar skills

CJK Font Setup for Plots next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

CJK Font Setup for Plots compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CJK Font Setup for Plots this skillxjtulyc/MedgeClaw6171 repos~1.3kAutomated safety check: PassNone
SeabornK-Dense-AI/scientific-agent-skills48k1 repos~3.4kAutomated safety check: NotesBSD-3-Clause
Data Visualizationw95/awesome-claude-corporate-skills2442 repos~2.8kAutomated safety check: PassMIT
Matplotlib Scientific Plottingjaechang-hits/SciAgent-Skills3741 repos~4kAutomated safety check: PassCustom licence
Python Dataviz Guidewentorai/research-plugins2981 repos~1.8kAutomated safety check: PassMIT
MatplotlibzLanqing/codex-claude-academic-skills4.7k17 repos~2.9kAutomated safety check: PassMIT

Similar skills

  • Seaborn

    K-Dense-AI/scientific-agent-skills

    Creates Seaborn statistical visualizations with pandas integration for distributions, relationships, categorical comparisons, regression displays, pair plots, and heatmaps.

    48k GitHub starsUsed in 1 repo~3.4k tokens
    Data & AnalyticsAuto-check: notes
  • Data Visualization

    w95/awesome-claude-corporate-skills

    Create effective data visualizations with Python (matplotlib, seaborn, plotly).

    244 GitHub starsUsed in 2 repos~2.8k tokens
    Data & AnalyticsAuto-check passed
  • Matplotlib Scientific Plotting

    jaechang-hits/SciAgent-Skills

    Low-level Python plotting for scientific figures: publication-quality line, scatter, bar, heatmap, contour, 3D; multi-panel layouts; fine control of every element.

    374 GitHub starsUsed in 1 repo~4k tokens
    Data & AnalyticsAuto-check passed
  • Python Dataviz Guide

    wentorai/research-plugins

    Publication-quality data visualization with matplotlib, seaborn, and plotly

    298 GitHub starsUsed in 1 repo~1.8k tokens
    Data & AnalyticsAuto-check passed
  • Matplotlib

    zLanqing/codex-claude-academic-skills

    Low-level plotting library for full customization. An agent skill from zLanqing/codex-claude-academic-skills.

    4.7k GitHub starsUsed in 17 repos~2.9k tokens
    Data & AnalyticsAuto-check passed
  • Scientific Visualization

    mims-harvard/OptimusKG

    Create publication figures with matplotlib/seaborn/plotly. An agent skill from mims-harvard/OptimusKG.

    147 GitHub starsUsed in 19 repos~6.3k tokens
    Data & AnalyticsAuto-check passed

More from xjtulyc/MedgeClaw

  • Guides an agent through reproducing papers built on the CHARLS health and retirement survey, from variable mapping to cognition, depression and isolation scores.

    617 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Feishu Rich Card Sender

    xjtulyc/MedgeClaw

    Sends interactive Feishu group-chat cards that mix markdown text with uploaded chart or diagram images, for progress updates and analysis results.

    617 GitHub starsUsed in 1 repo~734 tokens
    Auto-check: notes
  • Routes bioinformatics, drug discovery, clinical and multi-omics tasks from a chat interface to Claude Code sessions running K-Dense scientific skills, with a live dashboard per task.

    617 GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Six-phase process for reproducing a published paper's results from provided data, from variable mapping and sample filtering through regression tables and a written report.

    617 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • SVG UI Templates

    xjtulyc/MedgeClaw

    Generate professional SVG UI panels for structured information display.

    617 GitHub starsUsed in 1 repo~522 tokens
    Auto-check passed

Questions about CJK Font Setup for Plots

What does CJK Font Setup for Plots do?

Detects a usable Chinese, Japanese or Korean font and configures matplotlib so chart labels, titles and legends render instead of showing empty boxes. Before any plot that contains Chinese text, the agent runs font detection rather than assuming a font exists.rcParams so plotting continues normally.

When should I use CJK Font Setup for Plots?

CJK Font Setup for Plots fits situations like: plotting with Chinese titles, axis labels or legends; fixing charts that show square boxes instead of CJK characters; configuring fonts in a Docker container for matplotlib; exporting static plotly images that contain Chinese text.

How do I install CJK Font Setup for Plots in Claude Code?

Run `npx skills add xjtulyc/MedgeClaw --skill cjk-viz -a claude-code`. Or copy the skill folder (skills/cjk-viz in xjtulyc/MedgeClaw) into .claude/skills/cjk-viz in your project. Claude Code loads it when a task matches its description.

How do I install CJK Font Setup for Plots in Codex?

Run `npx skills add xjtulyc/MedgeClaw --skill cjk-viz -a codex`. Or copy the skill folder (skills/cjk-viz in xjtulyc/MedgeClaw) into .agents/skills/cjk-viz in your project. Codex loads it when a task matches its description.

Can I use CJK Font Setup for Plots in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add xjtulyc/MedgeClaw --skill cjk-viz -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cjk-viz, .gemini/skills/cjk-viz, .github/skills/cjk-viz and .opencode/skills/cjk-viz in your project.

What does CJK Font Setup for Plots need to run?

Going by SKILL.md and its folder, CJK Font Setup for Plots needs Python for the scripts in its folder and the command-line tools its instructions call (apt-get and pip). Our summary lists: Python with matplotlib; A CJK font such as Noto Sans CJK installed on the machine.

Does CJK Font Setup for Plots access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is CJK Font Setup for Plots safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does CJK Font Setup for Plots use?

No licence was found for CJK Font Setup for Plots or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does CJK Font Setup for Plots use?

About 1.3k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to CJK Font Setup for Plots?

Skills that share tags, products or a category with CJK Font Setup for Plots: Seaborn (K-Dense-AI/scientific-agent-skills, 48k stars), Data Visualization (w95/awesome-claude-corporate-skills, 244 stars), Matplotlib Scientific Plotting (jaechang-hits/SciAgent-Skills, 374 stars) and Python Dataviz Guide (wentorai/research-plugins, 298 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CJK Font Setup for Plots?

xjtulyc (a GitHub user) maintains it in xjtulyc/MedgeClaw, which has 617 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on March 12, 2026.

Source: xjtulyc/MedgeClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.