Markitdown
ImCa0/just-laws
Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.
Complete guide for reading and editing PDF documents with PyMuPDF.
$ npx skills add benchflow-ai/skillsbench --skill pdf-editing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install benchflow-ai/skillsbench pdf-editing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tasks/edit-pdf/environment/skills/pdf-editing .claude/skills/pdf-editing && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "pdf-editing" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/edit-pdf/environment/skills/pdf-editing into .claude/skills/pdf-editing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf-editing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/benchflow-ai/skillsbench/tree/main/tasks/edit-pdf/environment/skills/pdf-editingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add benchflow-ai/skillsbench --skill pdf-editing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install benchflow-ai/skillsbench pdf-editing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .agents/skills && cp -r skills-src/tasks/edit-pdf/environment/skills/pdf-editing .agents/skills/pdf-editing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "pdf-editing" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/edit-pdf/environment/skills/pdf-editing into .agents/skills/pdf-editing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf-editing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add benchflow-ai/skillsbench --skill pdf-editing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install benchflow-ai/skillsbench pdf-editing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/tasks/edit-pdf/environment/skills/pdf-editing .cursor/skills/pdf-editing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "pdf-editing" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/edit-pdf/environment/skills/pdf-editing into .cursor/skills/pdf-editing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf-editing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/benchflow-ai/skillsbench.git --path tasks/edit-pdf/environment/skills/pdf-editing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add benchflow-ai/skillsbench --skill pdf-editing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install benchflow-ai/skillsbench pdf-editing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/tasks/edit-pdf/environment/skills/pdf-editing .gemini/skills/pdf-editing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "pdf-editing" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/edit-pdf/environment/skills/pdf-editing into .gemini/skills/pdf-editing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf-editing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install benchflow-ai/skillsbench pdf-editingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add benchflow-ai/skillsbench --skill pdf-editing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .github/skills && cp -r skills-src/tasks/edit-pdf/environment/skills/pdf-editing .github/skills/pdf-editing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "pdf-editing" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/edit-pdf/environment/skills/pdf-editing into .github/skills/pdf-editing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf-editing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add benchflow-ai/skillsbench --skill pdf-editing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install benchflow-ai/skillsbench pdf-editing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/tasks/edit-pdf/environment/skills/pdf-editing .opencode/skills/pdf-editing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "pdf-editing" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/edit-pdf/environment/skills/pdf-editing into .opencode/skills/pdf-editing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf-editing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
pdf-editingComplete guide for reading and editing PDF documents with PyMuPDF.
PDF Editing is an agent skill from benchflow-ai/skillsbench. Complete guide for reading and editing PDF documents with PyMuPDF.
Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Documents & Office, covering PDF. The repository describes itself as: SkillsBench evaluates how well skills work and how effective agents are at using them. The licence is Apache-2.0.
2 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 9a1f4dd. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
python3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
PDF Editing loads about 2.5k tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 562 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from benchflow-ai/skillsbench at commit 9a1f4dd, republished under its Apache-2.0 licence (© benchflow-ai). 562 words, ~2,484 tokens.
.claude/skills/pdf-editing/SKILL.md (or your agent's skills folder).NEVER DO THESE:
TWO APPROACHES - CHOOSE THE RIGHT ONE:
For REPLACING text (e.g., updating name, email, DOB):
draw_rect() with white fill to cover old textinsert_text() at the SAME positionFor TRUE REDACTION of sensitive data (e.g., student ID):
add_redact_annot(rect, fill=(1,1,1)) with WHITE fillapply_redactions() to REMOVE text from PDF structureinsert_text() to add masked value (e.g., "****5678")USE PYTHON WITH PyMuPDF (fitz) - it is pre-installed and produces the best results.
PyMuPDF preserves the text layer properly, making text extractable after editing. JavaScript libraries like pdf-lib may create text that tools like pypdf cannot extract.
# PyMuPDF is already installed - just use it
python3 -c "import fitz; print('PyMuPDF ready')"import fitz
doc = fitz.open("input.pdf")
page = doc[0]
# Extract all text to understand the document
text = page.get_text()
print(text)# search_for() returns list of rectangles where text is found
rects = page.search_for("Label Text")
if rects:
rect = rects[0]
# rect.x0, rect.y0 = top-left corner
# rect.x1, rect.y1 = bottom-right corner
print(f"Found at: ({rect.x0}, {rect.y0}) to ({rect.x1}, {rect.y1})")# Insert text at a specific position
page.insert_text(
(x_position, y_position), # coordinates
"text to insert",
fontsize=11,
color=(0, 0, 0) # black
)
doc.save("output.pdf")When a form field is empty (no existing value), insert text next to the label:
import fitz
doc = fitz.open("input.pdf")
page = doc[0]
# Find label, insert value to the right of it
label_rect = page.search_for("FIELD LABEL:")[0]
page.insert_text((label_rect.x1 + 5, label_rect.y1), "value", fontsize=11)
# For today's date
from datetime import datetime
date_rect = page.search_for("Date")[0]
today = datetime.now().strftime("%Y/%m/%d")
page.insert_text((date_rect.x1 + 5, date_rect.y1), today, fontsize=11)
# For signatures - insert the person's name
sig_rect = page.search_for("signature")[0]
page.insert_text((sig_rect.x1 + 5, sig_rect.y1), "Full Name", fontsize=12)
doc.save("output.pdf")When you need to replace text that's already in the PDF with new/correct values:
WRONG - DO NOT DO THIS:
# WRONG: Adding text next to old value
page.insert_text((old_rect.x1 + 10, old_rect.y1), new_value) # NO!
# WRONG: Using strikethrough
page.draw_line(start, end, color=(0,0,0)) # NO!
# WRONG: Rasterizing to image
pix = page.get_pixmap() # NO! Destroys text layerRIGHT - DO THIS:
import fitz
doc = fitz.open("input.pdf")
page = doc[0]
# First, extract text to see what's in the PDF
current_text = page.get_text()
print(current_text) # Examine what values exist
# To replace a value you found that needs changing:
old_value = "..." # The value you found in the PDF that's wrong
new_value = "..." # The correct value from your input source
rects = page.search_for(old_value)
if rects:
rect = rects[0]
# STEP 1: Draw WHITE rectangle to COMPLETELY COVER old text
page.draw_rect(rect, color=(1, 1, 1), fill=(1, 1, 1), width=0)
# STEP 2: Insert new text at the SAME position (not offset!)
page.insert_text((rect.x0, rect.y1), new_value, fontsize=11, color=(0, 0, 0))
doc.save("output.pdf")Key points:
draw_rect(rect, fill=(1,1,1), width=0) draws a WHITE filled rectangle(1, 1, 1) is white in RGB (0-1 scale)rect.x0 (same X position), NOT rect.x1 + offsetFor sensitive data like student IDs, you must use TRUE REDACTION that removes the original text from the PDF structure. A white rectangle only VISUALLY covers text - tools like pypdf can still extract the hidden text!
CRITICAL DISTINCTION:
draw_rect() = Visual cover only (text still extractable by machines)add_redact_annot() + apply_redactions() = TRUE redaction (text removed from PDF)Example: "A12345678" should become "****5678" (show only last 4 digits)
import fitz
doc = fitz.open("input.pdf")
page = doc[0]
# 1. First find what value is in the PDF by reading the text
pdf_text = page.get_text()
# Find the ID in the text (e.g., "A88888888")
original_in_pdf = "A88888888" # Value you found in the PDF
# Extract just the digits for masking
digits = ''.join(c for c in original_in_pdf if c.isdigit())
masked = "****" + digits[-4:] # Result: "****8888"
rects = page.search_for(original_in_pdf)
if rects:
rect = rects[0]
# STEP 1: Create TIGHT bounding box to avoid covering nearby labels
tight_rect = fitz.Rect(rect.x0, rect.y0 + 8, rect.x1, rect.y1 - 2)
# STEP 2: Add redaction annotation with WHITE fill (not black!)
page.add_redact_annot(tight_rect, fill=(1, 1, 1)) # WHITE fill
# STEP 2: Apply redactions - this REMOVES the text from PDF structure
page.apply_redactions()
# STEP 3: Insert masked value at the same position
page.insert_text((rect.x0, rect.y1), masked, fontsize=11, color=(0, 0, 0))
doc.save("output.pdf")Why this works:
add_redact_annot(rect, fill=(1, 1, 1)) - marks area with WHITE rectangleapply_redactions() - REMOVES the underlying text from PDF structureinsert_text() - adds the masked valueWRONG approaches:
# WRONG: Black box redaction (ugly and suspicious)
page.add_redact_annot(rect, fill=(0, 0, 0)) # NO! Use white fill
# WRONG: Only using draw_rect (text still extractable!)
page.draw_rect(rect, fill=(1, 1, 1)) # NO! This only covers visually
page.insert_text(...) # Original text is still in PDF structure!
# WRONG: Adding masked value NEXT TO original
page.insert_text((rect.x1 + 10, rect.y1), masked) # NO!import fitz
doc = fitz.open("input.pdf")
page = doc[0]
# Step 1: Read PDF to see current content
pdf_text = page.get_text()
print(pdf_text)
# Step 2: Read your input source to get correct values
# (parse input file, extract the values you need)
# Step 3: For each value that differs, replace it
# Build a dict of {old_value_in_pdf: correct_value}
replacements = {} # Populate by comparing PDF content with correct values
for old_val, new_val in replacements.items():
if old_val == new_val:
continue # Skip if already correct
rects = page.search_for(old_val)
if rects:
rect = rects[0]
# Cover old text with white rectangle
page.draw_rect(rect, color=(1, 1, 1), fill=(1, 1, 1), width=0)
# Insert new text
page.insert_text((rect.x0, rect.y1), new_val, fontsize=11, color=(0, 0, 0))
doc.save("output.pdf")WARNING: pdf-lib may create text that cannot be extracted by pypdf. Use Python with PyMuPDF instead whenever possible.
If you must use Node.js/JavaScript, use pdf-lib with the same approach:
const { PDFDocument, rgb } = require('pdf-lib');
const fs = require('fs');
async function editPdf() {
const pdfBytes = fs.readFileSync('input.pdf');
const pdfDoc = await PDFDocument.load(pdfBytes);
const page = pdfDoc.getPages()[0];
const { height } = page.getSize();
// To replace text at known coordinates:
// STEP 1: Draw WHITE rectangle to cover old text
page.drawRectangle({
x: oldTextX,
y: oldTextY,
width: oldTextWidth,
height: oldTextHeight,
color: rgb(1, 1, 1), // WHITE
});
// STEP 2: Draw new text at the SAME position
page.drawText('New Value', {
x: oldTextX, // SAME X position, not offset!
y: oldTextY,
size: 11,
color: rgb(0, 0, 0),
});
fs.writeFileSync('output.pdf', await pdfDoc.save());
}WRONG with pdf-lib:
// WRONG: Adding text to the right of old value
page.drawText('New Value', {
x: oldTextX + oldTextWidth + 10, // NO! Don't offset
...
});
// WRONG: Drawing strikethrough line
page.drawLine({
start: { x: x1, y: y },
end: { x: x2, y: y },
color: rgb(0, 0, 0), // NO strikethrough!
});© benchflow-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in tasks/edit-pdf/environment/skills/pdf-editing of benchflow-ai/skillsbench.
Open the folder on GitHubat commit 9a1f4dd
PDF Editing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| PDF Editing this skillbenchflow-ai/skillsbench | 1.8k | — | ~2.5k | Automated safety check: Pass | Apache-2.0 | |
| MarkitdownImCa0/just-laws | 781 | 14 repos | ~3.2k | Automated safety check: Notes | MIT | |
| Gzh Designisjiamu/gzh-design-skill | 3.9k | 1 repos | ~2.2k | Automated safety check: Pass | AGPL-3.0 | |
| GenOffice Document CLIgenspark-ai/genoffice | 8.9k | — | ~19k | Automated safety check: Pass | Apache-2.0 | |
| Harness Book Best Practicewquguru/harness-books | 3.2k | — | ~4.1k | Automated safety check: Pass | None | |
| Bookforge Korean Ebook PDF Makergongnyang/bookforge | 314 | 1 repos | ~1.7k | Automated safety check: Pass | MIT |
ImCa0/just-laws
Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.
isjiamu/gzh-design-skill
微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…
genspark-ai/genoffice
Creates, converts, reads and edits real pptx, xlsx, docx and PDF files locally through the genoffice command line.
wquguru/harness-books
Best practices for working on the Harness books repo. An agent skill from wquguru/harness-books.
gongnyang/bookforge
Produces book-style Korean ebook PDFs from a topic or finished manuscript, with six design styles, real book parts and quality-check gates before output.
aws-samples/amazon-bedrock-agents-healthcare-lifesciences
Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV.
benchflow-ai/skillsbench
This skill should be used when working on Lean 4 formalization projects to maintain persistent memory of successful proof patterns, failed approaches, project conventions, and user preferences…
benchflow-ai/skillsbench
World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.
benchflow-ai/skillsbench
AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching acopf-math-model.md and MATPOWER branch fields.
benchflow-ai/skillsbench
Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.
benchflow-ai/skillsbench
Build deterministic, verifiable data visualizations with D3.js (v6).
benchflow-ai/skillsbench
DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.
Categories
Complete guide for reading and editing PDF documents with PyMuPDF. PDF Editing is an agent skill from benchflow-ai/skillsbench. Complete guide for reading and editing PDF documents with PyMuPDF.
PDF Editing fits situations like: tasks that involve PDF.
Run `npx skills add benchflow-ai/skillsbench --skill pdf-editing -a claude-code`. Or copy the skill folder (tasks/edit-pdf/environment/skills/pdf-editing in benchflow-ai/skillsbench) into .claude/skills/pdf-editing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add benchflow-ai/skillsbench --skill pdf-editing -a codex`. Or copy the skill folder (tasks/edit-pdf/environment/skills/pdf-editing in benchflow-ai/skillsbench) into .agents/skills/pdf-editing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add benchflow-ai/skillsbench --skill pdf-editing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pdf-editing, .gemini/skills/pdf-editing, .github/skills/pdf-editing and .opencode/skills/pdf-editing in your project.
Going by SKILL.md and its folder, PDF Editing needs the command-line tools its instructions call (python3). Our summary lists: Python 3; Node.js.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
PDF Editing is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.5k tokens (SKILL.md is roughly 9.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with PDF Editing: Markitdown (ImCa0/just-laws, 781 stars), Gzh Design (isjiamu/gzh-design-skill, 3.9k stars), GenOffice Document CLI (genspark-ai/genoffice, 8.9k stars) and Harness Book Best Practice (wquguru/harness-books, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,832 GitHub stars. The repository holds 178 skills in this directory. The repository was last updated on July 23, 2026.
Source: benchflow-ai/skillsbench on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.