Skip to content
Agentmart
Submit a tool

article-reorganization

Reorganize a long, scattered Markdown article into a clean hierarchy of Parts and Chapters, then regenerate its PDF with Pandoc (--top-level-division=part).

Skill by gbencke

IndexedMIT★ 6
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/gbencke-article-reorganization

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Reorganize a long, scattered Markdown article into a clean hierarchy of Parts and Chapters, then regenerate its PDF with Pandoc (--top-level-division=part). Use when asked to "reorganize an article", "restructure into parts and chapters", "fix article structure and regenerate PDF", or invokes /article-reorganization.

Use cases: documents, writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/article-reorganization

What's inside

Skill name
article-reorganization
Description
Reorganize a long, scattered Markdown article into a clean hierarchy of Parts and Chapters, then regenerate its PDF with Pandoc (--top-level-division=part). Use when asked to "reorganize an article", "restructure into parts and chapters", "fix article structure and regenerate PDF", or invokes /article-reorganization.
License
MIT
Instructions
97 lines in SKILL.md · view on GitHub

Files (2)

  • README.md
  • SKILL.md

SKILL.md (first lines)

# article-reorganization

Reorganize a long, scattered Markdown article into a clean hierarchy of **Parts** and **Chapters**, then regenerate its PDF.

## When to use

Use this skill when an article has:
- Flat or scattered section structure
- Related topics split across non-consecutive sections (e.g., "Section 2" and "Section 2 (Extended)" far apart)
- A need for print/PDF output with Parts, Chapters, Table of Contents, and Index

## Method

### 1. Analyze the current structure

Read the source Markdown and list all top-level headers. Identify logical groups, such as:
- Foundations
- Training and alignment
- Ecosystem and tooling
- Systems and applications
- Interpretability, limits, and evaluation
- Appendices and references

### 2. Propose a Part / Chapter plan

Map existing sections into a hierarchy. Keep related sections consecutive and remove "Extended" markers by promoting the content to its own chapter.

Example:

| Old | New |
| --- | --- |
| Section 1 — Introduction | Part I — Foundations → Chapter 1 — Introduction |
| Section 2 — What LLMs Actually Learn | Chapter 2 — What LLMs Actually Learn |
| Section 2 (Extended) — Transformer Architecture | Chapter 3 — Transformer Architecture |
| Section 3 — Pre-training | Chapter 4 — Pre-training |
| Section 3 (Extended) — Pre-training Deep Dive | Chapter 5 — Pre-training Deep Dive |

### 3. Rewrite the Markdown

- Use `#` for **Parts**.
- Use `##` for **Chapters**.
- Shift all internal headings down by one level (`##` → `###`, `###` → `####`).
- Place the Preface as an unnumbered chapter before Part I: `## Preface {.unnumbered}`.
- Add an **Index of Parts and Chapters** after the Preface as an unnumbered chapter.

### 4. Generate the PDF

Use Pandoc with `--top-level-division=part` so `#` becomes a LaTeX `\part{}`, `##` becomes `\chapter{}`, and `###` becomes `\section{}`.

```bash
pandoc article.md -o pdf/article.pdf \
  --toc --toc-depth=3 --number-sections \
  --pdf-engine=xelatex \
  -f markdown+hard_line_breaks \
  -V geometry:margin=1in \
  -V colorlinks=true \
  -V documentclass=report \
  --top-level-division=part \
  -V mainfont="DejaVu Serif" \
  -V sansfont="DejaVu Sans" \
  -V monofont="DejaVu Sans Mono" \
  -V mathfont="DejaVu Math TeX Gyre"
```

DejaVu fonts are recommended so box-drawing characters in ASCII diagrams render correctly.

### 5. Verify and commit

- Confirm the PDF contains the Parts, Chapters, Table of Contents, and Index.
- Commit the reorganized Markdown and regenerated PDF.
- Remove any temporary helper files; the original content remains in Git history.

## Output structure

```markdown
---
title: Article Title
---

## Preface: How to Read This Article {.unnumbered}
...

## Index of Parts and Chapters {.unnumbered}
- Part I — Foundations
  - Chapter 1 — ...
  - Chapter 2 — ...

# Part I — Foundations
## Chapter 1 — Introduction
### Section
...

# Part II — ...
...
```

From gbencke/dotfiles, MIT.

More from gbencke/dotfiles

Signals

Stars
6
Forks
0
Open issues
0
Last commit (this folder)
Jul 17, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from gbencke

Cite this page

article-reorganization skill. Agent Mart. https://agentmart.dev/skills/gbencke-article-reorganization (last updated 2026-10-24)