pdf-verification-check
यह क्या करती है
यह स्किल PDF बनाने वाले किसी भी काम के लिए जाँच का चरण है। यह उन लोगों के लिए है जिन्हें इस्तेमाल से पहले सबूत चाहिए कि PDF आउटपुट वैध है।
कब इस्तेमाल करें
- ✓जब काम ने अभी एक या अधिक PDF फ़ाइलें बनाई हों।
- ✓जब पेज संख्या आवश्यकता का हिस्सा हो, जैसे एक पेज का सारांश।
- ✓जब AI सफलता की रिपोर्ट देने या अगले चरण पर जाने वाला हो।
Skill का लिंक
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pdf-verification-check/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“हमने अभी जो PDF बनाई हैं, उन्हें जाँचिए। सारांश एक पेज का होना चाहिए और सूची दो पेज की।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI अपेक्षित फ़ाइलें और पेज संख्या सूचीबद्ध करता है, run_shell से PyPDF2 स्क्रिप्ट चलाता है, नतीजे जाँचता है, और मेल न खाने पर फ़ाइल फिर बनाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
PDF Verification Check
Use this skill whenever your task involves generating PDF files. Do not declare task completion until you have programmatically verified that the PDFs exist, are not corrupted, and match the expected page counts.
When to Use
- Immediately after generating one or more PDF files.
- Before reporting success or moving to the next phase of a task.
- When specific page counts are required (e.g., "1-page summary", "2-page listing").
Verification Steps
- Identify Expected Outputs: List the file paths and their expected page counts.
- Run Verification Script: Use
run_shellto execute a Python script usingPyPDF2. - Validate Results: Ensure the script exits successfully and reports the correct page counts.
- Remediate: If verification fails, inspect the generation logic and regenerate.
Verification Script
Use the following Python snippet with run_shell to verify PDFs. Adjust the expected_pages dictionary to match your task requirements.
import sys
from PyPDF2 import PdfReader
def verify_pdfs(files):
"""
files: dict mapping filepath to expected_page_count (or None if any count is ok)
"""
all_valid = True
for path, expected_count in files.items():
try:
reader = PdfReader(path)
actual_count = len(reader.pages)
if expected_count is not None and actual_count != expected_count:
print(f"FAIL: {path} has {actual_count} pages, expected {expected_count}")
all_valid = False
else:
print(f"OK: {path} has {actual_count} pages")
except Exception as e:
print(f"ERROR: Cannot read {path} - {str(e)}")
all_valid = False
return 0 if all_valid else 1
# Example usage - modify this map for your specific task
files_to_check = {
"output/listing.pdf": 2,
"output/map.pdf": 1
}
sys.exit(verify_pdfs(files_to_check))
Integration Example
When using run_shell, pass the script as a heredoc or save it temporarily:
python3 -c "
import sys
from PyPDF2 import PdfReader
# ... insert logic here ...
"
Rules
- Always Verify: Never assume a PDF generation tool succeeded without checking the output file.
- Check Integrity: Successfully opening the file confirms it is not corrupted/empty.
- Check Counts: Page count mismatches often indicate formatting errors or missing content.
- Fail Fast: If verification fails, attempt to fix the generation code immediately rather than proceeding.
Dependencies
Ensure PyPDF2 is available in the environment. If not, install it first:
pip install PyPDF2
अक्सर पूछे जाने वाले सवाल
जाँच के लिए क्या सूचीबद्ध करूँ?
हर फ़ाइल का पाथ और उसकी अपेक्षित पेज संख्या।
जाँच विफल हो तो क्या होता है?
गाइड कहती है कि बनाने का तर्क देखें और फ़ाइल फिर से बनाएँ।
क्या पेज संख्या खुली छोड़ी जा सकती है?
हाँ, जब कोई संख्या तय न हो, तो स्क्रिप्ट कोई भी पेज संख्या स्वीकार करती है।
जानकारी
लेखक का मूल विवरण
Verify generated PDFs for integrity and page count using PyPDF2 before task completion.
repo: HKUDS/AgentPilot
लोकप्रियता
- GitHub स्टार
- 7.8k
- रैंकिंग में स्थान
- #12937
- लाइसेंस
- MIT
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
agentpilot
7.8kआपके एजेंट को AgentPilot से प्रोजेक्ट को चरण-दर-चरण सुधारने में मदद करती है, जिसमें बदलाव सुझाए, परखे और स्कोर किए जाते हैं।
openspace
7.8kआपके एजेंट को OpenSpace सेट करने में मदद करती है, जो एजेंट स्किल्स सहेजता और वापस लाता है, और MCP के ज़रिए आपके AI ऐप से जुड़ता है।
rsi-arena
7.8kआपके एजेंट को AIME और Terminal-Bench जैसे मानक AI बेंचमार्क टेस्ट सेट करने और चलाने में मदद करती है, ताकि सुधार के तरीकों की तुलना हो सके।
experiment-guide
7.8kआपके एजेंट को छोटे प्रयोग बनाने, उनके नतीजे पढ़ने और जाँच के दौरान उपयोगी निष्कर्ष लिखने में मदद करती है।
मिलती-जुलती skills
feishu-doc
394kयह आपके एजेंट को document टूल से Feishu क्लाउड दस्तावेज़ पढ़ने, बनाने और बदलने में मदद करती है, जिसमें टेक्स्ट, इमेज और टेबल शामिल हैं।
feishu-drive
394kयह आपके एजेंट को बॉट के साथ साझा किए गए Feishu क्लाउड फ़ोल्डर में फ़ाइलें देखने, व्यवस्थित करने और उन पर टिप्पणी करने देती है।
feishu-perm
394kयह आपके एजेंट को Feishu फ़ाइल तक किसकी पहुंच है, यह जांचने और बदलने देती है, और आपके अनुरोध के लिए सबसे छोटी अनुमति चुनती है।