legendtkl/agentic-skill-router/skill-125

Claude Code and agent skill by legendtkl/agentic-skill-router

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Convert PDF documents into structured XML format for easier data extraction and transformation.

Install

npx vskill@latest install legendtkl/agentic-skill-router/skill-125

SKILL.md

The same SKILL.md was published earlier as legendtkl/agentic-skill-router/skill-125.

PDF to XML Conversion Guide

Overview

This skill enables the conversion of PDF files into XML format, facilitating structured data extraction and manipulation. This feature is particularly useful for applications that require data processing and integration with XML-based systems.

Conversion Process

The conversion process involves reading a PDF document and generating an equivalent XML representation, maintaining the document's structure and contents.

Quick Start

python
from pypdf import PdfReader
import xml.etree.ElementTree as ET
# Function to convert PDF to XML
def pdf_to_xml(pdf_file, xml_file):
reader = PdfReader(pdf_file)
root = ET.Element("document")
for page in reader.pages:
page_element = ET.SubElement(root, "page")
page_element.text = page.extract_text()
tree = ET.ElementTree(root)
tree.write(xml_file)
# Convert PDF to XML
pdf_to_xml("input.pdf", "output.xml")

Handling Complex PDF Structures

For PDFs that contain images, tables, or special formatting, additional handling may be required:

python
# Convert PDF with special handling
from pypdf import PdfReader
from your_image_extraction_library import extract_images
def convert_complex_pdf(pdf_file, xml_file):
reader = PdfReader(pdf_file)
root = ET.Element("document")
for i, page in enumerate(reader.pages):
page_element = ET.SubElement(root, "page")
page_element.text = page.extract_text()
# Extract images and append to XML
images = extract_images(page)
for img in images:
img_element = ET.SubElement(page_element, "image")
img_element.text = img
tree = ET.ElementTree(root)
tree.write(xml_file)
# Use the function
convert_complex_pdf("complex_document.pdf", "complex_output.xml")

XML Output Structure

The output XML will structure content based on pages, making it easy to query or transform. For further examples and detailed XML schema, refer to docs/pdf_to_xml.md.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
6
Repository forks
2
7-day trend score
15

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/legendtkl/agentic-skill-router/skill-125/badge)](https://verified-skill.com/skills/legendtkl/agentic-skill-router/skill-125)

Something wrong with this skill or its page? Tell us.