[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBTGDN4RQGHQ2ADNE391PS":3,"skill-same:01M6XBTGDN4RQGHQ2ADNE391PS":62},{"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":22,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":13,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":41,"install":42,"resources":55},"01M6XBTGDN4RQGHQ2ADNE391PS","pdf-verification",null,"Verify PDF page counts and file integrity programmatically using PyPDF2 after generation","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\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",[23,24,25,26,27,28,29,30],"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","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Fpdf-verification","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":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-verification",{"tool":48,"command":49},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-verification",{"tool":51,"command":52},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-verification","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-verification\u002FSKILL.md",true,[56],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},".skill_id","OTHER","其他",30,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-verification\u002F.skill_id",[63,87,103,112,142,158],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":31},"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",[],[70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,26,86],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","for","errors","script","output","type","files","only","template","python",{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":31},"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",[],[94,95,71,26,96,86,97,98,99,100,101,85,24,102,75,78,80],"readback","write special chars readback","helper","post","via","scripts","cleanup","read","with",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":31},"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",[],[110,71,75,111,80,98,85,26,86,78],"write special chars heredoc","shell",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":123,"publishedAt":31},"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",[118],{"categoryNo":119,"categoryName":120,"taxonomyType":121,"taxonomyTypeDesc":122},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[124,125,126,127,128,73,129,130,131,132,133,78,134,135,136,137,138,139,140,141],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":31},"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",[],[149,150,151,152,78,153,102,154,155,156,157],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":31},"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",[],[165,166,167,28,168,169,26,170,171,172],"directory","verify directory structure","structure","access","first","issues","diagnose","file access"]