[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBSZRSZB5GW6N683CZQPAC":3,"skill-same:01M6XBSZRSZB5GW6N683CZQPAC":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":29,"linkOnly":30,"markdownContent":31,"markdownBody":32,"frontMatter":33,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":13,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":39,"install":40,"resources":53},"01M6XBSZRSZB5GW6N683CZQPAC","pdf-verification-check-112b09",null,"Verify generated PDF files using PyPDF2 to check page counts and integrity","UF-gzj\u002Fopenspace-claude-evolution","UF-gzj","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272393507?v=4","01M6XBCZB755P01VVYGQWPYZY3","01M6XBCZFJA5AREA17WGETA3FW",0,"MIT","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-verification-check-112b09\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28],"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","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Fpdf-verification-check-112b09","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution","https:\u002F\u002Fgithub.com\u002FUF-gzj","2026-04-16 09:31:03",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-verification-check-112b09",{"tool":46,"command":47},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-verification-check-112b09",{"tool":49,"command":50},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-verification-check-112b09","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-verification-check-112b09\u002FSKILL.md",true,[54],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},".skill_id","OTHER","其他",43,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-verification-check-112b09\u002F.skill_id",[61,84,100,109,134,150],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":29},"01M6XCCXD3NCM2YKR3WNGBASPC","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\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[20,68,69,70,71,72,73,74,75,76,77,78,79,28,80,81,82,83],"write","write special chars ts check","typescript","filters","characters","Existing","type-checking","for","errors","script","output","type","only","template","file","python",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":29},"01M6XCCT7E3J922Q345PBGSHPN","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\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[91,92,68,82,93,83,94,95,96,97,98,81,19,99,72,75,77],"readback","write special chars readback","helper","post","via","scripts","cleanup","read","with",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":29},"01M6XCCMQX1R8B6FECWB3P63T7","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\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[107,68,72,108,77,95,81,82,83,75],"write special chars heredoc","shell",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":29},"01M6XCCG41M994JJEX6VN52PEP","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\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[],[116,117,118,119,120,70,121,122,123,124,125,75,126,127,128,129,130,131,132,133],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":29},"01M6XCCCHWNKG2W4VH9E6A10HF","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[141,142,143,144,75,145,99,146,147,148,149],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":156,"publishedAt":29},"01M6XCC7X8PKMR2DEW91XGHYSV","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[157,158,159,25,160,161,82,162,163,164],"directory","verify directory structure","structure","access","first","issues","diagnose","file access"]