[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KJJKNGV0V78Z2SQMJ2YZ99":3,"skill-same:01M6KJJKNGV0V78Z2SQMJ2YZ99":58},{"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":17,"publishedAt":26,"linkOnly":27,"markdownContent":28,"markdownBody":29,"frontMatter":30,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":13,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M6KJJKNGV0V78Z2SQMJ2YZ99","pdf-verification",null,"Verify PDF page counts and file integrity programmatically using PyPDF2 after generation","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\u002FSKILL.md",[],[18,19,20,21,22,23,24,25],"PDF","verification","pdf verification","file","integrity","verify","page","generation","2026-11-10 10:12:30",false,"---\nname: pdf-verification\ndescription: Verify PDF page counts and file integrity programmatically using PyPDF2 after generation\n---\n\n# PDF Verification Skill\n\n## Purpose\n\nAfter generating PDF files, always verify page counts and file integrity programmatically before declaring task completion. This catches formatting issues, empty pages, and corrupted files early.\n\n## When to Use\n\n- After any PDF generation task\n- When specific page counts are required\n- Before marking a PDF-related task as complete\n\n## Verification Steps\n\n### 1. Install PyPDF2 (if needed)\n\n```bash\npip install PyPDF2\n```\n\n### 2. Verify Page Count and Integrity\n\nUse `run_shell` to execute a Python verification script:\n\n```bash\npython -c \"\nfrom PyPDF2 import PdfReader\nimport sys\n\ndef verify_pdf(filepath, expected_pages=None):\n    try:\n        reader = PdfReader(filepath)\n        actual_pages = len(reader.pages)\n        print(f'✓ {filepath}: {actual_pages} pages')\n        \n        if expected_pages and actual_pages != expected_pages:\n            print(f'✗ Page count mismatch: expected {expected_pages}, got {actual_pages}')\n            return False\n        \n        # Check file is not empty\u002Fcorrupted\n        if actual_pages == 0:\n            print(f'✗ Empty PDF: {filepath}')\n            return False\n        \n        return True\n    except Exception as e:\n        print(f'✗ Error reading {filepath}: {e}')\n        return False\n\n# Verify each PDF\nresults = []\nresults.append(verify_pdf('output.pdf', expected_pages=2))\nprint(f'All checks passed: {all(results)}')\nsys.exit(0 if all(results) else 1)\n\"\n```\n\n### 3. Verify Multiple PDFs\n\nFor tasks with multiple PDFs, verify each one:\n\n```bash\npython -c \"\nfrom PyPDF2 import PdfReader\n\npdfs = {\n    'listings.pdf': 2,\n    'map.pdf': 1,\n    'summary.pdf': 1\n}\n\nall_passed = True\nfor filepath, expected in pdfs.items():\n    try:\n        reader = PdfReader(filepath)\n        actual = len(reader.pages)\n        status = '✓' if actual == expected else '✗'\n        print(f'{status} {filepath}: {actual}\u002F{expected} pages')\n        if actual != expected:\n            all_passed = False\n    except Exception as e:\n        print(f'✗ {filepath}: {e}')\n        all_passed = False\n\nprint(f'Verification: {\\\"PASSED\\\" if all_passed else \\\"FAILED\\\"}')\n\"\n```\n\n### 4. Check File Size (Optional)\n\nAdd file size validation to catch empty or near-empty files:\n\n```bash\npython -c \"\nimport os\nfrom PyPDF2 import PdfReader\n\nfilepath = 'output.pdf'\nmin_size = 1000  # minimum bytes\n\nfile_size = os.path.getsize(filepath)\nif file_size \u003C min_size:\n    print(f'✗ File too small: {file_size} bytes')\nelse:\n    reader = PdfReader(filepath)\n    print(f'✓ {filepath}: {len(reader.pages)} pages, {file_size} bytes')\n\"\n```\n\n## Best Practices\n\n1. **Verify immediately after generation** - Don't wait until the end of the task\n2. **Check all required PDFs** - Verify each file meets specifications\n3. **Fail fast** - If verification fails, regenerate before proceeding\n4. **Log results** - Print verification results for debugging\n5. **Set reasonable minimums** - Use file size checks to catch empty outputs\n\n## Common Issues Caught\n\n- Wrong page counts (extra blank pages, missing content)\n- Corrupted or unreadable PDF files\n- Empty PDFs (0 pages)\n- Files that appear generated but contain no actual content\n\n## Example Task Completion Check\n\n```bash\n# Final verification before marking task complete\npython -c \"\nfrom PyPDF2 import PdfReader\nimport sys\n\nrequired = {'listings.pdf': 2, 'map.pdf': 1}\npassed = True\n\nfor f, pages in required.items():\n    try:\n        actual = len(PdfReader(f).pages)\n        if actual != pages:\n            print(f'FAIL: {f} has {actual} pages, expected {pages}')\n            passed = False\n    except Exception as e:\n        print(f'FAIL: Cannot read {f}: {e}')\n        passed = False\n\nif passed:\n    print('SUCCESS: All PDFs verified')\n    sys.exit(0)\nelse:\n    sys.exit(1)\n\"\n```","# PDF Verification Skill\n\n## Purpose\n\nAfter generating PDF files, always verify page counts and file integrity programmatically before declaring task completion. This catches formatting issues, empty pages, and corrupted files early.\n\n## When to Use\n\n- After any PDF generation task\n- When specific page counts are required\n- Before marking a PDF-related task as complete\n\n## Verification Steps\n\n### 1. Install PyPDF2 (if needed)\n\n```bash\npip install PyPDF2\n```\n\n### 2. Verify Page Count and Integrity\n\nUse `run_shell` to execute a Python verification script:\n\n```bash\npython -c \"\nfrom PyPDF2 import PdfReader\nimport sys\n\ndef verify_pdf(filepath, expected_pages=None):\n    try:\n        reader = PdfReader(filepath)\n        actual_pages = len(reader.pages)\n        print(f'✓ {filepath}: {actual_pages} pages')\n        \n        if expected_pages and actual_pages != expected_pages:\n            print(f'✗ Page count mismatch: expected {expected_pages}, got {actual_pages}')\n            return False\n        \n        # Check file is not empty\u002Fcorrupted\n        if actual_pages == 0:\n            print(f'✗ Empty PDF: {filepath}')\n            return False\n        \n        return True\n    except Exception as e:\n        print(f'✗ Error reading {filepath}: {e}')\n        return False\n\n# Verify each PDF\nresults = []\nresults.append(verify_pdf('output.pdf', expected_pages=2))\nprint(f'All checks passed: {all(results)}')\nsys.exit(0 if all(results) else 1)\n\"\n```\n\n### 3. Verify Multiple PDFs\n\nFor tasks with multiple PDFs, verify each one:\n\n```bash\npython -c \"\nfrom PyPDF2 import PdfReader\n\npdfs = {\n    'listings.pdf': 2,\n    'map.pdf': 1,\n    'summary.pdf': 1\n}\n\nall_passed = True\nfor filepath, expected in pdfs.items():\n    try:\n        reader = PdfReader(filepath)\n        actual = len(reader.pages)\n        status = '✓' if actual == expected else '✗'\n        print(f'{status} {filepath}: {actual}\u002F{expected} pages')\n        if actual != expected:\n            all_passed = False\n    except Exception as e:\n        print(f'✗ {filepath}: {e}')\n        all_passed = False\n\nprint(f'Verification: {\\\"PASSED\\\" if all_passed else \\\"FAILED\\\"}')\n\"\n```\n\n### 4. Check File Size (Optional)\n\nAdd file size validation to catch empty or near-empty files:\n\n```bash\npython -c \"\nimport os\nfrom PyPDF2 import PdfReader\n\nfilepath = 'output.pdf'\nmin_size = 1000  # minimum bytes\n\nfile_size = os.path.getsize(filepath)\nif file_size \u003C min_size:\n    print(f'✗ File too small: {file_size} bytes')\nelse:\n    reader = PdfReader(filepath)\n    print(f'✓ {filepath}: {len(reader.pages)} pages, {file_size} bytes')\n\"\n```\n\n## Best Practices\n\n1. **Verify immediately after generation** - Don't wait until the end of the task\n2. **Check all required PDFs** - Verify each file meets specifications\n3. **Fail fast** - If verification fails, regenerate before proceeding\n4. **Log results** - Print verification results for debugging\n5. **Set reasonable minimums** - Use file size checks to catch empty outputs\n\n## Common Issues Caught\n\n- Wrong page counts (extra blank pages, missing content)\n- Corrupted or unreadable PDF files\n- Empty PDFs (0 pages)\n- Files that appear generated but contain no actual content\n\n## Example Task Completion Check\n\n```bash\n# Final verification before marking task complete\npython -c \"\nfrom PyPDF2 import PdfReader\nimport sys\n\nrequired = {'listings.pdf': 2, 'map.pdf': 1}\npassed = True\n\nfor f, pages in required.items():\n    try:\n        actual = len(PdfReader(f).pages)\n        if actual != pages:\n            print(f'FAIL: {f} has {actual} pages, expected {pages}')\n            passed = False\n    except Exception as e:\n        print(f'FAIL: Cannot read {f}: {e}')\n        passed = False\n\nif passed:\n    print('SUCCESS: All PDFs verified')\n    sys.exit(0)\nelse:\n    sys.exit(1)\n\"\n```",{"name":5,"description":7},"main","ff671ef61ed6587c49bd54c81cdc751c0b99e363","gdpval_bench\u002Fskills\u002Fpdf-verification","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 about 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":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add AG064\u002FOpenSpace --skill pdf-verification",{"tool":44,"command":45},"bunx","bunx skills add AG064\u002FOpenSpace --skill pdf-verification",{"tool":47,"command":48},"pnpm","pnpm dlx skills add AG064\u002FOpenSpace --skill pdf-verification","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-verification\u002FSKILL.md",true,[52],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},".skill_id","OTHER","其他",30,"https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-verification\u002F.skill_id",[59,82,98,107,132,148],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":26},"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",[],[66,67,68,69,70,71,72,73,74,75,76,77,78,79,21,80,81],"write special chars ts check","check","write","filters","Existing","type-checking","for","errors","script","output","type","files","only","template","python","typescript",{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":26},"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",[],[89,90,68,79,91,92,21,80,93,19,94,95,96,72,74,97],"readback","write special chars readback","cleanup","read","scripts","via","post","helper","with",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":26},"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",[],[68,105,80,72,94,79,106,21,74],"write special chars heredoc","shell",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":26},"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",[],[114,115,116,117,81,118,119,120,121,122,72,123,124,125,126,127,128,129,130,131],"reference","worldmonitor","worldmonitor reference","dashboard","css","architecture","extracting","hierarchy","source","layer","panel","patterns","edge functions","integrations","open","api","data","scheduler",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":26},"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",[],[139,140,141,142,72,143,97,144,145,146,147],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":26},"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",[],[155,23,156,157,158,159,21,160,161,162],"directory","structure","verify directory structure","access","first","issues","diagnose","file access"]