prioritize-reference-files
Qué hace
Esta skill guía al agente de IA para que encuentre y lea los archivos de referencia de una tarea antes de hacer cualquier otra cosa. Está pensada para quienes esperan que se usen sus propios archivos.
Cuándo usarla
- ✓Cuando adjuntas archivos y esperas que la IA use su contenido para responder.
- ✓Cuando la IA informa de datos que no aparecen en tus archivos.
- ✓Cuando leer un archivo Word, PDF o Excel da un error y necesitas que la IA encuentre otra forma de leerlo.
Link de la skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/prioritize-reference-files/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Usa el Excel y el PDF que adjunté para responder a mis preguntas, y no inventes ninguna cifra.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente busca los archivos adjuntos, usa el lector adecuado para cada tipo y los lee antes de cualquier búsqueda en la web. Si falla la lectura de un archivo, la skill enumera métodos alternativos para probar.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Cómo decide el agente qué archivos leer primero?
Busca los adjuntos y frases como adjunto o facilitado en la tarea, y lee primero esos archivos.
¿Qué pasa si falla el lector de Excel?
El agente puede usar otro método, como un script, para abrir el archivo y leer sus datos.
¿Esta skill es solo para tareas de datos?
Está pensada para tareas que dependen de archivos facilitados, como informes, análisis y resúmenes.
Detalles
Descripción original del autor
Ensures agents read and use provided reference files before searching or fabricating data
repo: HKUDS/AgentPilot
Popularidad
- Estrellas en GitHub
- 7,8 mil
- Posición en el ranking
- #12954
- Licencia
- MIT
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
agentpilot
7,8 milAyuda a tu agente a mejorar un proyecto paso a paso, preparando una tarea y ejecutando el bucle de AgentPilot que propone, prueba y puntúa cambios.
openspace
7,8 milAyuda a tu agente a configurar OpenSpace, una herramienta que guarda y recupera skills de agentes, y a conectarla a tu app de IA mediante MCP.
rsi-arena
7,8 milAyuda a tu agente a configurar y ejecutar pruebas de referencia de IA conocidas, como AIME y Terminal-Bench, para comparar distintos métodos de mejora.
experiment-guide
7,8 milAyuda a tu agente a planificar experimentos pequeños, leer sus resultados y anotar conclusiones mientras investiga cómo mejorar un programa.
Skills parecidas
add-model-provider
394 milPermite que tu agente conecte un nuevo proveedor de modelos de IA a OpenClaw con comandos de configuración seguros, mantenga las claves API fuera del texto plano y haga una prueba en vivo.
acp-router
394 milAyuda a tu agente a enviar una tarea a un asistente de programación como Claude Code o Cursor a través de OpenClaw, para que el trabajo se ejecute en esa herramienta.
browser-automation
394 milEnseña a tu agente a controlar páginas web paso a paso, incluidos los inicios de sesión, las pestañas y la recuperación cuando una página deja de responder.