[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KFXY0R7XVSSNF505HGQF9X":3,"skill-same:01M6KFXY0R7XVSSNF505HGQF9X":75},{"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":23,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":14,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M6KFXY0R7XVSSNF505HGQF9X","reliable-excel-workbook-creation",null,"Use run_shell with cd and heredoc syntax for complex Excel operations when read_file fails on XLSX or execute_code_sandbox fails on multi-step workbook creation","xyliu-cs\u002FOpenSpace-GDPval","xyliu-cs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F89236536?v=4","01M6KF8Z1V4TXS86CKSH48BY8T","xy","01M6KF8Z67443W0SHXM85JEF0B",0,"MIT","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Freliable-excel-workbook-creation\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000004","电子表格","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"reliable excel workbook creation","workbook","creation","xlsx","operations","for","with","multi","cd","use","execute","read","syntax","shell","file","code","run","sandbox","2026-11-10 10:12:30",false,"---\nname: reliable-excel-workbook-creation\ndescription: Use run_shell with cd and heredoc syntax for complex Excel operations when read_file fails on XLSX or execute_code_sandbox fails on multi-step workbook creation\n---\n\n# Reliable Excel Workbook Creation via Shell\n\n## When to Use This Pattern\n\nUse this technique when you need to:\n- Create complex Excel workbooks with multiple sheets\n- Perform multi-step workbook operations (create, populate, format, save)\n- Work with XLSX files that `read_file` cannot handle properly\n- Avoid failures from `execute_code_sandbox` on persistent file operations\n\n**Avoid:** `read_file` for XLSX files, `execute_code_sandbox` for multi-step workbook creation\n\n## Core Pattern\n\n```bash\ncd \u002Fworkspace && python3 \u003C\u003C 'EOF'\nfrom openpyxl import Workbook\n# Your Excel operations here\nwb = Workbook()\n# ... create sheets, add data, save\nwb.save('\u002Fworkspace\u002Ffilename.xlsx')\nEOF\n```\n\n## Step-by-Step Instructions\n\n### Step 1: Change to Workspace Directory\nAlways start with `cd \u002Fworkspace &&` to ensure file paths resolve correctly.\n\n### Step 2: Use Heredoc with Single-Quoted EOF\nUse `\u003C\u003C 'EOF'` (single quotes) to prevent shell variable expansion within the Python code.\n\n### Step 3: Write Complete Python Script\nInclude all imports, workbook creation, data population, and save operations in one script.\n\n### Step 4: Use Absolute Paths for Save Operations\nAlways save with full path: `\u002Fworkspace\u002Fyour_filename.xlsx`\n\n## Complete Example\n\n```bash\ncd \u002Fworkspace && python3 \u003C\u003C 'EOF'\nfrom openpyxl import Workbook\nfrom openpyxl.styles import Font, Alignment, PatternFill\n\n# Create workbook\nwb = Workbook()\n\n# Create multiple sheets\nsheets = ['Summary', 'Data', 'Analysis', 'Settings']\nfor sheet_name in sheets:\n    wb.create_sheet(title=sheet_name)\n\n# Remove default sheet if needed\nif 'Sheet' in wb.sheetnames:\n    del wb['Sheet']\n\n# Populate data\nws = wb['Data']\nws['A1'] = 'Item'\nws['B1'] = 'Value'\nws['A2'] = 'Revenue'\nws['B2'] = 100000\n\n# Apply formatting\nheader_font = Font(bold=True)\nfor cell in ws['1:1']:\n    cell.font = header_font\n\n# Save workbook\nwb.save('\u002Fworkspace\u002Freport.xlsx')\nprint('Workbook created successfully: \u002Fworkspace\u002Freport.xlsx')\nEOF\n```\n\n## Why This Works\n\n| Approach | Problem | Solution |\n|----------|---------|----------|\n| `read_file` | Cannot parse XLSX binary format | Don't use for Excel files |\n| `execute_code_sandbox` | File persistence issues, multi-step failures | Use `run_shell` instead |\n| `run_shell` with heredoc | ✓ Reliable, full control, persistent files | **Use this pattern** |\n\n## Common Operations\n\n### Create Multi-Sheet Workbook\n```bash\ncd \u002Fworkspace && python3 \u003C\u003C 'EOF'\nfrom openpyxl import Workbook\nwb = Workbook()\nsheet_names = ['Sheet1', 'Sheet2', 'Sheet3']\nfor name in sheet_names:\n    wb.create_sheet(title=name)\nwb.save('\u002Fworkspace\u002Fmulti_sheet.xlsx')\nEOF\n```\n\n### Read and Modify Existing Workbook\n```bash\ncd \u002Fworkspace && python3 \u003C\u003C 'EOF'\nfrom openpyxl import load_workbook\nwb = load_workbook('\u002Fworkspace\u002Fexisting.xlsx')\nws = wb.active\nws['A1'] = 'Updated Value'\nwb.save('\u002Fworkspace\u002Fexisting.xlsx')\nEOF\n```\n\n### Add Formulas\n```bash\ncd \u002Fworkspace && python3 \u003C\u003C 'EOF'\nfrom openpyxl import Workbook\nwb = Workbook()\nws = wb.active\nws['A1'] = 100\nws['A2'] = 200\nws['A3'] = '=SUM(A1:A2)'\nwb.save('\u002Fworkspace\u002Fwith_formulas.xlsx')\nEOF\n```\n\n## Troubleshooting\n\n- **File not found**: Ensure you use `\u002Fworkspace\u002F` prefix in all paths\n- **Permission errors**: Verify workspace directory is writable\n- **Module not found**: openpyxl is pre-installed in the environment\n- **Heredoc issues**: Use single-quoted `'EOF'` to prevent shell interpretation\n\n## Best Practices\n\n1. **Always use absolute paths** (`\u002Fworkspace\u002Ffilename.xlsx`)\n2. **Single-quoted heredoc** (`\u003C\u003C 'EOF'`) prevents variable expansion\n3. **Complete script in one heredoc** - avoid splitting operations\n4. **Print confirmation** after save to verify success\n5. **Handle exceptions** for production scripts","# Reliable Excel Workbook Creation via Shell\n\n## When to Use This Pattern\n\nUse this technique when you need to:\n- Create complex Excel workbooks with multiple sheets\n- Perform multi-step workbook operations (create, populate, format, save)\n- Work with XLSX files that `read_file` cannot handle properly\n- Avoid failures from `execute_code_sandbox` on persistent file operations\n\n**Avoid:** `read_file` for XLSX files, `execute_code_sandbox` for multi-step workbook creation\n\n## Core Pattern\n\n```bash\ncd \u002Fworkspace && python3 \u003C\u003C 'EOF'\nfrom openpyxl import Workbook\n# Your Excel operations here\nwb = Workbook()\n# ... create sheets, add data, save\nwb.save('\u002Fworkspace\u002Ffilename.xlsx')\nEOF\n```\n\n## Step-by-Step Instructions\n\n### Step 1: Change to Workspace Directory\nAlways start with `cd \u002Fworkspace &&` to ensure file paths resolve correctly.\n\n### Step 2: Use Heredoc with Single-Quoted EOF\nUse `\u003C\u003C 'EOF'` (single quotes) to prevent shell variable expansion within the Python code.\n\n### Step 3: Write Complete Python Script\nInclude all imports, workbook creation, data population, and save operations in one script.\n\n### Step 4: Use Absolute Paths for Save Operations\nAlways save with full path: `\u002Fworkspace\u002Fyour_filename.xlsx`\n\n## Complete Example\n\n```bash\ncd \u002Fworkspace && python3 \u003C\u003C 'EOF'\nfrom openpyxl import Workbook\nfrom openpyxl.styles import Font, Alignment, PatternFill\n\n# Create workbook\nwb = Workbook()\n\n# Create multiple sheets\nsheets = ['Summary', 'Data', 'Analysis', 'Settings']\nfor sheet_name in sheets:\n    wb.create_sheet(title=sheet_name)\n\n# Remove default sheet if needed\nif 'Sheet' in wb.sheetnames:\n    del wb['Sheet']\n\n# Populate data\nws = wb['Data']\nws['A1'] = 'Item'\nws['B1'] = 'Value'\nws['A2'] = 'Revenue'\nws['B2'] = 100000\n\n# Apply formatting\nheader_font = Font(bold=True)\nfor cell in ws['1:1']:\n    cell.font = header_font\n\n# Save workbook\nwb.save('\u002Fworkspace\u002Freport.xlsx')\nprint('Workbook created successfully: \u002Fworkspace\u002Freport.xlsx')\nEOF\n```\n\n## Why This Works\n\n| Approach | Problem | Solution |\n|----------|---------|----------|\n| `read_file` | Cannot parse XLSX binary format | Don't use for Excel files |\n| `execute_code_sandbox` | File persistence issues, multi-step failures | Use `run_shell` instead |\n| `run_shell` with heredoc | ✓ Reliable, full control, persistent files | **Use this pattern** |\n\n## Common Operations\n\n### Create Multi-Sheet Workbook\n```bash\ncd \u002Fworkspace && python3 \u003C\u003C 'EOF'\nfrom openpyxl import Workbook\nwb = Workbook()\nsheet_names = ['Sheet1', 'Sheet2', 'Sheet3']\nfor name in sheet_names:\n    wb.create_sheet(title=name)\nwb.save('\u002Fworkspace\u002Fmulti_sheet.xlsx')\nEOF\n```\n\n### Read and Modify Existing Workbook\n```bash\ncd \u002Fworkspace && python3 \u003C\u003C 'EOF'\nfrom openpyxl import load_workbook\nwb = load_workbook('\u002Fworkspace\u002Fexisting.xlsx')\nws = wb.active\nws['A1'] = 'Updated Value'\nwb.save('\u002Fworkspace\u002Fexisting.xlsx')\nEOF\n```\n\n### Add Formulas\n```bash\ncd \u002Fworkspace && python3 \u003C\u003C 'EOF'\nfrom openpyxl import Workbook\nwb = Workbook()\nws = wb.active\nws['A1'] = 100\nws['A2'] = 200\nws['A3'] = '=SUM(A1:A2)'\nwb.save('\u002Fworkspace\u002Fwith_formulas.xlsx')\nEOF\n```\n\n## Troubleshooting\n\n- **File not found**: Ensure you use `\u002Fworkspace\u002F` prefix in all paths\n- **Permission errors**: Verify workspace directory is writable\n- **Module not found**: openpyxl is pre-installed in the environment\n- **Heredoc issues**: Use single-quoted `'EOF'` to prevent shell interpretation\n\n## Best Practices\n\n1. **Always use absolute paths** (`\u002Fworkspace\u002Ffilename.xlsx`)\n2. **Single-quoted heredoc** (`\u003C\u003C 'EOF'`) prevents variable expansion\n3. **Complete script in one heredoc** - avoid splitting operations\n4. **Print confirmation** after save to verify success\n5. **Handle exceptions** for production scripts",{"name":5,"description":7},"main","af1b40a42167d09c30b3a63000aa14ace4c1e229","gdpval_bench\u002Fskills\u002Freliable-excel-workbook-creation","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval","https:\u002F\u002Fgithub.com\u002Fxyliu-cs","https:\u002F\u002Fxyliu-cs.github.io","PhD Student in CS, CUHK-Shenzhen.","2026-04-06 20:32:15",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add xyliu-cs\u002FOpenSpace-GDPval --skill reliable-excel-workbook-creation",{"tool":61,"command":62},"bunx","bunx skills add xyliu-cs\u002FOpenSpace-GDPval --skill reliable-excel-workbook-creation",{"tool":64,"command":65},"pnpm","pnpm dlx skills add xyliu-cs\u002FOpenSpace-GDPval --skill reliable-excel-workbook-creation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Freliable-excel-workbook-creation\u002FSKILL.md",true,[69],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},".skill_id","OTHER","其他",46,"https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Freliable-excel-workbook-creation\u002F.skill_id",[76,89,97,112,137,155],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":42},"01M6KG8MF1S664SWBDENYRSCK8","zip-export-deliverable","Ensures codebase deliverables are properly exported as ZIP archives through a dedicated finalization step","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzip-export-deliverable\u002FSKILL.md",[],[83,84,85,86,87,88],"zip export deliverable","zip","export","deliverables","codebase","as",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":42},"01M6KG8GAZWHHEK7VNJDW0ME21","zip-deliverable-finalization","Ensure codebase deliverables are properly packaged as ZIP exports in a dedicated final step","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzip-deliverable-finalization\u002FSKILL.md",[],[96,84,86,87,88],"zip deliverable finalization",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":42},"01M6KG8CMQQ1PYMNTSRZ9VS1MD","zero-iteration-failure-analysis","Identify and handle agent failures with 0 iterations as pre-execution system issues","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzero-iteration-failure-analysis\u002FSKILL.md",[],[104,105,106,107,108,30,109,110,88,111],"failure analysis","ZeRO","analysis","iteration","zero iteration failure analysis","issues","execution","system",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":123,"publishedAt":42},"01M6KG86W3PA07FT9W58YHHERM","write-file-fallback-report","Generate professional documents using write_file when primary data sources fail, leveraging embedded domain knowledge instead of external retrieval","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report\u002FSKILL.md",[118],{"categoryNo":119,"categoryName":120,"taxonomyType":121,"taxonomyTypeDesc":122},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[124,125,38,126,127,128,129,130,131,132,133,134,135,136],"fallback","write","report","write file fallback report","domain","professional","sources","retrieval","generate","embedded","documents","data","knowledge",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":146,"publishedAt":42},"01M6KG82GAEY3GG77CMGCK1C2T","fallback-doc-with-delegation","Generate professional documents after tool failures using shell_agent for complex formats or write_file for simple text\u002Fmarkdown","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report-enhanced\u002FSKILL.md",[143],{"categoryNo":144,"categoryName":145,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[147,30,124,148,149,37,134,132,38,150,151,152,125,153,129,154,29],"fallback doc with delegation","doc","delegation","markdown","tool","text","simple","formats",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":162,"publishedAt":42},"01M6KG7WT7GX5NYCGEFHW22NV7","context-anchored-fallback-report","Generate documents with write_file when retrieval tools fail, with explicit guardrails against task context drift","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report-enhanced-4bc5c2\u002FSKILL.md",[161],{"categoryNo":119,"categoryName":120,"taxonomyType":121,"taxonomyTypeDesc":122},[124,126,163,164,132,38,165,166,125,167,168,131,30,169,134],"context","context anchored fallback report","Guardrails","Tools","task","drift","context drift"]