본문으로 건너뛰기
Skillpedia
에이전트7.8k · #12954

prioritize-reference-files

하는 일

이 스킬은 AI 에이전트가 작업의 참고 파일을 찾아 다른 어떤 일보다 먼저 읽도록 안내합니다. 자신의 파일이 사용되기를 기대하는 사람에게 맞습니다.

사용하는 경우

  • ✓파일을 첨부하고 그 내용이 답변에 쓰이기를 기대할 때.
  • ✓AI가 제 파일에 없는 데이터를 보고할 때.
  • ✓Word, PDF 또는 Excel 파일을 읽다가 오류가 나서 다른 방법을 찾아야 하는 경우.

스킬 링크

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/prioritize-reference-files/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/prioritize-reference-files/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과 PDF를 사용해서 제 질문에 답해 주세요. 어떤 수치도 지어내지 마세요.”

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

작동 방식

에이전트는 첨부 파일을 찾고, 파일 종류마다 맞는 리더를 쓰며, 웹 검색 전에 파일을 읽습니다. 파일 읽기가 실패하면 스킬이 시도할 대체 방법을 나열합니다.

기술 내용 (원본 SKILL.md)

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

Prioritize Reference Files

Purpose

This skill ensures that when reference files are provided in task context, you MUST read and extract data from them FIRST before attempting web searches or generating synthetic data. Ignoring available structured data leads to fabricated outputs and incorrect results.

Core Principle

Reference files in context > Web search > Data fabrication (never)

Workflow

Step 1: Scan Task Context for Reference Files

Before taking any action, identify all files provided in the task context:

  • Look for file attachments, uploads, or references in the task description
  • Common formats: .xlsx, .csv, .json, .pdf, .docx, .txt
  • Check for phrases like "attached", "provided", "reference file", "see file"

Step 2: Read Reference Files First

Use the appropriate tool to read each reference file:

# For Excel files
read_file(filetype="xlsx", file_path="path/to/file.xlsx")

# For CSV files  
read_file(filetype="csv", file_path="path/to/file.csv")

# For PDF files
read_file(filetype="pdf", file_path="path/to/file.pdf")

# For JSON files
read_file(filetype="json", file_path="path/to/file.json")

# For text files
read_file(filetype="txt", file_path="path/to/file.txt")

If read_file fails on .docx files (returns error, empty content, or 'unknown error'):

Fallback Approach 1: Direct zipfile/XML extraction via run_shell

# .docx files are ZIP archives containing XML; extract document.xml directly
unzip -p path/to/file.docx word/document.xml | grep -oP '(?<=<w:t>)[^<]+' | tr '\n' ' '

Or for more complete extraction:

mkdir -p /tmp/docx_extract && cd /tmp/docx_extract && unzip path/to/file.docx && cat word/document.xml

Fallback Approach 2: Use shell_agent for complex extraction If direct extraction fails, delegate to shell_agent:

shell_agent(task="Extract text content from path/to/file.docx using zipfile and XML parsing")

The agent will attempt multiple extraction methods and report results.

Fallback Approach 3: Verify extraction success before proceeding After any extraction method, confirm content was retrieved:

  • Check that output is non-empty and contains expected document structure
  • Look for familiar text from the document (headings, known phrases)
  • If extraction appears incomplete, try an alternative method
  • Document which method succeeded: "Content extracted using [method] after read_file failed"

Important: Never proceed to data fabrication if reference files exist but read_file fails. Always attempt at least one fallback extraction method first.

Step 3: Extract and Validate Data

After reading:

  1. Parse the content to understand the data structure
  2. Identify relevant fields/columns for your task
  3. Verify the data is complete and usable
  4. Note any limitations or missing information

Step 4: Use Reference Data as Primary Source

  • Base all outputs on the reference file data
  • Only supplement with web search if reference data is incomplete
  • NEVER fabricate data when reference files exist
  • If reference data is insufficient, explicitly state what's missing

Step 5: Document Data Source

In your outputs, acknowledge the source:

  • "Data sourced from [filename]"
  • "Based on provided reference file: [filename]"
  • This confirms you used the actual provided data

Anti-Patterns to Avoid

❌ Ignoring reference files and searching the web instead ❌ Fabricating data when structured data is available ❌ Assuming file contents without reading them ❌ Using outdated web data when current reference files exist ❌ Giving up after read_file fails without trying fallback extraction methods

Example

Task Context: "Create a property listings report. See Massabama_active_listings.xlsx for current data."

Correct Approach:

1. Read Massabama_active_listings.xlsx first
2. Extract property addresses, prices, specifications
3. Generate report using actual listing data
4. Note: "Data sourced from Massabama_active_listings.xlsx"

Incorrect Approach:

1. Search web for "Massabama property listings"
2. Fabricate property data from search results
3. Create report with unverified/generated data

Verification Checklist

Before completing any task with reference files:

  • I have identified all reference files in the task context
  • I have read each reference file using appropriate tools
  • I have extracted relevant data from the files
  • My output is ba
자주 묻는 질문

에이전트는 어떤 파일을 먼저 읽을지 어떻게 정하나요?

첨부되었다거나 제공되었다는 표현처럼 작업에 나오는 단어를 찾아 그 파일을 먼저 읽습니다.

Excel 리더가 실패하면 어떻게 되나요?

에이전트는 스크립트처럼 다른 방법으로 파일을 열고 데이터를 읽을 수 있습니다.

이 스킬은 데이터 작업에만 쓰이나요?

아닙니다. 보고서, 분석, 요약처럼 제공된 파일에 의존하는 작업을 대상으로 합니다.

상세 정보

작성자의 원본 설명

Ensures agents read and use provided reference files before searching or fabricating data

repo: HKUDS/AgentPilot

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬