본문으로 건너뛰기
Skillpedia
PDF, Word, 슬라이드7.8k · #12872

excel-creation-fallback

하는 일

이 스킬은 openpyxl로 .xlsx 파일을 만드는 방법과, 코드 샌드박스가 실행하지 못할 때 할 일을 설명합니다. 특정 열, 서식, 요약이 있는 스프레드시트가 필요한 사람에게 맞습니다.

사용하는 경우

  • ✓코드 샌드박스에서 openpyxl 가져오기 오류가 날 때.
  • ✓제목 행, 서식, 합계가 있는 스프레드시트가 필요할 때.
  • ✓스프레드시트 저장을 샌드박스에서 여러 번 시도했지만 계속 실패하는 경우.

스킬 링크

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/excel-creation-fallback/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/excel-creation-fallback/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“날짜, 지표, 값 열이 있는 Excel 파일을 만들어 주세요. 제목은 굵게 하고, 합계 행도 넣어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 먼저 샌드박스에서 openpyxl로 파일을 만들려고 합니다. 실패하면 필요한 내용을 명확히 정리해 셸 도우미에 넘기고, 도우미가 라이브러리를 설치하고 파일을 저장합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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_sandbox fails 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:

  1. Be more specific - Include exact column names, data types, and formatting requirements
  2. Provide sample data - Include example rows to clarify expected output
  3. Break it down - For complex files, request creation in stages
  4. Check permissions - Ensure the target directory is writable

Alternative Approaches

If shell_agent is unavailable or unsuitable:

  • Use run_shell with 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
자주 묻는 질문

openpyxl은 무엇인가요?

Excel 파일을 만들고 편집하는 Python 라이브러리입니다.

없는 패키지는 누가 설치하나요?

셸 도우미가 openpyxl 같은 의존성이 없으면 설치할 수 있습니다.

요청에는 무엇을 담아야 하나요?

시트, 열, 예시 행, 서식, 파일을 저장할 위치에 대한 명확한 설명이 필요합니다.

상세 정보

작성자의 원본 설명

Use shell_agent as fallback when execute_code_sandbox fails for Excel file operations

repo: HKUDS/AgentPilot

인기도

GitHub 스타
7.8k
순위
#12872
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬