prioritize-reference-files-6e4111

prioritize-reference-files-6e4111 is a skill for Claude Code, Codex from HKUDS/OpenSpace. It costs 27 tokens per session (1,011 once invoked), scanned A, original, MIT.

A rule for reading supplied reference files before searching online or inventing information. It covers files such as spreadsheets, CSV files, PDFs, Word documents, JSON, and text files.

In plain words
What is it for?
It is for identifying relevant files and extracting their contents before answering a task.
Why use it?
It keeps the work tied to the provided source material and reduces incorrect or fabricated data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is unzip -o ../document.docx.

Good fit It is for identifying relevant files and extracting their contents before answering a task.

Compare 6 skills from other repositories ↓
About the project

OpenSpace is a skill-management layer for AI agents that stores, retrieves, evaluates, shares, and improves reusable workflows. It is intended for people using multiple coding agents who want skills to be reused and refined based on task outcomes. The catalogue provides 200 skills for use with OpenSpace and the agents it supports.

HKUDS/OpenSpace · 7,534 stars · on GitHub

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/HKUDS/OpenSpace
agentmods
npx agentmods add skills/hkuds/openspace/prioritize-reference-files-6e4111

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prioritize-reference-files-6e4111

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/openspace/prioritize-reference-files-6e4111.svg)](https://agentmods.dev/skills/hkuds/openspace/prioritize-reference-files-6e4111)
Your own site
<a href="https://agentmods.dev/skills/hkuds/openspace/prioritize-reference-files-6e4111"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/prioritize-reference-files-6e4111.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,011 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.01011
Opus 5 $0.00014 $0.00505
Sonnet 5 $0.00005 $0.00202
Haiku 4.5 $0.00003 $0.00101

Measured 4d ago against content hash f21fff7fb229, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

prioritize-reference-files-6e4111 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

benchmarks/gdpval/skills/prioritize-reference-files-6e4111/SKILL.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on 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

Read the full file on GitHub · 121 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 121 lines · 27 tokens per session scan A f21fff7fb229

Subscribe to this mod's changes

prioritize-reference-files-6e4111 is a skill published in the GitHub repository HKUDS/OpenSpace (7,534 stars, last pushed 26d ago), licensed MIT. It adds 27 tokens to every session and 1,011 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.