[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HWRC6A6637QMNQVKV102T0":3,"skill-same:01M6HWRC6A6637QMNQVKV102T0":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M6HWRC6A6637QMNQVKV102T0","pdf-verification-cli",null,"Verify PDF page count and content using command-line tools when Python libraries unavailable","HKUDS\u002FAgentPilot","HKUDS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F118165258?v=4","01M6HW8VRNZP64G0P4MVJW2KKQ","✨Data Intelligence Lab@HKU✨","01M6HW8VWZVHBRHYH3T330PFWV",8029,"MIT","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fbenchmarks\u002Fgdpval\u002Fskills\u002Fpdf-verification-cli\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31],"PDF","cli","verification","pdf verification cli","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","6b84b0689ca0d9e7b1e4061188ff6b60758e0f8a","openspace\u002Fbenchmarks\u002Fgdpval\u002Fskills\u002Fpdf-verification-cli",944,"https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot","https:\u002F\u002Fgithub.com\u002FHKUDS","https:\u002F\u002Fsites.google.com\u002Fview\u002Fchaoh","2026-11-12 22:26:39",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add HKUDS\u002FAgentPilot --skill pdf-verification-cli",{"tool":51,"command":52},"bunx","bunx skills add HKUDS\u002FAgentPilot --skill pdf-verification-cli",{"tool":54,"command":55},"pnpm","pnpm dlx skills add HKUDS\u002FAgentPilot --skill pdf-verification-cli","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fbenchmarks\u002Fgdpval\u002Fskills\u002Fpdf-verification-cli\u002FSKILL.md",true,[59],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},".skill_id","OTHER","其他",34,"https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fbenchmarks\u002Fgdpval\u002Fskills\u002Fpdf-verification-cli\u002F.skill_id",[66,86,105,124,147,169],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":32},"01M6HYB297NDABRERJRVG0K8R0","agentpilot","Set up AgentPilot and use its single entry to prepare missing inputs and run configured RSI experiments. Use when the user requests AgentPilot installation or work with AgentPilot.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fplugins\u002Fagentpilot\u002Fskills\u002Fagentpilot\u002FSKILL.md",[],[68,73,74,75,76,77,78,79,80,81,82,83,84,85],"prepare","requests","with","missing","installation","rsi","up","use","user","work","SET","run","experiments",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":32},"01M6HYAYWXTTE1J7DJM0MFNQ4H","remember","Review auto-memory entries and propose promotions to OPENSPACE.md, OPENSPACE.local.md, or retained auto-memory topics; detect duplicates, stale facts, conflicts, and ambiguous entries before making changes.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fopenspace\u002Fskills\u002Fremember\u002FSKILL.md",[],[88,93,94,95,96,97,98,99,100,101,102,103,104],"memory","review","auto","openspace","changes","facts","detect","entries","local","conflicts","stale","duplicates",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":32},"01M6HYAVMPM4SBDV60R2B5HPV8","skill-discovery","Search reusable OpenSpace skills locally, and browse cloud packages step by step when a cloud skill may help. Reusing proven skills saves tokens, improves reliability, and extends your capabilities beyond built-in tools.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fopenspace\u002Fhost_skills\u002Fskill-discovery\u002FSKILL.md",[],[112,113,114,96,115,116,117,118,119,120,121,122,123,26],"skill discovery","discovery","reusable","step by step","tokens","packages","help","cloud","reliability","capabilities","browse","search",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":32},"01M6HYAR811B3RB0M50RBEDGN6","delegate-task","Delegate tasks to OpenSpace — a full-stack autonomous worker for coding, DevOps, web research, and desktop automation, backed by an extensive MCP tool and skill library. Skills auto-improve through use, reducing token consumption over time. A cloud community lets agents share and collectively evolve reusable skills.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fopenspace\u002Fhost_skills\u002Fdelegate-task\u002FSKILL.md",[],[131,132,133,96,134,135,136,137,138,114,95,80,139,140,141,142,143,144,145,146],"delegate","task","delegate task","time","improve","desktop automation","worker","community","autonomous","tool","stack","for","share","tasks","automation","MCP",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":32},"01M6HYAM9FSGV6E52AYENDQXYH","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\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[154,155,156,157,158,159,160,161,162,23,163,164,165,166,142,167,168],"write special chars ts check","write","check","type","files","filters","only","template","file","typescript","output","Existing","type-checking","errors","script",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":32},"01M6HYAH05HGV7SVWSVR8PJRQD","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\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[176,177,155,75,142,168,178,179,180,181,182,161,162,21,183,23],"write special chars readback","readback","helper","post","via","scripts","read","cleanup"]