[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KJDDC9BVFZBDSN9J5SCV1D":3,"skill-same:01M6KJDDC9BVFZBDSN9J5SCV1D":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":13,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M6KJDDC9BVFZBDSN9J5SCV1D","pdf-verification-check-112b09",null,"Verify generated PDF files using PyPDF2 to check page counts and integrity","AG064\u002FOpenSpace","AG064","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184930299?v=4","01M6KHVFG7TB73NHX3RDYSTMH2","01M6KHVFMM7XA2PZA9Z83PHS3V",0,"MIT","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-verification-check-112b09\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33],"PDF","verification","check","pdf verification check 112b09","pdf verification check","pdf verification","integrity","verify","page","generated","files","2026-11-10 10:12:30",false,"---\nname: pdf-verification-check-112b09\ndescription: Verify generated PDF files using PyPDF2 to check page counts and integrity\n---\n\n# PDF Verification Check\n\nAfter generating PDF files, always programmatically verify their structure and integrity before declaring task completion. This catches formatting errors, incorrect page counts, and corrupted files early.\n\n## When to Use\n\nUse this skill whenever your task involves:\n- Generating PDF documents\n- Creating PDFs with specific page count requirements\n- Producing multi-part PDF outputs (e.g., listings + maps)\n\n## Verification Steps\n\n### 1. Install PyPDF2 (if not available)\n\n```bash\npip install PyPDF2\n```\n\n### 2. Verify PDF Page Count and Integrity\n\nCreate a verification script or run inline Python:\n\n```python\nfrom PyPDF2 import PdfReader\nimport os\n\ndef verify_pdf(pdf_path, expected_pages=None):\n    \"\"\"Verify PDF file exists, is readable, and has expected page count.\"\"\"\n    try:\n        # Check file exists\n        if not os.path.exists(pdf_path):\n            return False, f\"File not found: {pdf_path}\"\n        \n        # Check file size (non-empty)\n        file_size = os.path.getsize(pdf_path)\n        if file_size == 0:\n            return False, f\"Empty file: {pdf_path}\"\n        \n        # Open and verify PDF structure\n        reader = PdfReader(pdf_path)\n        actual_pages = len(reader.pages)\n        \n        # Check page count if expected\n        if expected_pages is not None and actual_pages != expected_pages:\n            return False, f\"Expected {expected_pages} pages, got {actual_pages}\"\n        \n        return True, f\"Valid PDF with {actual_pages} page(s)\"\n        \n    except Exception as e:\n        return False, f\"PDF verification failed: {str(e)}\"\n\n# Example usage\npdf_files = [\n    (\"listings.pdf\", 2),\n    (\"map.pdf\", 1),\n]\n\nall_valid = True\nfor pdf_path, expected in pdf_files:\n    valid, message = verify_pdf(pdf_path, expected)\n    print(f\"{pdf_path}: {'✓' if valid else '✗'} {message}\")\n    if not valid:\n        all_valid = False\n\nif not all_valid:\n    raise Exception(\"PDF verification failed - review and regenerate\")\n```\n\n### 3. Use run_shell for Verification\n\nExecute the verification using `run_shell`:\n\n```bash\npython -c \"\nfrom PyPDF2 import PdfReader\nimport sys\n\npdf_path = 'output.pdf'\nexpected = 2\n\ntry:\n    reader = PdfReader(pdf_path)\n    actual = len(reader.pages)\n    if actual != expected:\n        print(f'ERROR: Expected {expected} pages, got {actual}')\n        sys.exit(1)\n    print(f'OK: {pdf_path} has {actual} page(s)')\nexcept Exception as e:\n    print(f'ERROR: {e}')\n    sys.exit(1)\n\"\n```\n\n### 4. Verify Before Completion\n\n**Critical:** Only mark your task as complete after ALL PDF verification checks pass. If verification fails:\n\n1. Examine the error message\n2. Regenerate the PDF with corrected formatting\n3. Re-run verification\n4. Repeat until all checks pass\n\n## Common Issues Caught\n\n- Wrong page counts (e.g., content spilling to extra pages)\n- Empty or corrupted PDF files\n- PDFs that fail to open properly\n- Missing expected sections due to formatting errors\n\n## Example Workflow\n\n```python\n# 1. Generate PDF\ngenerate_pdf(\"listings.pdf\", content)\n\n# 2. Verify before completion\nvalid, msg = verify_pdf(\"listings.pdf\", expected_pages=2)\nif not valid:\n    # Fix and regenerate\n    regenerate_pdf(\"listings.pdf\", corrected_content)\n    valid, msg = verify_pdf(\"listings.pdf\", expected_pages=2)\n\n# 3. Only complete if verification passes\nassert valid, f\"Cannot complete: {msg}\"\n```","# PDF Verification Check\n\nAfter generating PDF files, always programmatically verify their structure and integrity before declaring task completion. This catches formatting errors, incorrect page counts, and corrupted files early.\n\n## When to Use\n\nUse this skill whenever your task involves:\n- Generating PDF documents\n- Creating PDFs with specific page count requirements\n- Producing multi-part PDF outputs (e.g., listings + maps)\n\n## Verification Steps\n\n### 1. Install PyPDF2 (if not available)\n\n```bash\npip install PyPDF2\n```\n\n### 2. Verify PDF Page Count and Integrity\n\nCreate a verification script or run inline Python:\n\n```python\nfrom PyPDF2 import PdfReader\nimport os\n\ndef verify_pdf(pdf_path, expected_pages=None):\n    \"\"\"Verify PDF file exists, is readable, and has expected page count.\"\"\"\n    try:\n        # Check file exists\n        if not os.path.exists(pdf_path):\n            return False, f\"File not found: {pdf_path}\"\n        \n        # Check file size (non-empty)\n        file_size = os.path.getsize(pdf_path)\n        if file_size == 0:\n            return False, f\"Empty file: {pdf_path}\"\n        \n        # Open and verify PDF structure\n        reader = PdfReader(pdf_path)\n        actual_pages = len(reader.pages)\n        \n        # Check page count if expected\n        if expected_pages is not None and actual_pages != expected_pages:\n            return False, f\"Expected {expected_pages} pages, got {actual_pages}\"\n        \n        return True, f\"Valid PDF with {actual_pages} page(s)\"\n        \n    except Exception as e:\n        return False, f\"PDF verification failed: {str(e)}\"\n\n# Example usage\npdf_files = [\n    (\"listings.pdf\", 2),\n    (\"map.pdf\", 1),\n]\n\nall_valid = True\nfor pdf_path, expected in pdf_files:\n    valid, message = verify_pdf(pdf_path, expected)\n    print(f\"{pdf_path}: {'✓' if valid else '✗'} {message}\")\n    if not valid:\n        all_valid = False\n\nif not all_valid:\n    raise Exception(\"PDF verification failed - review and regenerate\")\n```\n\n### 3. Use run_shell for Verification\n\nExecute the verification using `run_shell`:\n\n```bash\npython -c \"\nfrom PyPDF2 import PdfReader\nimport sys\n\npdf_path = 'output.pdf'\nexpected = 2\n\ntry:\n    reader = PdfReader(pdf_path)\n    actual = len(reader.pages)\n    if actual != expected:\n        print(f'ERROR: Expected {expected} pages, got {actual}')\n        sys.exit(1)\n    print(f'OK: {pdf_path} has {actual} page(s)')\nexcept Exception as e:\n    print(f'ERROR: {e}')\n    sys.exit(1)\n\"\n```\n\n### 4. Verify Before Completion\n\n**Critical:** Only mark your task as complete after ALL PDF verification checks pass. If verification fails:\n\n1. Examine the error message\n2. Regenerate the PDF with corrected formatting\n3. Re-run verification\n4. Repeat until all checks pass\n\n## Common Issues Caught\n\n- Wrong page counts (e.g., content spilling to extra pages)\n- Empty or corrupted PDF files\n- PDFs that fail to open properly\n- Missing expected sections due to formatting errors\n\n## Example Workflow\n\n```python\n# 1. Generate PDF\ngenerate_pdf(\"listings.pdf\", content)\n\n# 2. Verify before completion\nvalid, msg = verify_pdf(\"listings.pdf\", expected_pages=2)\nif not valid:\n    # Fix and regenerate\n    regenerate_pdf(\"listings.pdf\", corrected_content)\n    valid, msg = verify_pdf(\"listings.pdf\", expected_pages=2)\n\n# 3. Only complete if verification passes\nassert valid, f\"Cannot complete: {msg}\"\n```",{"name":5,"description":7},"main","ff671ef61ed6587c49bd54c81cdc751c0b99e363","gdpval_bench\u002Fskills\u002Fpdf-verification-check-112b09","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace","https:\u002F\u002Fgithub.com\u002FAG064","AG064, E.Mi.\r\n\r\nA person who thinks all the time, yet all they have to think is nothing. I want to improve the world and work on open source projects","2026-10-08 06:53:48",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add AG064\u002FOpenSpace --skill pdf-verification-check-112b09",{"tool":52,"command":53},"bunx","bunx skills add AG064\u002FOpenSpace --skill pdf-verification-check-112b09",{"tool":55,"command":56},"pnpm","pnpm dlx skills add AG064\u002FOpenSpace --skill pdf-verification-check-112b09","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-verification-check-112b09\u002FSKILL.md",true,[60],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},".skill_id","OTHER","其他",43,"https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-verification-check-112b09\u002F.skill_id",[67,89,105,114,144,160],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":34},"01M6KKMPWA0B5SCCH766F8M5EA","write-special-chars-ts-check","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, plus a reliable TypeScript type-checking step that filters output to only the newly-written files to avoid being misled by pre-existing errors.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[74,25,75,76,77,78,79,80,81,82,83,33,84,85,86,87,88],"write special chars ts check","write","filters","Existing","type-checking","for","errors","script","output","type","only","template","file","python","typescript",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":34},"01M6KKMJXVBNVEY3TRK055F4A7","write-special-chars-readback","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, with mandatory post-write verification via read_file and cleanup of \u002Ftmp helper scripts.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[96,97,75,85,98,99,86,87,100,24,101,102,103,79,81,104],"readback","write special chars readback","cleanup","read","scripts","via","post","helper","with",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":34},"01M6KKMEGX9M9NC105J0W3Q5B9","write-special-chars-heredoc","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) by using a Python heredoc script executed via shell.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[75,112,87,79,101,85,113,86,81],"write special chars heredoc","shell",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":125,"publishedAt":34},"01M6KKM8EJ2AATVHZBNB916WT0","worldmonitor-reference","Curated architecture index of the WorldMonitor open-source dashboard. Reference for extracting patterns — vanilla TypeScript, Panel class hierarchy, service layer, CSS grid, API edge functions, refresh scheduler, and 60+ data source integrations.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[120],{"categoryNo":121,"categoryName":122,"taxonomyType":123,"taxonomyTypeDesc":124},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[126,127,128,129,88,130,131,132,133,134,79,135,136,137,138,139,140,141,142,143],"reference","worldmonitor","worldmonitor reference","dashboard","css","architecture","extracting","hierarchy","source","layer","panel","patterns","edge functions","integrations","open","api","data","scheduler",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":34},"01M6KKM39PHYK627F19GE2B9XN","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[151,152,153,154,79,155,104,156,157,158,159],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":34},"01M6KKKY7T2P61Y0JH54CDEJKQ","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[167,30,168,169,170,171,86,172,173,174],"directory","structure","verify directory structure","access","first","issues","diagnose","file access"]