# Ni poetry book

> Ni poetry book is an open-source agent skill for files and documents. Turns sourced poetry, articles and notes into a typeset LaTeX PDF with page checks. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ttttstc/ni-skill/tree/main/skills/ni-poetry-book
- **Repository:** https://github.com/ttttstc/ni-skill
- **GitHub stars:** 10
- **License:** MIT
- **Skill name:** ni-poetry-book
- **Collection:** https://github.com/ttttstc/ni-skill
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents)
- **Listing updated:** 2026-12-04

## About

This skill compiles a collection of source material into a Chinese-language, horizontally set LaTeX book delivered as a real PDF. Inputs can be chronologically arranged poetry with dated works, appendices for undated pieces, or Markdown technical articles with code, tables, quotes and images. The agent is directed to keep provenance intact: each work needs a stable ID and at least one source, undated items stay in an appendix, and uncertain attributions or missing sources are stated openly rather than smoothed over.

The workflow runs a render script that validates the structured JSON, compiles the document with LuaLaTeX and produces a validation report covering page layout, font embedding, missing glyphs, overflow and blank pages. Output includes a preview contact sheet, a work-to-page map and a build manifest. Six built-in visual themes are available, and an article mode fetches HTTPS images with size limits and checksums unless offline mode is set.

The skill expects Python 3, latexmk, LuaLaTeX and Ghostscript, plus fontTools, PyMuPDF and Pillow, with PyYAML for article mode. A bundled Noto Serif SC font covers Chinese text, while an English serif font must be supplied by the user. The output directory must be new or empty so existing files are not overwritten.

## When your agent uses it

> 把诗词、文赋、年谱、史料或技术文章整理为编年诗传、主题文集、图文专题或课程讲义，生成宋代文人审美的简体横排 LaTeX PDF。用户说“用 Poetry Book 成书”“把这些资料排成书”“编年诗集 PDF”“把 Markdown 技术文章做成图文样张”“选择烟雨、青瓷、墨禅、朱砂、月夜或竹影模板”时使用。保留来源、图片和未系年状态，内置六套主题，并输出逐页校验报告和预览图。

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs Python scripts](https://github.com/ttttstc/ni-skill/tree/HEAD/skills/ni-poetry-book)
- [Network calls found in its scripts](https://github.com/ttttstc/ni-skill/tree/HEAD/skills/ni-poetry-book)
- [Includes binary files](https://github.com/ttttstc/ni-skill/tree/HEAD/skills/ni-poetry-book)
- [License: MIT](https://github.com/ttttstc/ni-skill/tree/HEAD/skills/ni-poetry-book)

## Features

- **Structured book rendering:** Builds a PDF from normalized JSON with chapters, works, sources and an optional appendix.
- **Markdown article mode:** Converts Markdown articles with headings, lists, code, tables, quotes and images into a book layout.
- **Six visual themes:** Offers six built-in Chinese typographic themes covering covers, chapter openers and page styling.
- **Automated PDF validation:** Checks page size, font embedding, missing characters, overflow, blank pages and layout direction.
- **Source and image tracking:** Keeps source files, image hashes and dimensions alongside the generated book.
- **Offline rebuilds:** Can reuse previously downloaded images with checksum verification when run offline.

## Good for

- Typeset a chronologically arranged collection of poems with source notes into a PDF
- Turn a Markdown technical article into a styled PDF with code blocks and tables
- Build a course handout from several Markdown lessons with preview images
- Produce a themed anthology where undated works go into an appendix
- Check a generated book for missing glyphs and layout overflow before sharing

## Install

### Claude Code

This skill ships in the `ni-skill` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ttttstc/ni-skill
/plugin install ni-skill@ni-skill
```

Or copy only this skill to `~/.claude/skills/ni-poetry-book`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ttttstc/ni-skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ni-poetry-book &&
cp -R "$tmp/skills/ni-poetry-book" ~/.claude/skills/ni-poetry-book &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/ni-poetry-book` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/ni-poetry-book` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ttttstc/ni-skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ni-poetry-book &&
cp -R "$tmp/skills/ni-poetry-book" ~/.agents/skills/ni-poetry-book &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/ni-poetry-book` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/ni-poetry-book` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ttttstc/ni-skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ni-poetry-book &&
cp -R "$tmp/skills/ni-poetry-book" ~/.cursor/skills/ni-poetry-book &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/ni-poetry-book` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ttttstc/ni-skill.git --path skills/ni-poetry-book
```

Or copy the folder to `~/.gemini/skills/ni-poetry-book` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/ni-poetry-book`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ttttstc/ni-skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ni-poetry-book &&
cp -R "$tmp/skills/ni-poetry-book" ~/.copilot/skills/ni-poetry-book &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/ni-poetry-book` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ttttstc/ni-skill.git
```

Then copy `ni-skill/skills/ni-poetry-book` into your agent's skills folder as `ni-poetry-book`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need installed to run?

Python 3, latexmk, LuaLaTeX and Ghostscript, plus the fontTools, PyMuPDF and Pillow Python packages, with PyYAML for article mode and an English serif font supplied by the user.

### Does Ni poetry book change the source files I provide?

No. The Markdown source is treated as read-only, and the converted copies are written to a separate assets directory.

### Which languages and layouts does Ni poetry book produce?

The default output is Simplified Chinese set horizontally, with an English serif font used for Latin text.

### Can Ni poetry book reuse images when there is no network?

Yes. With offline mode it only reuses images already listed in the source manifest whose checksums match.

### Does Ni poetry book overwrite an existing output folder?

No. The output directory must not exist or must be empty, so existing material is protected.

### How do I install Ni poetry book in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/ni-poetry-book to use it in all your projects, or to .claude/skills/ni-poetry-book in one project. Or install the ni-skill plugin, which includes it: /plugin marketplace add ttttstc/ni-skill, then /plugin install ni-skill@ni-skill.

### Does Ni poetry book run scripts?

Yes. It runs Python scripts. Its scripts contain network calls. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Ni poetry book?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Ni poetry book?

The closest alternatives to Ni poetry book are Ljg classic, Book publisher, Convert PDF to md, PDF and Baidu document parser.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Ljg classic](https://ai-powered.com/skills/ljg-classic): Ljg classic is an open-source agent skill for files and documents.
- [Book publisher](https://ai-powered.com/skills/book-publisher): Book publisher is an open-source agent skill for files and documents.
- [Convert PDF to md](https://ai-powered.com/skills/convert-pdf-to-md): Convert PDF to md is an open-source agent skill for files and documents.
- [PDF](https://ai-powered.com/skills/pdf-openai): PDF is a free agent skill for files and documents.
- [Baidu document parser](https://ai-powered.com/skills/baidu-document-parser): Baidu document parser is an open-source agent skill for files and documents.
- [DOCX](https://ai-powered.com/skills/docx-anthropics): DOCX is a free agent skill for files and documents.
- [PDF recipe](https://ai-powered.com/skills/pdf-recipe): PDF recipe is an open-source agent skill for files and documents.
- [PPTX](https://ai-powered.com/skills/pptx): PPTX is a free agent skill for files and documents.

---
Source: https://ai-powered.com/skills/ni-poetry-book
