pdf-toolkit
यह क्या करती है
यह स्किल PDF के संरचित काम करती है, जैसे रिपोर्ट से टेबल निकालना या कई फ़ाइलें जोड़ना। यह उन लोगों के लिए है जो PDF के साथ काम करते हैं और सटीक, दोहराए जा सकने वाले नतीजे चाहते हैं।
कब इस्तेमाल करें
- ✓जब आपको PDF रिपोर्ट से टेक्स्ट या टेबल निकालना हो।
- ✓जब आप कई PDF को एक में जोड़ना चाहते हों या पेज की सीमा के आधार पर PDF बाँटना चाहते हों।
- ✓जब आपको PDF फ़ॉर्म के फ़ील्ड भरने हों या डेटा से नई PDF बनानी हो।
Skill का लिंक
https://github.com/TokenRhythm/opensquilla/blob/main/src/opensquilla/skills/bundled/pdf-toolkit/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप इन तीन PDF रिपोर्ट को एक फ़ाइल में जोड़ सकते हैं और दूसरी रिपोर्ट से टेबल निकाल सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट काम के लिए सही स्क्रिप्ट चुनता है, जैसे निकालना, जोड़ना, बाँटना या फ़ॉर्म भरना, और उसे वर्कस्पेस की फ़ाइलों पर चलाता है। वह नतीजे और तैयार PDF लौटाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
pdf-toolkit
Deterministic, structural PDF operations. Use this skill for programmatic work where you know exactly what you want done. For a natural-language rewrite, first draft the replacement content with ordinary reasoning, then use the explicit extract/generate/merge operations here to create the final PDF.
Use the inline Python examples with execute_code in a restricted channel.
Keep files in the active workspace and call publish_artifact with the
finished PDF. Shell commands below require an available exec_command;
they are optional shortcuts, not a reason to request host execution. If the
sandbox or a required library is unavailable, report the limitation rather
than retrying outside the sandbox.
Decide the operation
| Goal | Script |
|---|---|
| Get text or tables out of a PDF | extract.py |
| Combine pages from multiple PDFs | merge.py |
| Split a PDF by page ranges | split.py |
Fill /Tx form fields in a PDF |
form_fill.py |
| Build a new PDF from data | inline reportlab snippet, see Path C below |
Path A: Extract
python {baseDir}/scripts/extract.py /path/to/doc.pdf --json
Output:
{
"pages": 12,
"metadata": {"title": "...", "author": "..."},
"text": [
{"page": 1, "content": "..."},
{"page": 2, "content": "..."}
],
"tables": [
{"page": 3, "rows": [["..."], ["..."]]}
]
}
Text uses pdfplumber (already in default dependencies) which preserves
column layout better than naive PDF text extraction. Tables use
pdfplumber.extract_tables() with default settings; for tricky layouts
pass --tables-strategy lines|text|explicit to switch detection mode.
For OCR (scanned PDFs), this skill does not include Tesseract — use the sibling skill that wraps an OCR engine (out of scope here).
Path B: Merge / Split
Merge full files:
python {baseDir}/scripts/merge.py a.pdf b.pdf c.pdf --out combined.pdf
Or merge specific page ranges with the manifest form:
python {baseDir}/scripts/merge.py manifest.json --out combined.pdf
manifest.json:
[
{"file": "a.pdf", "pages": "1-3"},
{"file": "b.pdf", "pages": "5,7,9-11"},
{"file": "c.pdf"}
]
Page ranges are 1-based, comma-separated, hyphen for ranges. Omit pages to
include the whole file. Splits use the same syntax in reverse:
python {baseDir}/scripts/split.py input.pdf --pages "1-3,7,10-12" --out output_dir/
Each range writes one output file: output_dir/input_001.pdf,
output_dir/input_002.pdf, …
Path C: Form fill
python {baseDir}/scripts/form_fill.py form.pdf data.json --out filled.pdf
data.json maps field name → string value:
{
"applicant_name": "Wei E.",
"submission_date": "2026-05-06",
"agreed": "Yes"
}
The script discovers fields via pypdf.PdfReader.get_fields() and updates
them with update_page_form_field_values(). Fields not present in the JSON
are left untouched. Run with --list-fields to enumerate the form's fields
without filling.
Caveats:
/Btncheckbox fields take the export value (oftenYes,On, or1) rather thantrue— inspect with--list-fieldsto discover.- AcroForm fills only. XFA forms (used by some legal templates) require Adobe-specific tooling and are out of scope.
- Some signed PDFs invalidate the signature when fields change. Strip
signatures explicitly with
--clear-signaturesif that is intended.
Path D: Generate from scratch
Use reportlab directly when you need a new PDF:
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import LETTER
from pathlib import Path
c = canvas.Canvas(str(Path("out.pdf")), pagesize=LETTER)
c.setFont("Helvetica-Bold", 18)
c.drawString(72, 720, "Q3 Review")
c.setFont("Helvetica", 11)
c.drawString(72, 696, "Revenue grew 18% year over year.")
c.showPage()
c.save()
For Chinese text, register a CJK font instead of Helvetica. ReportLab's CID font works without downloading fonts or reading a user font directory:
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.cidfonts import UnicodeCIDFont
from reportlab.pdfgen import canvas
pdfmetrics.registerFont(UnicodeCIDFont("STSong-Light"))
c = canvas.Canvas("report.pdf")
c.setFont("STSong-Light", 14)
c.drawString(72, 760, "季度报告:收入增长")
c.save()
CID fonts rely on PDF reader CJK support. When an embedded font is required, use a licensed font already available inside the workspace or permitted
अक्सर पूछे जाने वाले सवाल
क्या यह PDF की सामग्री दोबारा लिखता है?
सीधे नहीं। किसी बदलाव के लिए एजेंट पहले नई सामग्री का मसौदा बनाता है, फिर इन टूल्स से अंतिम PDF बनाता है।
फ़ाइलें कहाँ जाती हैं?
स्किल फ़ाइलें सक्रिय वर्कस्पेस में रखती है और तैयार PDF वहीं से प्रकाशित करती है।
अगर कोई ज़रूरी लाइब्रेरी उपलब्ध न हो तो?
स्किल सीमा बताती है और सैंडबॉक्स के बाहर दोबारा कोशिश नहीं करती।
जानकारी
लेखक का मूल विवरण
Structured `.pdf` operations: extract text/tables, merge pages from multiple PDFs, split a PDF by page ranges, fill PDF form fields, and generate fresh PDFs from JSON. Trigger when the user wants deterministic programmatic PDF work — examples: pull tables from a report, combine three PDFs, extract pages 5-12, fill a tax form, or build a new PDF from data. This is the single public PDF entry and uses pypdf, pdfplumber, and reportlab.
repo: TokenRhythm/opensquilla
लोकप्रियता
- GitHub स्टार
- 7.1k
- रैंकिंग में स्थान
- #13590
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
browser-use
7.1kयह आपके एजेंट को OpenSquilla Desktop के साइडबार ब्राउज़र में वेब पेज खोलने, पढ़ने और चलाने देती है, जिसमें फ़ॉर्म और विज़ुअल जाँच शामिल हैं।
deep-research
7.1kयह आपके एजेंट को सहेजी गई योजना, ट्रैक किए गए स्रोतों और उद्धरणों वाली लंबी रिपोर्ट के साथ कई दौर का गहन शोध करना सिखाती है।
docx
7.1kयह आपके एजेंट को Word .docx फ़ाइलें पढ़ने, बदलने या बनाने में मदद करती है, और फ़ॉर्मेटिंग, ट्रैक्ड बदलाव और ढाँचा बना रहता है।
html-coder
7.1kयह आपके एजेंट को सुलभ फ़ॉर्म और HTML5 फ़ीचर वाले साफ़ HTML पेज लिखने और उन्हें वेब प्रीव्यू में खोलने में मदद करती है।
मिलती-जुलती skills
feishu-doc
394kयह आपके एजेंट को document टूल से Feishu क्लाउड दस्तावेज़ पढ़ने, बनाने और बदलने में मदद करती है, जिसमें टेक्स्ट, इमेज और टेबल शामिल हैं।
feishu-drive
394kयह आपके एजेंट को बॉट के साथ साझा किए गए Feishu क्लाउड फ़ोल्डर में फ़ाइलें देखने, व्यवस्थित करने और उन पर टिप्पणी करने देती है।
feishu-perm
394kयह आपके एजेंट को Feishu फ़ाइल तक किसकी पहुंच है, यह जांचने और बदलने देती है, और आपके अनुरोध के लिए सबसे छोटी अनुमति चुनती है।