Skip to content
Back to skills

Article Reorganization

ASecurity

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.

  • 6 stars
  • 0 votes
  • 1 copy
  • 5 views
  • Added November 15, 2026
toolsbashgit

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 15, 2026

npx -y skills add gbencke/dotfiles --skill article-reorganization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Article Reorganization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Article Reorganization
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gbencke-article-reorganization/badge)](https://www.skillsdirectory.com/skills/gbencke-article-reorganization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.
---

# 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 — ...
...
```

Files in this skill

  • README.md822 B
  • SKILL.md3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.