ljg-classic

Annotate classical Chinese texts word-by-word and render them into a long PNG image.

7.3k|818|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/lijigang/ljg-skills --skill ljg-classic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ljg-classic
Source: https://github.com/lijigang/ljg-skills/tree/main/skills/ljg-classic
Command: npx skills add https://github.com/lijigang/ljg-skills --skill ljg-classic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes references (resource) and scripts (resource) components.

What problem does it solve?

Reading classical Chinese texts (文言文, 古诗文, 经史子集) requires juggling dictionaries, commentaries, and translations scattered across sources. This Skill produces a single long PNG image that combines the original text, per-token color-coded annotations, a chapter interpretation, and an optional thematic illustration, so the whole chapter can be read continuously in one artifact.

Core Features & Use Cases

  • Full-coverage annotation: Every non-punctuation token receives a note, color-coded by type (teal for word meaning, vermilion for clause action, ochre for textual variants), with 100% coverage enforced by validation.
  • Chapter interpretation: Generates a plain-language essay explaining the chapter's core relationship, conditions, mechanism, and transferable insight, borrowing standards from companion writing skills.
  • Verified rendering pipeline: Renders HTML via Playwright into a 1080px-wide long PNG, validates dimensions, hashes, DOM audits, and overlapping QA slices before delivering the final image to the Downloads folder.
  • Use Case: Ask for 《道德经》第十六章 with word-by-word annotation and a full interpretation, and receive a single verified PNG with the original text, inline notes, a thematic header image, and the chapter essay.

Quick Start

Ask the assistant to annotate a classical Chinese chapter word by word and render it as a long PNG, for example: run ljg-classic on 道德经第十六章 with full annotation and interpretation.

Frequently Asked Questions about ljg-classic

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an annotated classical Chinese text image?

Provide the book name, chapter, and optionally the source text, then invoke the skill. It locks the base text, annotates every non-punctuation token, writes a chapter interpretation, and renders a verified long PNG to your Downloads folder.

What annotation colors are used for classical Chinese notes?

Three semantic colors are used: teal for word-level meanings and grammar, vermilion for clause-level actions and causality, and ochre for textual variants, loan characters, and interpretation disputes. The chapter interpretation uses warm dark ink on a warm paper background.

Does the renderer require Playwright and Bun?

Yes. The rendering and validation tools are TypeScript scripts executed with Bun, and screenshots are captured through Playwright's Chromium. First-time setup requires running bun install and bunx playwright install chromium in the skill directory.

Can I skip the thematic header image in the output?

Yes. Say you want a pure text version or no illustration, and the workflow omits the hero image fields. If image generation fails or is unavailable, the skill continues rendering a text-only version and notes the reason in the delivery report.

Why does validation fail after rendering the PNG?

Validation fails when the reconstructed original text differs from the locked source, annotation coverage is below 100%, PNG dimensions mismatch the manifest, file hashes drift, or QA slices leave coverage gaps. All hard gates must pass before the PNG is copied to Downloads.

When should I not use this skill for classical Chinese?

Do not use it for translating a single sentence or writing modern content; a plain translation or a general writing skill fits better. It is designed for full-chapter annotation and rendering, not quick one-line lookups.