IGCSE PDF to Prep JSON

Turn a past paper and mark scheme into an offline question set

The igcse-pdf-to-prep workflow helps an AI coding agent convert a Cambridge/IGCSE question paper PDF and its mark scheme PDF into one importable JSON file, including embedded diagrams and mark schemes. Codex can load it as a skill, and other AI agents can follow the same instructions and scripts.

What you need

The igcse-pdf-to-prep ZIP, unzipped into a folder. Codex users can install that folder in .codex/skills; other agent users can point their agent to the unzipped SKILL.md file.

A matching question paper PDF and mark scheme PDF, usually named with qp and ms.

An AI coding agent that can read rendered PDF pages and run local scripts. Codex is supported, but it is not required.

Python 3 with PyMuPDF for PDF extraction and draft generation.

Watch the tutorial

A short walkthrough of converting a past paper and mark scheme into an offline question set.

Setup

1. Download the skill

Download igcse-pdf-to-prep.zip, then unzip it. The zip contains the igcse-pdf-to-prep folder with SKILL.md, helper scripts, and the import format reference.

2. Give it to your agent

For Codex, unzip it into ~/.codex/skills. For another agent, unzip it anywhere convenient and open or reference igcse-pdf-to-prep/SKILL.md.

3. Start your AI agent

Open this project in your terminal. Run codex, or use another AI coding agent that can run the helper scripts and inspect the extracted page images.

Required local tools

python3 --version
python3 -m pip install PyMuPDF

Example Codex install command

mkdir -p ~/.codex/skills
unzip ~/Downloads/igcse-pdf-to-prep.zip -d ~/.codex/skills/

Convert the paper

Download the question paper PDF and the matching mark scheme PDF. Put both files where your AI agent can read them, then ask it to follow the igcse-pdf-to-prep workflow.

Prompt your AI agent

Give the agent both PDF paths. It should extract the pages, transcribe questions and mark schemes, crop diagrams, validate the JSON, and tell you the output path.

Use the igcse-pdf-to-prep skill to convert:
/path/to/0625_w25_qp_62.pdf
/path/to/0625_w25_ms_62.pdf

Import into Offline Sets

Open Offline Sets

Click Offline Sets in the top navigation.

Click Import

Use the Import button to open the offline JSON importer.

Choose the JSON

Select the generated _import.json file, or drag it into the upload area.

Review and save

The set opens in the offline editor. Review it, make any edits, then click Save Locally.

© 2026 Chaimantec