Agent skill

Convert To Digital

by open-guji in open-guji/luatex-cn

将 ltc-guji.cls 文件转换为 ltc-guji-digital 格式. An agent skill from open-guji/luatex-cn.

Apache-2.0Auto-check passed

Install Convert To Digital

skills CLI
$ npx skills add open-guji/luatex-cn --skill convert-to-digital -a claude-code

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

GitHub CLI
$ gh skill install open-guji/luatex-cn convert-to-digital --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/open-guji/luatex-cn.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/convert-to-digital .claude/skills/convert-to-digital && 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
convert-to-digital
GitHub stars
119
Token cost
~747 tokens
SKILL.md length
124 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
Apache-2.0

At a glance

将 ltc-guji.cls 文件转换为 ltc-guji-digital 格式. An agent skill from open-guji/luatex-cn.

  • Works in 7 steps: 文件头替换 → 内容环境替换 → 列表结构 → 缩进 → …
  • SKILL.md covers 前置知识, 转换步骤, 关键注意事项 and 验证
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Convert To Digital is an agent skill from open-guji/luatex-cn. 将 ltc-guji.cls 文件转换为 ltc-guji-digital 格式

Its SKILL.md is about 750 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: 基于LuaTeX的中文排版宏包,支持古籍版式精确复刻,以及符合W3C《中文排版需求》的现代中文排版. The licence is Apache-2.0.

Example prompts

  • “/convert-to-digital”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. 文件头替换
  2. 内容环境替换
  3. 列表结构 → 缩进
  4. 夹注转换(核心难点)
  5. 段落处理
  6. 印章命令
  7. 换页

What it can do on your machine

Read from SKILL.md and the folder at commit 8c48bdc. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are tex, python and bash).

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

  • Network

    No URLs in SKILL.md.

    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

Convert To Digital loads about 747 tokens when it runs. Until then it costs about 15 tokens; SKILL.md has 124 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from open-guji/luatex-cn at commit 8c48bdc, republished under its Apache-2.0 licence (© open-guji). 124 words, ~747 tokens.

Download SKILL.mdSave it as .claude/skills/convert-to-digital/SKILL.md (or your agent's skills folder).
name
convert-to-digital
description
将 ltc-guji.cls 文件转换为 ltc-guji-digital 格式

ltc-guji.cls → ltc-guji-digital 转换工作流

将使用 ltc-guji(语义模式)编写的古籍排版文件转换为 ltc-guji-digital(布局模式)格式。

前置知识

先阅读 memory 中的 guji_digital.md 了解 ltc-guji-digital 的命令体系。

参考完整示例:

  • 原始 ltc-guji.cls 文件:示例/史记五帝本纪/史记.tex
  • 转换后 digital 文件:test/digital_test/史记五帝-layout.tex

转换步骤

1. 文件头替换
tex
% ltc-guji.cls:
\documentclass[四库全书彩色]{ltc-guji}

% ltc-guji-digital:
\documentclass[SiKuQuanShu-colored]{ltc-guji-digital}

模板名称映射:四库全书彩色 → SiKuQuanShu-colored

2. 内容环境替换
tex
% ltc-guji.cls:
\begin{正文} ... \end{正文}

% ltc-guji-digital:
\begin{数字化内容} ... \end{数字化内容}
3. 列表结构 → 缩进

ltc-guji.cls 的 \列表 嵌套转换为 \缩进[N]:

  • 第一层列表项 → \缩进[1]
  • 第二层列表项 → \缩进[2]
  • 以此类推
tex
% ltc-guji.cls:
\begin{列表}
    \item 史記卷一
    \item
    \begin{列表}
        \item \填充文本框[12]{漢太史令}司馬遷\空格 撰
    \end{列表}
    \item 五帝本紀第一
\end{列表}

% ltc-guji-digital:
\缩进[1] 史記卷一
\缩进[2] \填充文本框[12]{漢太史令}司馬遷\空格 撰
\缩进[1] 五帝本紀第一
4. 夹注转换(核心难点)

这是转换中最复杂的部分。ltc-guji.cls 的 \夹注{全部注释文字} 需要手动分栏为 \双列{\右小列{...}\左小列{...}}。

4.1 确定每列字数

默认每列 21 字。当正文和夹注共享一列时:

  • 每小列可用字数 = 21 - N正文字数
  • 例如:黄帝者(3字)→ 每小列 18 字,一行 36 字
4.2 分栏算法

用 Python 脚本辅助计算:

python
def split_annotation(text, chars_per_subcol=21):
    """将注释文字按每小列 chars_per_subcol 字分栏"""
    pos = 0
    lines = []
    while pos < len(text):
        right = text[pos:pos+chars_per_subcol]
        left = text[pos+chars_per_subcol:pos+2*chars_per_subcol]
        lines.append((right, left))
        pos += 2 * chars_per_subcol
    return lines
4.3 正文+夹注混合行

当正文字符和夹注在同一行:

tex
% 正文"黄帝者"(3字) + 夹注,每小列 21-3=18 字:
黄帝者\双列{\右小列{集解徐廣曰號有熊索隠按有土徳之瑞土色}\左小列{黄故稱黄帝猶神農火徳王而稱炎帝然也此}}
4.4 多段正文拼接

当上一段夹注尾部字数不足一整行,可以和下一段正文+夹注拼在同一列:

tex
% 上段夹注尾(11+11) + 正文"生而神靈弱而能言"(8字) + 下段夹注头(3+3) = 21+21
\双列{\右小列{為名又以為號是本姓公}\左小列{孫長居姬水因改姓姬}}生而神靈弱而能言\双列{\右小列{索隠弱}\左小列{謂幼弱}}

计算规则:同一行所有元素(上段夹注尾 + 正文 + 下段夹注头)的总字符 = 21+21 = 42

5. 段落处理
tex
% ltc-guji.cls:
\begin{段落}[indent=3]
\夹注{...长文本...}
\end{段落}

% ltc-guji-digital:
\缩进[3]\双列{\右小列{...}\左小列{...}}
\缩进[3]\双列{\右小列{...}\左小列{...}}
... (逐行,每行 21+21 字)

注意:\缩进[N] 只影响当前列,所以段落中的每一行都需要加 \缩进[3]。

6. 印章命令
tex
% ltc-guji.cls(可以有详细位置参数):
\印章[page=1, opacity=0.7, color=black, xshift=5.3cm, yshift=6.7cm, width=12.9cm]{文渊阁宝印.png}

% ltc-guji-digital(简化,位置由模板决定;末尾加 % 防止空列):
\印章[page=1,opacity=0.7,color=black]{文渊阁宝印.png}%

关键:印章命令后必须加 %,否则换行符会产生空列。

7. 换页

ltc-guji.cls 中的内容自然流动不需要手动换页。ltc-guji-digital 中如果需要在特定位置换页:

tex
\换页

单独占一行,前后不要有其他内容。

关键注意事项

  1. 不要在 数字化内容 中使用 % 注释 — 会吃掉换行符导致两行合并
  2. 不要使用 ltc-guji.cls 专有命令 — \夹注、\段落、\列表、\正文 在 digital 中不存在
  3. 空行 = 空列 — 源码中的空行会在输出中产生一个空白列
  4. 每行一列 — 这是 digital 模式的核心:源码的物理行 = 输出的竖排列
  5. 验证方法 — 转换后编译,与原文件的 PDF 逐页对比,应该像素级一致

验证

bash
# 编译转换后的文件
cd test/digital_test && lualatex 史记五帝-layout.tex

# 与原文件对比页数和外观
cd 示例/史记五帝本纪 && lualatex 史记.tex

# 两个 PDF 应该页数相同、内容一致

© open-guji, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/convert-to-digital of open-guji/luatex-cn.

Open the folder on GitHubat commit 8c48bdc

Compare with similar skills

Convert To Digital 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.

Convert To Digital compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Convert To Digital this skillopen-guji/luatex-cn119—~747Automated safety check: PassApache-2.0
Convertremotion-dev/remotion63k—~247Automated safety check: PassCustom licence
Digital Forensicssickn33/agentic-awesome-skills47k1 repos~495Automated safety check: PassMIT
Digital Forensicszhaoxuya520/reverse-skill41k2 repos~389Automated safety check: WarnMIT
ClsLiberatedPixelCup/Universal-LPC-Spritesheet-Character-Generator1.8k—~822Automated safety check: PassGPL-3.0
Word to Markdown Convertergithub/awesome-copilot40k—~1.6kAutomated safety check: PassMIT

Similar skills

  • Convert

    remotion-dev/remotion

    Official

    Start the local @remotion/convert app and open it in the Codex browser.

    63k GitHub stars~247 tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Digital Forensics

    sickn33/agentic-awesome-skills

    Authorized digital forensics: memory dumps, disk timelines, PCAP investigation, artifact triage, and incident-response evidence preservation.

    47k GitHub starsUsed in 1 repo~495 tokens
    SecurityAuto-check passed
  • Digital Forensics

    zhaoxuya520/reverse-skill

    A skill your agent uses for authorized digital forensics including memory dumps, disk timelines, PCAP investigation, artifact triage, and IR evidence preservation.

    41k GitHub starsUsed in 2 repos~389 tokens
    SecurityAuto-check: warnings
  • Cls

    LiberatedPixelCup/Universal-LPC-Spritesheet-Character-Generator

    Measure lab CLS with profile:cls, debug layout shift from loading shells and first-paint jump, and keep budgets tied to a CI artifact.

    1.8k GitHub stars~822 tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed
  • Word to Markdown Converter

    github/awesome-copilot

    Official

    Converts Word .docx files to Markdown with a bundled script before analysis, extracting embedded images and handling whole folders alongside the PDF and Excel converters.

    40k GitHub stars~1.6k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed
  • Codebase To Wordpress Converter

    sickn33/agentic-awesome-skills

    Expert skill for converting any codebase (React/HTML/Next.js) into a pixel-perfect, SEO-optimized, and dynamic WordPress theme.

    47k GitHub starsUsed in 1 repo~1.1k tokens
    Frontend & DesignAuto-check passed

More from open-guji/luatex-cn

All 8 skills in this repo
  • Compare Layouts

    open-guji/luatex-cn

    比较 Original (ltc-guji.cls) 和 Digital (ltc-guji-digital.cls) TeX 文件的 layout 输出

    119 GitHub stars~550 tokensUpdated 9 days ago
    Auto-check passed
  • Prepare Next Version

    open-guji/luatex-cn

    准备下一个补丁版本 (Prepare next patch version release). An agent skill from open-guji/luatex-cn.

    119 GitHub stars~412 tokensUpdated 9 days ago
    Auto-check passed
  • Regression Test

    open-guji/luatex-cn

    运行视觉回归测试验证代码更改是否正确,支持 basic/pastissue/complete 套件及基线更新. An agent skill from open-guji/luatex-cn.

    119 GitHub stars~350 tokensUpdated 9 days ago
    Auto-check passed
  • Test Tex

    open-guji/luatex-cn

    通过回归测试框架编译并查看 TeX 文件的渲染效果,避免在工作目录生成多余 PDF. An agent skill from open-guji/luatex-cn.

    119 GitHub stars~278 tokensUpdated 9 days ago
    Auto-check passed
  • Fix GitHub Issue

    open-guji/luatex-cn

    修复 GitHub Issue 的完整工作流

    119 GitHub stars~2k tokensUpdated 9 days ago
    Auto-check passed
  • Refactor

    open-guji/luatex-cn

    清理重构代码 (Code cleanup and refactoring)

    119 GitHub stars~532 tokensUpdated 9 days ago
    Auto-check passed

Questions about Convert To Digital

What does Convert To Digital do?

将 ltc-guji.cls 文件转换为 ltc-guji-digital 格式. An agent skill from open-guji/luatex-cn. Convert To Digital is an agent skill from open-guji/luatex-cn.

How do I install Convert To Digital in Claude Code?

Run `npx skills add open-guji/luatex-cn --skill convert-to-digital -a claude-code`. Or copy the skill folder (.claude/skills/convert-to-digital in open-guji/luatex-cn) into .claude/skills/convert-to-digital in your project. Claude Code loads it when a task matches its description.

How do I install Convert To Digital in Codex?

Run `npx skills add open-guji/luatex-cn --skill convert-to-digital -a codex`. Or copy the skill folder (.claude/skills/convert-to-digital in open-guji/luatex-cn) into .agents/skills/convert-to-digital in your project. Codex loads it when a task matches its description.

Can I use Convert To Digital 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 open-guji/luatex-cn --skill convert-to-digital -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/convert-to-digital, .gemini/skills/convert-to-digital, .github/skills/convert-to-digital and .opencode/skills/convert-to-digital in your project.

What does Convert To Digital need to run?

SKILL.md names no scripts, command-line tools or credentials: Convert To Digital is instructions for the agent only. Our summary lists: Python 3.

Does Convert To Digital access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Convert To Digital 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. Review the folder before installing.

What licence does Convert To Digital use?

Convert To Digital is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Convert To Digital use?

About 747 tokens (SKILL.md is roughly 3k 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 Convert To Digital?

Skills that share tags, products or a category with Convert To Digital: Convert (remotion-dev/remotion, 63k stars), Digital Forensics (sickn33/agentic-awesome-skills, 47k stars), Digital Forensics (zhaoxuya520/reverse-skill, 41k stars) and Cls (LiberatedPixelCup/Universal-LPC-Spritesheet-Character-Generator, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Convert To Digital?

open-guji (a GitHub organization) maintains it in open-guji/luatex-cn, which has 119 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 2, 2026.

Source: open-guji/luatex-cn on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.