[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KFJC9VGXKWR2WZZCQMDAEX":3,"skill-same:01M6KFJC9VGXKWR2WZZCQMDAEX":77},{"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":30,"publishedAt":50,"linkOnly":51,"markdownContent":52,"markdownBody":53,"frontMatter":54,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":62,"install":63,"resources":76},"01M6KFJC9VGXKWR2WZZCQMDAEX","run2_document-text-extraction",null,"Extract text from PDF, PPTX, and DOCX files for content classification, with error handling and fallback strategies.","cxcscmu\u002FSkillLearnBench","cxcscmu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142838272?v=4","01M6KCQDFQWPDSN0MKZY96MSQP","01M6KCQDM7G70TKJ28NTSQC0RZ",92,"MIT","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fb2-self-feedback-claude-opus-4-6\u002Forganize-messy-files\u002Frun2_document-text-extraction\u002FSKILL.md",[17,22,25],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"run2 document text extraction","document text extraction","extraction","text","document","files","content classification","for","with","error","strategies","fallback","docx","extract","classification","content","error handling","pptx","PDF","2026-11-10 10:12:30",false,"---\nname: run2_document-text-extraction\ndescription: Extract text from PDF, PPTX, and DOCX files for content classification, with error handling and fallback strategies.\n---\n\n# Document Text Extraction (Improved)\n\n## Libraries\n- `PyPDF2` for PDF text extraction\n- `python-pptx` for PowerPoint text extraction\n- `python-docx` for Word document text extraction\n\n## Installation\n```bash\npip3 install PyPDF2 python-pptx python-docx --break-system-packages\n```\n\n## Key Lessons from Round 1\n1. **Read enough pages**: 3 pages is usually sufficient for classification, but some papers have long introductions. Consider reading more pages for borderline cases.\n2. **Error handling**: Always wrap extraction in try\u002Fexcept - some files may be corrupted.\n3. **Empty text handling**: PyPDF2 may return empty strings for scanned PDFs. Have a fallback plan.\n\n## PDF Extraction\n```python\nimport PyPDF2\n\ndef extract_pdf_text(filepath, max_pages=3):\n    \"\"\"Extract text from first few pages of a PDF.\"\"\"\n    try:\n        with open(filepath, 'rb') as f:\n            reader = PyPDF2.PdfReader(f)\n            text = \"\"\n            for page in reader.pages[:max_pages]:\n                text += page.extract_text() or \"\"\n        return text\n    except Exception:\n        return \"\"\n```\n\n## PPTX Extraction\n```python\nfrom pptx import Presentation\n\ndef extract_pptx_text(filepath):\n    \"\"\"Extract all text from slides including shapes and tables.\"\"\"\n    try:\n        prs = Presentation(filepath)\n        text = \"\"\n        for slide in prs.slides:\n            for shape in slide.shapes:\n                if hasattr(shape, \"text\"):\n                    text += shape.text + \"\\n\"\n                # Also check tables\n                if shape.has_table:\n                    for row in shape.table.rows:\n                        for cell in row.cells:\n                            text += cell.text + \" \"\n        return text\n    except Exception:\n        return \"\"\n```\n\n## DOCX Extraction\n```python\nfrom docx import Document\n\ndef extract_docx_text(filepath):\n    \"\"\"Extract text from all paragraphs in a Word document.\"\"\"\n    try:\n        doc = Document(filepath)\n        return \"\\n\".join([p.text for p in doc.paragraphs])\n    except Exception:\n        return \"\"\n```\n","# Document Text Extraction (Improved)\n\n## Libraries\n- `PyPDF2` for PDF text extraction\n- `python-pptx` for PowerPoint text extraction\n- `python-docx` for Word document text extraction\n\n## Installation\n```bash\npip3 install PyPDF2 python-pptx python-docx --break-system-packages\n```\n\n## Key Lessons from Round 1\n1. **Read enough pages**: 3 pages is usually sufficient for classification, but some papers have long introductions. Consider reading more pages for borderline cases.\n2. **Error handling**: Always wrap extraction in try\u002Fexcept - some files may be corrupted.\n3. **Empty text handling**: PyPDF2 may return empty strings for scanned PDFs. Have a fallback plan.\n\n## PDF Extraction\n```python\nimport PyPDF2\n\ndef extract_pdf_text(filepath, max_pages=3):\n    \"\"\"Extract text from first few pages of a PDF.\"\"\"\n    try:\n        with open(filepath, 'rb') as f:\n            reader = PyPDF2.PdfReader(f)\n            text = \"\"\n            for page in reader.pages[:max_pages]:\n                text += page.extract_text() or \"\"\n        return text\n    except Exception:\n        return \"\"\n```\n\n## PPTX Extraction\n```python\nfrom pptx import Presentation\n\ndef extract_pptx_text(filepath):\n    \"\"\"Extract all text from slides including shapes and tables.\"\"\"\n    try:\n        prs = Presentation(filepath)\n        text = \"\"\n        for slide in prs.slides:\n            for shape in slide.shapes:\n                if hasattr(shape, \"text\"):\n                    text += shape.text + \"\\n\"\n                # Also check tables\n                if shape.has_table:\n                    for row in shape.table.rows:\n                        for cell in row.cells:\n                            text += cell.text + \" \"\n        return text\n    except Exception:\n        return \"\"\n```\n\n## DOCX Extraction\n```python\nfrom docx import Document\n\ndef extract_docx_text(filepath):\n    \"\"\"Extract text from all paragraphs in a Word document.\"\"\"\n    try:\n        doc = Document(filepath)\n        return \"\\n\".join([p.text for p in doc.paragraphs])\n    except Exception:\n        return \"\"\n```\n",{"name":5,"description":7},"main","726e1f79b96b0cb3d729d0e55a1c847e0b5353ae","skills\u002Fb2-self-feedback-claude-opus-4-6\u002Forganize-messy-files\u002Frun2_document-text-extraction",7,"https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench","https:\u002F\u002Fcxcscmu.github.io\u002FSkillLearnBench","https:\u002F\u002Fgithub.com\u002Fcxcscmu","2026-10-02 22:55:36",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add cxcscmu\u002FSkillLearnBench --skill run2_document-text-extraction",{"tool":69,"command":70},"bunx","bunx skills add cxcscmu\u002FSkillLearnBench --skill run2_document-text-extraction",{"tool":72,"command":73},"pnpm","pnpm dlx skills add cxcscmu\u002FSkillLearnBench --skill run2_document-text-extraction","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fb2-self-feedback-claude-opus-4-6\u002Forganize-messy-files\u002Frun2_document-text-extraction\u002FSKILL.md",true,[],[78,94,118,136,156,168],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":87,"publishedAt":50},"01M6KM5KH175P5ABP5JMX2SBDQ","object_counter","Count occurrences of an object in the image using computer vision algorithm.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Fvideo-object-counting\u002Fobject_counter\u002FSKILL.md",[84],{"categoryNo":85,"categoryName":86,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000016","图像与多媒体",[88,89,90,91,92,93],"object counter","object","vision","computer","Computer Vision","image",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":103,"publishedAt":50},"01M6KM51TMVXG79MMPCS6Y8G86","travel-planning-workflow","Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftravel-planning\u002Ftravel-planning-workflow\u002FSKILL.md",[100],{"categoryNo":101,"categoryName":102,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[104,105,106,107,108,109,110,111,112,38,113,114,115,116,117],"workflow","planning","planning workflow","travel","travel planning","travel planning workflow","structured","performing","plan","user","it","requirements","essential","itineraries",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":50},"01M6KM4DY820XHS9YTSK5QP5HD","bundled-dataset-search-tool","invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftravel-planning\u002Fbundled-dataset-search-tool\u002FSKILL.md",[],[125,126,127,128,129,130,131,107,132,133,108,134,38,135,105],"search","tool","dataset","bundled dataset search tool","restaurants","Tools","up","look","flights","you","database",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":50},"01M6KM465BB9PQ0B548HQSVAWZ","glm-output","Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final \u002Froot\u002Fmetrics.json.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-output\u002FSKILL.md",[],[143,144,145,38,146,147,148,149,150,151,152,153,134,154,155],"glm output","output","glm","tasks","metrics","json","basics","guidance","matching","verifier","processing","root","calibration",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":163,"publishedAt":50},"01M6KM40KY3QWDW5W97S39R2BC","glm-calibration","Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-calibration\u002FSKILL.md",[162],{"categoryNo":101,"categoryName":102,"taxonomyType":20,"taxonomyTypeDesc":21},[164,155,145,144,150,149,146,165,166,38,167],"glm calibration","setup","companion","metric",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":50},"01M6KM3VHHVSGMGHJQB3PPT6YG","glm-basics","A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-basics\u002FSKILL.md",[],[175,145,149,176,164,155,38,144,177,36,178,179,180,181,146],"glm basics","inspect","relevant","good","use","how","Evaluation"]