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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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:
- Parse the content to understand the data structure
- Identify relevant fields/columns for your task
- Verify the data is complete and usable
- 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.
댓글
- …
이 저장소의 다른 스킬
agentpilot
7.8k작업을 준비하고 AgentPilot 루프를 실행해 변경을 제안, 테스트, 점수화하면서 프로젝트를 단계적으로 개선하도록 돕습니다.
openspace
7.8k에이전트 스킬을 저장하고 가져오는 도구인 OpenSpace를 설정하고, MCP를 통해 AI 앱에 연결하도록 돕습니다.
rsi-arena
7.8kAIME나 Terminal-Bench 같은 표준 AI 벤치마크 테스트를 설정하고 실행해 서로 다른 개선 방법을 비교하도록 돕습니다.
experiment-guide
7.8k프로그램을 개선하는 방법을 조사하면서 작은 실험을 계획하고, 결과를 읽고, 발견 사항을 기록하도록 돕습니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.