excel-creation-fallback
Fungsinya
Skill ini menjelaskan cara membuat file .xlsx dengan openpyxl, dan apa yang dilakukan ketika sandbox kode tidak bisa menjalankannya. Skill ini cocok untuk orang yang membutuhkan spreadsheet dengan kolom, format, atau ringkasan tertentu.
Kapan dipakai
- ✓Saat sandbox kode gagal dengan galat impor untuk openpyxl.
- ✓Saat saya membutuhkan spreadsheet dengan header, format, dan total.
- ✓Saat percobaan berulang di sandbox untuk menyimpan spreadsheet terus gagal.
Link skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/excel-creation-fallback/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Buatkan saya file Excel dengan kolom tanggal, metrik, dan nilai, header tebal, serta baris total.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
AI pertama-tama mencoba membangun file dengan openpyxl di dalam sandbox. Jika gagal, AI menyerahkan deskripsi yang jelas kepada helper shell, yang dapat memasang pustaka yang dibutuhkan dan menyimpan file.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Excel File Creation Fallback
When execute_code_sandbox fails for openpyxl or Excel operations, delegate to shell_agent which can autonomously handle dependency and environment issues.
When to Use
execute_code_sandboxfails with import errors for openpyxl or related libraries- The sandbox environment lacks required dependencies
- You need to create or modify Excel files with complex requirements
- Repeated sandbox execution failures for file I/O operations
Steps
Step 1: Attempt with execute_code_sandbox first
Try creating the Excel file using Python's openpyxl library in the code sandbox:
from openpyxl import Workbook
wb = Workbook()
ws = wb.active
ws.append(['Column1', 'Column2', 'Column3'])
wb.save('output.xlsx')
Step 2: If it fails, switch to shell_agent
Delegate the task to shell_agent with a clear, comprehensive task description:
Create an Excel file named 'output.xlsx' with the following structure:
- Sheet 1: Data with columns [Date, Metric, Value]
- Include sample data rows with realistic values
- Apply basic formatting (bold headers, cell borders)
- Add a summary section with totals or averages
- Save the file in the current directory
Step 3: Let shell_agent handle the environment
The shell_agent will:
- Decide whether to use Python or Bash
- Install dependencies if needed (e.g.,
pip install openpyxl) - Write and execute the code
- Automatically retry and fix errors (up to several rounds)
- Confirm the file was created successfully
Example Task Descriptions
Basic Excel file:
Create an Excel file named 'sales_report.xlsx' with headers: Date, Product, Quantity, Price, Total. Add 10 sample rows of data and a formula column for Total (Quantity * Price).
Complex Excel with formatting:
Create an Excel file with multiple sheets:
- Sheet 'Summary': Key metrics and totals
- Sheet 'Details': Full transaction data with columns [ID, Date, Customer, Amount, Status]
- Apply conditional formatting to highlight amounts over 1000
- Add borders to all cells and bold headers
Tiered pricing structure:
Create an Excel file with a tiered pricing table:
- Column A: Quantity thresholds (0, 100, 500, 1000)
- Column B: Unit price at each tier
- Column C: Discount percentage (e.g., 15% discount over 1000 units)
- Include a financial summary section with projections
Why This Pattern Works
shell_agent has several advantages over execute_code_sandbox for file creation tasks:
| Feature | execute_code_sandbox | shell_agent |
|---|---|---|
| Dependency installation | Manual/preset only | Autonomous |
| Error recovery | Returns error | Auto-retries and fixes |
| Tool selection | Python only | Python, Bash, or other |
| Filesystem access | Sandbox-limited | Full workspace access |
| Verification | None | Can verify file creation |
Troubleshooting
If shell_agent also struggles:
- Be more specific - Include exact column names, data types, and formatting requirements
- Provide sample data - Include example rows to clarify expected output
- Break it down - For complex files, request creation in stages
- Check permissions - Ensure the target directory is writable
Alternative Approaches
If shell_agent is unavailable or unsuitable:
- Use
run_shellwith explicit commands (if you know the exact syntax) - Check for alternative libraries (xlsxwriter, pandas with openpyxl engine)
- Use CSV as intermediate format, then convert to Excel
Pertanyaan umum
Apa itu openpyxl?
Ini adalah pustaka Python yang membuat dan mengedit file Excel.
Siapa yang memasang paket yang hilang?
Helper shell dapat memasang dependensi seperti openpyxl jika belum ada.
Apa yang sebaiknya ada dalam permintaan?
Deskripsi yang jelas tentang lembar kerja, kolom, contoh baris, format, dan lokasi penyimpanan file.
Detail
Deskripsi asli dari pembuat
Use shell_agent as fallback when execute_code_sandbox fails for Excel file operations
repo: HKUDS/AgentPilot
Popularitas
- Bintang GitHub
- 7.8k
- Peringkat
- #12872
- Lisensi
- MIT
- Diperbarui
- 1/11/2026
Komentar
- …
Skill lain dari repositori ini
agentpilot
7.8kMembantu agent Anda meningkatkan proyek langkah demi langkah dengan menyiapkan tugas dan menjalankan loop AgentPilot yang mengusulkan, menguji, dan memberi skor pada perubahan.
openspace
7.8kMembantu agent Anda menyiapkan OpenSpace, alat yang menyimpan dan mengambil skill agent, lalu menghubungkannya ke aplikasi AI Anda melalui MCP.
rsi-arena
7.8kMembantu agent Anda menyiapkan dan menjalankan tes benchmark AI standar, seperti AIME dan Terminal-Bench, untuk membandingkan berbagai metode perbaikan.
experiment-guide
7.8kMembantu agent Anda merencanakan eksperimen kecil, membaca hasilnya, dan mencatat temuan saat menyelidiki cara memperbaiki sebuah program.
Skill serupa
feishu-doc
394kMembantu agent Anda membaca, membuat, dan mengedit dokumen cloud Feishu, termasuk teks, gambar, dan tabel, dengan memakai alat dokumen.
feishu-drive
394kMemungkinkan agent Anda menelusuri, mengatur, dan memberi komentar pada file di folder cloud Feishu yang sudah dibagikan kepada bot.
feishu-perm
394kMembantu agent Anda memeriksa dan mengubah siapa yang dapat mengakses file Feishu, dengan memilih izin terkecil yang memenuhi permintaan Anda.