[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KJHF9G1035Q1KY5B1XDXYW":3,"skill-same:01M6KJHF9G1035Q1KY5B1XDXYW":64},{"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":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":13,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M6KJHF9G1035Q1KY5B1XDXYW","pdf-verification-cli",null,"Verify PDF page count and content using command-line tools when Python libraries unavailable","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-cli\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31],"PDF","cli","verification","pdf verification cli","pdf verification","python","libraries","content","Tools","verify","page","command","line","command-line","2026-11-10 10:12:30",false,"---\nname: pdf-verification-cli\ndescription: Verify PDF page count and content using command-line tools when Python libraries unavailable\n---\n\n# PDF Verification with Command-Line Tools\n\nWhen verifying PDF files during task execution, Python libraries like PyPDF2 may not be available in the environment. This skill provides a reliable alternative using standard command-line tools from the `poppler-utils` package.\n\n## When to Use This Skill\n\n- Need to verify PDF page count\n- Need to inspect PDF text content\n- PyPDF2 or similar Python PDF libraries are unavailable\n- Working in minimal\u002Fcontainerized environments\n\n## Core Tools\n\n### 1. `pdfinfo` - Extract PDF Metadata\n\nUse `pdfinfo` to get page count and other metadata:\n\n```bash\n# Get full PDF info\npdfinfo document.pdf\n\n# Get only page count\npdfinfo document.pdf | grep Pages\n\n# Extract page count as a number\npdfinfo document.pdf | grep Pages | awk '{print $2}'\n```\n\n**Key metadata fields:**\n- `Pages`: Number of pages in the PDF\n- `Title`: Document title\n- `Author`: Document author\n- `Creator`: Application that created the PDF\n- `Producer`: Application that processed the PDF\n- `CreationDate`: When the PDF was created\n- `ModDate`: Last modification date\n\n### 2. `pdftotext` - Extract Text Content\n\nUse `pdftotext` to inspect the actual content of the PDF:\n\n```bash\n# Extract all text to stdout\npdftotext document.pdf -\n\n# Extract text to a file\npdftotext document.pdf output.txt\n\n# Extract text from specific page range\npdftotext -f 1 -l 3 document.pdf output.txt\n\n# Preserve layout (rough formatting)\npdftotext -layout document.pdf output.txt\n```\n\n## Verification Workflow\n\n### Step 1: Check Tool Availability\n\n```bash\n# Check if tools are installed\nwhich pdfinfo\nwhich pdftotext\n\n# Or test with --help\npdfinfo --help 2>&1 | head -1\n```\n\n### Step 2: Install if Needed\n\n```bash\n# Debian\u002FUbuntu\napt-get update && apt-get install -y poppler-utils\n\n# RHEL\u002FCentOS\u002FFedora\nyum install -y poppler-utils\n# or\ndnf install -y poppler-utils\n\n# macOS (with Homebrew)\nbrew install poppler\n```\n\n### Step 3: Verify PDF Properties\n\n```bash\n# Verify page count matches expected\nEXPECTED_PAGES=4\nACTUAL_PAGES=$(pdfinfo document.pdf | grep Pages | awk '{print $2}')\n\nif [ \"$ACTUAL_PAGES\" -eq \"$EXPECTED_PAGES\" ]; then\n    echo \"✓ Page count verified: $ACTUAL_PAGES pages\"\nelse\n    echo \"✗ Page count mismatch: expected $EXPECTED_PAGES, got $ACTUAL_PAGES\"\nfi\n```\n\n### Step 4: Verify PDF Content\n\n```bash\n# Check for required sections\u002Fcontent\npdftotext document.pdf - | grep -i \"checklist\" && echo \"✓ Contains checklist section\"\npdftotext document.pdf - | grep -i \"references\" && echo \"✓ Contains references section\"\n\n# Count occurrences of key terms\npdftotext document.pdf - | grep -ci \"assessment\"  # Case-insensitive count\n```\n\n## Python Integration Example\n\n```python\nimport subprocess\n\ndef get_pdf_page_count(pdf_path):\n    \"\"\"Get page count using pdfinfo\"\"\"\n    result = subprocess.run(\n        ['pdfinfo', pdf_path],\n        capture_output=True,\n        text=True\n    )\n    for line in result.stdout.split('\\n'):\n        if line.startswith('Pages:'):\n            return int(line.split(':')[1].strip())\n    return None\n\ndef extract_pdf_text(pdf_path):\n    \"\"\"Extract all text from PDF using pdftotext\"\"\"\n    result = subprocess.run(\n        ['pdftotext', pdf_path, '-'],\n        capture_output=True,\n        text=True\n    )\n    return result.stdout\n\ndef verify_pdf(pdf_path, expected_pages, required_terms):\n    \"\"\"Verify PDF has expected page count and contains required terms\"\"\"\n    # Check page count\n    pages = get_pdf_page_count(pdf_path)\n    if pages != expected_pages:\n        return False, f\"Expected {expected_pages} pages, got {pages}\"\n    \n    # Check content\n    text = extract_pdf_text(pdf_path).lower()\n    missing = [term for term in required_terms if term.lower() not in text]\n    \n    if missing:\n        return False, f\"Missing terms: {missing}\"\n    \n    return True, \"PDF verification passed\"\n```\n\n## Common Use Cases\n\n| Task | Command |\n|------|---------|\n| Count pages | `pdfinfo file.pdf \\| grep Pages` |\n| Check if PDF has text | `pdftotext file.pdf - \\| head -5` |\n| Search for keyword | `pdftotext file.pdf - \\| grep -i \"keyword\"` |\n| Extract first page | `pdftotext -f 1 -l 1 file.pdf out.txt` |\n| Get PDF title | `pdfinfo file.pdf \\| grep Title` |\n\n## Troubleshooting\n\n**`pdfinfo: command not found`**\n- Install poppler-utils (see Step 2 above)\n- Ensure PATH includes the installation directory\n\n**`pdftotext` returns empty output**\n- PDF may be image-only (scanned) - requires OCR\n- PDF may be encrypted\u002Fpassword-protected\n- Try `pdftotext -layout` for better text extraction\n\n**Page count seems wrong**\n- Some PDFs have blank pages counted\n- Verify with `pdftotext` to see actual content per page\n\n## Best Practices\n\n1. **Always verify both structure and content** - Page count alone doesn't guarantee content quality\n2. **Use case-insensitive searches** - Content may vary in capitalization\n3. **Handle errors gracefully** - Tools may fail on corrupted or encrypted PDFs\n4. **Combine with file existence checks** - Verify PDF exists before running tools","# PDF Verification with Command-Line Tools\n\nWhen verifying PDF files during task execution, Python libraries like PyPDF2 may not be available in the environment. This skill provides a reliable alternative using standard command-line tools from the `poppler-utils` package.\n\n## When to Use This Skill\n\n- Need to verify PDF page count\n- Need to inspect PDF text content\n- PyPDF2 or similar Python PDF libraries are unavailable\n- Working in minimal\u002Fcontainerized environments\n\n## Core Tools\n\n### 1. `pdfinfo` - Extract PDF Metadata\n\nUse `pdfinfo` to get page count and other metadata:\n\n```bash\n# Get full PDF info\npdfinfo document.pdf\n\n# Get only page count\npdfinfo document.pdf | grep Pages\n\n# Extract page count as a number\npdfinfo document.pdf | grep Pages | awk '{print $2}'\n```\n\n**Key metadata fields:**\n- `Pages`: Number of pages in the PDF\n- `Title`: Document title\n- `Author`: Document author\n- `Creator`: Application that created the PDF\n- `Producer`: Application that processed the PDF\n- `CreationDate`: When the PDF was created\n- `ModDate`: Last modification date\n\n### 2. `pdftotext` - Extract Text Content\n\nUse `pdftotext` to inspect the actual content of the PDF:\n\n```bash\n# Extract all text to stdout\npdftotext document.pdf -\n\n# Extract text to a file\npdftotext document.pdf output.txt\n\n# Extract text from specific page range\npdftotext -f 1 -l 3 document.pdf output.txt\n\n# Preserve layout (rough formatting)\npdftotext -layout document.pdf output.txt\n```\n\n## Verification Workflow\n\n### Step 1: Check Tool Availability\n\n```bash\n# Check if tools are installed\nwhich pdfinfo\nwhich pdftotext\n\n# Or test with --help\npdfinfo --help 2>&1 | head -1\n```\n\n### Step 2: Install if Needed\n\n```bash\n# Debian\u002FUbuntu\napt-get update && apt-get install -y poppler-utils\n\n# RHEL\u002FCentOS\u002FFedora\nyum install -y poppler-utils\n# or\ndnf install -y poppler-utils\n\n# macOS (with Homebrew)\nbrew install poppler\n```\n\n### Step 3: Verify PDF Properties\n\n```bash\n# Verify page count matches expected\nEXPECTED_PAGES=4\nACTUAL_PAGES=$(pdfinfo document.pdf | grep Pages | awk '{print $2}')\n\nif [ \"$ACTUAL_PAGES\" -eq \"$EXPECTED_PAGES\" ]; then\n    echo \"✓ Page count verified: $ACTUAL_PAGES pages\"\nelse\n    echo \"✗ Page count mismatch: expected $EXPECTED_PAGES, got $ACTUAL_PAGES\"\nfi\n```\n\n### Step 4: Verify PDF Content\n\n```bash\n# Check for required sections\u002Fcontent\npdftotext document.pdf - | grep -i \"checklist\" && echo \"✓ Contains checklist section\"\npdftotext document.pdf - | grep -i \"references\" && echo \"✓ Contains references section\"\n\n# Count occurrences of key terms\npdftotext document.pdf - | grep -ci \"assessment\"  # Case-insensitive count\n```\n\n## Python Integration Example\n\n```python\nimport subprocess\n\ndef get_pdf_page_count(pdf_path):\n    \"\"\"Get page count using pdfinfo\"\"\"\n    result = subprocess.run(\n        ['pdfinfo', pdf_path],\n        capture_output=True,\n        text=True\n    )\n    for line in result.stdout.split('\\n'):\n        if line.startswith('Pages:'):\n            return int(line.split(':')[1].strip())\n    return None\n\ndef extract_pdf_text(pdf_path):\n    \"\"\"Extract all text from PDF using pdftotext\"\"\"\n    result = subprocess.run(\n        ['pdftotext', pdf_path, '-'],\n        capture_output=True,\n        text=True\n    )\n    return result.stdout\n\ndef verify_pdf(pdf_path, expected_pages, required_terms):\n    \"\"\"Verify PDF has expected page count and contains required terms\"\"\"\n    # Check page count\n    pages = get_pdf_page_count(pdf_path)\n    if pages != expected_pages:\n        return False, f\"Expected {expected_pages} pages, got {pages}\"\n    \n    # Check content\n    text = extract_pdf_text(pdf_path).lower()\n    missing = [term for term in required_terms if term.lower() not in text]\n    \n    if missing:\n        return False, f\"Missing terms: {missing}\"\n    \n    return True, \"PDF verification passed\"\n```\n\n## Common Use Cases\n\n| Task | Command |\n|------|---------|\n| Count pages | `pdfinfo file.pdf \\| grep Pages` |\n| Check if PDF has text | `pdftotext file.pdf - \\| head -5` |\n| Search for keyword | `pdftotext file.pdf - \\| grep -i \"keyword\"` |\n| Extract first page | `pdftotext -f 1 -l 1 file.pdf out.txt` |\n| Get PDF title | `pdfinfo file.pdf \\| grep Title` |\n\n## Troubleshooting\n\n**`pdfinfo: command not found`**\n- Install poppler-utils (see Step 2 above)\n- Ensure PATH includes the installation directory\n\n**`pdftotext` returns empty output**\n- PDF may be image-only (scanned) - requires OCR\n- PDF may be encrypted\u002Fpassword-protected\n- Try `pdftotext -layout` for better text extraction\n\n**Page count seems wrong**\n- Some PDFs have blank pages counted\n- Verify with `pdftotext` to see actual content per page\n\n## Best Practices\n\n1. **Always verify both structure and content** - Page count alone doesn't guarantee content quality\n2. **Use case-insensitive searches** - Content may vary in capitalization\n3. **Handle errors gracefully** - Tools may fail on corrupted or encrypted PDFs\n4. **Combine with file existence checks** - Verify PDF exists before running tools",{"name":5,"description":7},"main","ff671ef61ed6587c49bd54c81cdc751c0b99e363","gdpval_bench\u002Fskills\u002Fpdf-verification-cli","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":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add AG064\u002FOpenSpace --skill pdf-verification-cli",{"tool":50,"command":51},"bunx","bunx skills add AG064\u002FOpenSpace --skill pdf-verification-cli",{"tool":53,"command":54},"pnpm","pnpm dlx skills add AG064\u002FOpenSpace --skill pdf-verification-cli","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-verification-cli\u002FSKILL.md",true,[58],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},".skill_id","OTHER","其他",34,"https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-verification-cli\u002F.skill_id",[65,88,104,113,138,154],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":32},"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",[],[72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,23,87],"write special chars ts check","check","write","filters","Existing","type-checking","for","errors","script","output","type","files","only","template","file","typescript",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":32},"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",[],[95,96,74,85,97,98,86,23,99,20,100,101,102,78,80,103],"readback","write special chars readback","cleanup","read","scripts","via","post","helper","with",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":32},"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",[],[74,111,23,78,100,85,112,86,80],"write special chars heredoc","shell",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":32},"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,121,122,123,87,124,125,126,127,128,78,129,130,131,132,133,134,135,136,137],"reference","worldmonitor","worldmonitor reference","dashboard","css","architecture","extracting","hierarchy","source","layer","panel","patterns","edge functions","integrations","open","api","data","scheduler",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":32},"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",[],[145,146,147,148,78,149,103,150,151,152,153],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":32},"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",[],[161,27,162,163,164,165,86,166,167,168],"directory","structure","verify directory structure","access","first","issues","diagnose","file access"]