본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트7.8k · #12974

resilient-spreadsheet-workflow

하는 일

이 스킬은 샌드박스가 오류를 낼 때 스프레드시트 작업을 위한 신중한 작업 흐름을 AI 에이전트에게 줍니다. CSV나 Excel 파일을 정리하거나 요약해야 하는 사람에게 맞습니다.

사용하는 경우

  • ✓CSV나 Excel 파일을 작업하는 중 코드 샌드박스가 알 수 없는 오류를 낼 때.
  • ✓폴더에 어떤 스프레드시트 파일이 있고 크기가 얼마인지 알아야 할 때.
  • ✓다음 단계로 넘어가기 전에 스프레드시트 작업의 각 단계를 확인하고 싶은 경우.

스킬 링크

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

AI에게 요청하는 예시

“폴더에서 스프레드시트를 찾아서 판매 CSV를 정리하고 요약을 저장해 주세요. 각 단계를 진행하면서 확인해 주세요.”

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

작동 방식

에이전트는 먼저 도우미를 써서 스프레드시트 파일과 크기를 나열합니다. 그다음 처리 스크립트를 파일로 쓰고 실행하며, 다음 단계로 넘어가기 전에 각 단계의 출력을 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Resilient Spreadsheet Workflow

This skill provides a robust workflow for processing spreadsheet files (CSV, XLSX) when execute_code_sandbox encounters failures. It uses a combination of tools to ensure reliable execution and clear error diagnosis.

When to Use

  • Processing spreadsheet files when execute_code_sandbox returns unknown errors
  • Need to debug why spreadsheet operations fail
  • Require reliable file I/O with verification at each step

Step-by-Step Workflow

Step 1: Initial Exploration with shell_agent

Start by using shell_agent to explore the file structure and understand what files exist:

Use shell_agent to:
- List files in the working directory
- Identify spreadsheet files (CSV, XLSX)
- Examine file sizes and basic structure

Example task for shell_agent:

Explore the current directory to find all spreadsheet files (CSV, XLSX). 
List their sizes and identify which files need processing.

Step 2: Write Processing Script with write_file

Create a standalone script file rather than executing inline code:

# Use write_file to create a script like "process_sheet.py"
content = """
import pandas as pd
import sys

try:
    df = pd.read_csv('input.csv')  # or pd.read_excel for XLSX
    # Perform your processing
    result = df.describe()
    result.to_csv('output.csv', index=False)
    print("Processing complete")
except Exception as e:
    print(f"Error: {e}", file=sys.stderr)
    sys.exit(1)
"""

write_file(path="process_sheet.py", content=content)

Step 3: Execute with run_shell and Error Redirection

Execute the script with stderr redirected to stdout for complete error capture:

run_shell command="python process_sheet.py 2>&1"

The 2>&1 redirection ensures both stdout and stderr are captured together, making error messages visible.

Step 4: Isolate Errors with Verification Commands

If Step 3 fails, add targeted verification commands to diagnose the actual problem:

# Check if Python is available
run_shell command="which python 2>&1"

# Check if pandas is installed
run_shell command="python -c 'import pandas' 2>&1"

# Verify input file exists and is readable
run_shell command="ls -la input.csv 2>&1"

# Check file encoding/content
run_shell command="file input.csv 2>&1"
run_shell command="head -5 input.csv 2>&1"

Step 5: Verify Output Before Reading

Before reading results with read_file, verify the output file exists:

list_dir(path=".")
# Confirm output file appears in the listing
# Then proceed to read_file

Complete Example

1. shell_agent(task="Find and describe all CSV/XLSX files in current directory")
2. write_file(path="analyze_data.py", content="<processing script>")
3. run_shell(command="python analyze_data.py 2>&1")
4. If error: run_shell(command="python -c 'import pandas; print(pandas.__version__)' 2>&1")
5. list_dir(path=".")  # Verify output exists
6. read_file(filetype="csv", file_path="output.csv")

Common Error Patterns

Symptom Diagnostic Command Likely Cause
Module not found python -c 'import pandas' Missing dependency
File not found ls -la <filename> Wrong path or name
Permission denied ls -la <filename> File permissions
Encoding error file <filename> Wrong file format

Best Practices

  1. Always use 2>&1 with run_shell for shell commands to capture full error output
  2. Verify before reading - use list_dir to confirm file existence before read_file
  3. Break into small steps - separate exploration, script writing, execution, and verification
  4. Use shell_agent for unknowns - when directory structure or file types are unclear
  5. Write scripts to files - more reliable than inline code execution for complex operations
자주 묻는 질문

첫 단계는 무엇을 하나요?

작업 폴더의 스프레드시트 파일을 나열하고, 크기와 구조를 기록합니다.

인라인 코드 대신 스크립트 파일을 쓰는 이유는 무엇인가요?

저장된 스크립트는 다시 실행하고 고치기 쉬우며, 샌드박스 실패도 피할 수 있습니다.

CSV와 Excel을 모두 다루나요?

네, 스킬은 CSV와 XLSX 파일을 다루며 각각의 읽기 방법을 보여 줍니다.

상세 정보

작성자의 원본 설명

Resilient multi-step workflow for spreadsheet processing when execute_code_sandbox fails, using shell_agent exploration, file-based scripts, and verification steps

repo: HKUDS/AgentPilot

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬