[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KFXY0R7XVSSNF505HGQF9X":3,"skill-same:01M6KFXY0R7XVSSNF505HGQF9X":70},{"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":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":14,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":47,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"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",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"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":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add xyliu-cs\u002FOpenSpace-GDPval --skill reliable-excel-workbook-creation",{"tool":56,"command":57},"bunx","bunx skills add xyliu-cs\u002FOpenSpace-GDPval --skill reliable-excel-workbook-creation",{"tool":59,"command":60},"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,[64],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},".skill_id","OTHER","其他",46,"https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Freliable-excel-workbook-creation\u002F.skill_id",[71,84,92,107,127,142],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":37},"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",[],[78,79,80,81,82,83],"zip export deliverable","zip","export","deliverables","codebase","as",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":37},"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",[],[91,79,81,82,83],"zip deliverable finalization",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":37},"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",[],[99,100,101,102,103,25,104,105,83,106],"failure analysis","ZeRO","analysis","iteration","zero iteration failure analysis","issues","execution","system",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":37},"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",[],[114,115,33,116,117,118,119,120,121,122,123,124,125,126],"fallback","write","report","write file fallback report","domain","professional","sources","retrieval","generate","embedded","documents","data","knowledge",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":37},"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",[],[134,25,114,135,136,32,124,122,33,137,138,139,115,140,119,141,24],"fallback doc with delegation","doc","delegation","markdown","tool","text","simple","formats",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":37},"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",[],[114,116,149,150,122,33,151,152,115,153,154,121,25,155,124],"context","context anchored fallback report","Guardrails","Tools","task","drift","context drift"]