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

prioritize-reference-files-6e4111

하는 일

이 스킬은 작업에 있는 모든 참고 파일을 먼저 읽고, 다른 출처보다 그 파일을 우선하라고 AI에게 안내합니다. 문서를 주고 그 문서를 바탕으로 작업하게 하는 사람에게 맞습니다.

사용하는 경우

  • ✓스프레드시트, PDF 또는 Word 파일을 올리고 그 내용을 바탕으로 작업하기를 원할 때.
  • ✓AI가 웹을 검색하기 전에 내 파일을 읽지 않고 검색하려 할 때.
  • ✓Word 파일이 열리지 않아 다른 방법으로 읽어야 하는 경우.

스킬 링크

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

AI에게 요청하는 예시

“제가 올린 Massabama 매물 파일을 읽고, 검색 결과가 아니라 그 파일을 바탕으로 요약을 만들어 주세요.”

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

작동 방식

에이전트는 작업에 첨부된 파일을 찾아 웹 검색 전에 각각 읽습니다. Word 파일을 읽지 못하면 파일 압축을 풀고 안의 텍스트를 읽습니다.

기술 내용 (원본 SKILL.md)

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

Prioritize Reference Files

This skill ensures agents correctly prioritize provided reference files over external data sources, preventing the use of fabricated or incorrect information when structured data is already available.

Core Principle

When reference files are provided in task context, you MUST read and prioritize them for data before attempting web searches or generating synthetic data.

Step-by-Step Instructions

Step 1: Scan Task Context for Files

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

  • Look for file attachments, uploads, or references
  • Check for common data formats: .xlsx, .csv, .json, .pdf, .docx, .txt
  • Note the file names and their apparent purpose

Step 2: Read Reference Files First

Read all relevant reference files before any web searches:

# Example: Read provided Excel file
file_content = read_file(file_path="Massabama active listings.xlsx", filetype="xlsx")

# Example: Read provided CSV
file_content = read_file(file_path="data.csv", filetype="csv")

# Example: Read provided PDF
file_content = read_file(file_path="report.pdf", filetype="pdf")

Important: Handling DOCX Read Failures

If read_file(filetype='docx') fails with an error (common issue), use this fallback method:

# Method 1: Unzip and parse XML directly (docx is a zip archive)
mkdir -p temp_docx && cd temp_docx
unzip -o ../document.docx
# Extract text from word/document.xml
cat word/document.xml | grep -oP '(?<=>)[^<>]+' > extracted_text.txt
# Method 2: Use python-docx via shell
run_shell(command="python -c \"from docx import Document; doc = Document('document.docx'); print('\n'.join([p.text for p in doc.paragraphs]))\"")
# Method 3: Use shell_agent for robust extraction
extraction_result = shell_agent(task="Extract all text content from document.docx using any reliable method (unzip+XML, python-docx, or pandoc)")

After extracting via fallback:

  1. Verify the extracted content is complete and readable
  2. Proceed to use this extracted data as your reference file content
  3. Continue with Step 3 (Extract and Validate Data) using the fallback-extracted content

Step 3: Extract and Validate Data

  • Extract structured data from the reference files
  • Verify the data is complete and relevant to your task
  • Map the file data to your required output format

Step 4: Use Reference Data as Primary Source

  • Populate outputs using data from reference files
  • Cite the reference files when using their data
  • Only mark data as "to be verified" if reference files are incomplete

Step 5: Search Web Only When Necessary

Web searches should only occur when:

  • Reference files do not contain the needed information
  • You need to verify or supplement reference file data
  • The task explicitly requires current/external information
# Decision flow example
if has_reference_file("listings.xlsx"):
    data = extract_from_excel("listings.xlsx")
    # Use this data for output
else:
    # Only then search web
    data = search_web("property listings")

Anti-Patterns to Avoid

❌ DO NOT ignore provided files and search the web first ❌ DO NOT fabricate data when reference files exist ❌ DO NOT assume reference files are irrelevant without reading them ❌ DO NOT create placeholder/synthetic data before checking available files

Checklist

Before completing any data-dependent task:

  • I have identified all files provided in the task context
  • I have read all relevant reference files
  • I have extracted available data from reference files
  • I am using reference file data as my primary source
  • Web searches are only for gaps not covered by reference files
  • I have cited reference files in my output where applicable

Example Application

Task: Create property listings PDF from provided data

Correct Approach:

  1. Find Massabama active listings.xlsx in task context
  2. Read the Excel file to extract property addresses, prices, details
  3. Use this real data to populate the PDF
  4. Only search web if verifying map locations or supplementing missing fields

Incorrect Approach:

  1. Ignore the Excel file
  2. Search web for "Massabama properties"
  3. Fabricate placeholder property data
  4. Create PDF with synthetic/fabricated information
자주 묻는 질문

Word 파일이 열리지 않으면 에이전트는 무엇을 하나요?

스킬은 Word 파일의 압축을 풀고 XML 텍스트를 직접 읽는 예비 방법을 제공합니다.

제가 파일을 줬을 때 에이전트는 웹을 검색해야 하나요?

스킬은 파일을 먼저 읽고, 필요한 데이터가 파일에 없을 때만 검색하라고 말합니다.

이 스킬은 어떤 파일 형식을 다루나요?

xlsx, csv, json, pdf, docx, txt 파일을 읽어야 할 참고 파일로 언급합니다.

상세 정보

작성자의 원본 설명

Always read and use provided reference files for data before attempting external searches or fabricating information

repo: HKUDS/AgentPilot

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬