file-reading

file-reading is a skill for Claude Code, Codex from asgeirtj/system_prompts_leaks. It costs 154 tokens per session (3,375 once invoked), scanned A, original, CC0-1.0.

A guide for reading uploaded files from disk using the right method for each file type. It covers formats such as PDFs, spreadsheets, CSV files, documents, images, archives, and ebooks.

In plain words
What is it for?
Use it to identify a file, inspect its size and format, extract only the needed content, and route it to a format-specific reading method.
Why use it?
It prevents treating binary files as plain text or loading large files in ways that waste time and context.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to identify a file, inspect its size and format, extract only the needed content, and route it to a format-specific reading method.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/asgeirtj/system_prompts_leaks/file-reading
About the project

System Prompts Leaks is a collection of captured system instructions used to guide AI chatbots and coding agents before they receive user messages. It serves researchers and developers studying how different AI assistants are directed.

asgeirtj/system_prompts_leaks · 73,683 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add asgeirtj/system_prompts_leaks --skill file-reading
Clone the repo
git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks

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 file-reading

README.md
[![agentmods](https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/file-reading/github.svg)](https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/file-reading)
Your own site
<a href="https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/file-reading"><img src="https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/file-reading/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for file-reading

Your own site · 80×15
<a href="https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/file-reading"><img src="https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/file-reading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 154 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,375 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.
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.00154 $0.03375
Opus 5.5 $0.00062 $0.01350
Sonnet 5.5 $0.00031 $0.00675
Haiku 4.5 $0.00015 $0.00337

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

Security

Grade A, and why

file-reading 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 11d 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.

Anthropic/claude-code/skills/file-reading/SKILL.md · 373 lines

How it starts

The opening of the file, as written. The whole thing — 373 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Reading Uploaded Files

Why this skill exists

When a user uploads a file in claude.ai, Claude Desktop, or Cowork, the file is written to /mnt/user-data/uploads/<filename> and you are told the path in an <uploaded_files> block. The content is not in your context. You must go read it.

The naive thing — cat /mnt/user-data/uploads/whatever — is wrong for most files:

  • On a PDF it prints binary garbage.
  • On a 100MB CSV it floods your context with rows you will never use.
  • On a DOCX it prints the raw ZIP bytes.
  • On an image it does nothing useful at all.

This skill tells you the right first move for each type, and when to hand off to a deeper skill.

General protocol

  1. Look at the extension. That is your dispatch key.
  2. Stat before you read. Large files need sampling, not slurping.
    stat -c '%s bytes, %y' /mnt/user-data/uploads/report.pdf
    file /mnt/user-data/uploads/report.pdf
    
  3. Read just enough to answer the user's question. If they asked "how many rows are in this CSV", don't load the whole thing into pandas — wc -l gives a fast approximation (it counts newlines, not CSV records, so it may over-count if quoted fields contain embedded newlines).
  4. If a dedicated skill exists, go read it. The table below tells you when. The dedicated skills cover editing, creating, and advanced operations that this skill does not.

extract-text

For docx, odt, epub, xlsx, pptx, rtf, and ipynb the first move is extract-text <file>. It emits markdown for docx/odt/epub (headings, bold, lists, links, tables), tab-separated rows under ## Sheet: headers for xlsx, text under ## Slide N headers for pptx, fenced code cells for ipynb, and plain text for rtf. Pass --format <fmt> when the extension is wrong or absent (e.g., --format xlsx on an .xlsm). If it errors on a file, pandoc <file> -t plain is a fallback; for xlsx/pptx, fall back to the dedicated skill's Python-based approach (openpyxl / python-pptx).

Read the full file on GitHub · 373 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. 11d ago First seen · 373 lines · 154 tokens per session scan A db3637355be6

Subscribe to this mod's changes

file-reading is a skill published in the GitHub repository asgeirtj/system_prompts_leaks (73,683 stars, last pushed yesterday), licensed CC0-1.0. It adds 154 tokens to every session and 3,375 once invoked, about $0.0006 per session on Opus 5.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-11-19.

Related

file-reading compared with skills from other repositories

file-reading next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
file-readingasgeirtj/system_prompts_leaksSkill74kyesterdayCC0-1.0A154Claude Code, Codex
dcf-modelNousResearch/hermes-agentSkill267ktodayMITA14Claude Code, Codex
comps-analysisNousResearch/hermes-agentSkill267ktodayMITA13Claude Code, Codex
lbo-modelNousResearch/hermes-agentSkill267ktodayMITA19Claude Code, Codex
siyuanNousResearch/hermes-agentSkill267ktodayMITA17Claude Code, Codex
3-statement-modelNousResearch/hermes-agentSkill267ktodayMITA18Claude Code, Codex
boxNousResearch/hermes-agentSkill267ktodayMITA14Claude Code, Codex