file-reading
Skill114 starsChanged 8 months agoMITView on GitHub
Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.
6 other projects use a version of this, 5 of them edited.
Adopted by
Most recently taken up by
- cheatcode-ai/cheatcodeedited, first seen Jul 31, 2026
- adrianotomasoni/skillstheir own version, first seen Jun 28, 2026
- keirsalterego/jailbreak-fableedited, first seen Jun 12, 2026
- Wide-Moat/open-computer-useedited, first seen Jun 10, 2026
- cubexteam/claude-sandbox-envedited, first seen Apr 25, 2026
- Aerex0/claude-skillsedited, first seen Apr 20, 2026
Used with
Projects with it also use doc-coauthoring, internal-comms and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JetBrainsSkilldoc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
Also in 4 projects that use this
GoogleSkillinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
Also in 4 projects that use this
JetBrainsSkillcanvas-design
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Also in 4 projects that use this
AnthropicSkillweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
Also in 3 projects that use this
GoogleSkillalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Also in 3 projects that use this
MicrosoftSkillmcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Also in 4 projects that use this
- +2 more from JetBrains
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 5
- Wide-Moat/open-computer-use★ 12586% same
- keirsalterego/jailbreak-fable★ 43100% same
- cheatcode-ai/cheatcode★ 1870% same
- Aerex0/claude-skills★ 386% same
- cubexteam/claude-sandbox-env★ 186% same
Wrote their own version · 1
- adrianotomasoni/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- browseSkill
- chatgpt-searchSkill
- commitSkill
- debugSkill
- docxSkill
- frontend-designSkill
- pdf-readingSkill
- pdfSkill
- pptxSkill
- product-self-knowledgeSkill
- review-prSkill
- simplifySkill
- skill-creatorSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
6 rules. 3 are common, 0 are distinctive, and 3 are very specific to this project.
3
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
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 …
- Very specific: line 36
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 …
- Common: line 103
Read it if you need any of those.
- Common: line 273
If the user wants one file from inside, extract just that one:
- Very specific: line 308
If you see Unknown input format rtf, convert via LibreOffice using the sandbox-safe wrapper — see /mnt/skills/public/docx/SKILL.md for …
- Common: line 317
Check the size first:
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- Look at the extension. That is your dispatch key.
- 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 - 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 -lgives a fast approximation (it counts newlines, not CSV records, so it may over-count if quoted fields contain embedded newlines). - 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.
Dispatch table
| Extension | First move | Dedicated skill |
.pdf | Content inventory (see PDF section) | /mnt/skills/public/pdf-reading/SKILL.md |
.docx | pandoc to markdown | /mnt/skills/public/docx/SKILL.md |
.doc (legacy) | Convert to .docx first — pandoc cannot read it | /mnt/skills/public/docx/SKILL.md |
.xlsx, .xlsm | openpyxl sheet names + head | /mnt/skills/public/xlsx/SKILL.md |
.xls (legacy) | pd.read_excel(engine="xlrd") — openpyxl rejects it | /mnt/skills/public/xlsx/SKILL.md |
.ods | pd.read_excel(engine="odf") — openpyxl rejects it | /mnt/skills/public/xlsx/SKILL.md |
.pptx | python-pptx slide count | /mnt/skills/public/pptx/SKILL.md |
.ppt (legacy) | Convert to .pptx first — python-pptx rejects it | /mnt/skills/public/pptx/SKILL.md |
.csv, .tsv | pandas with nrows | — (below) |
.json, .jsonl | jq for structure | — (below) |
.jpg, .png, .gif, .webp | Already in your context as vision input | — (below) |
.zip, .tar, .tar.gz | List contents, do not auto-extract | — (below) |
.gz (single file) | zcat | head — no manifest to list | — (below) |
.epub, .odt | pandoc to plain text | — (below) |
.rtf | pandoc (needs 3.1.7+) or soffice via docx skill | — (below) |
.txt, .md, .log, code files | wc -c then head or full cat | — (below) |
| Unknown | file then decide | — |
Never cat a PDF — it prints binary garbage.
Quick first move — get the page count and check if text is extractable:
pdfinfo /mnt/user-data/uploads/report.pdf
pdftotext -f 1 -l 1 /mnt/user-data/uploads/report.pdf - | head -20Then peek at the text content:
from pypdf import PdfReader
r = PdfReader("/mnt/user-data/uploads/report.pdf")
print(f"{len(r.pages)} pages")
print(r.pages[0].extract_text()[:2000])For anything beyond a quick peek — figures, tables, attachments,
forms, scanned PDFs, visual inspection, or choosing a reading strategy
— go read /mnt/skills/public/pdf-reading/SKILL.md. It covers
content inventory, text extraction vs. page rasterization, embedded
content extraction, and document-type-aware reading strategies.
For PDF form filling, creation, merging, splitting, or watermarking,
go read /mnt/skills/public/pdf/SKILL.md.
DOCX / DOC
The docx skill covers editing, creating, tracked changes, images.
Read it if you need any of those. For a quick look:
pandoc /mnt/user-data/uploads/memo.docx -t markdown | head -200Legacy .doc (not .docx) must be converted first — see the docx
skill.
XLSX / XLS / spreadsheets
The xlsx skill covers formulas, formatting, charts, creating. Read
it if you need any of those. For a quick look at .xlsx / .xlsm:
from openpyxl import load_workbook
wb = load_workbook("/mnt/user-data/uploads/data.xlsx", read_only=True)
print("Sheets:", wb.sheetnames)
ws = wb.active
for row in ws.iter_rows(max_row=5, values_only=True):
print(row)read_only=True matters — without it, openpyxl loads the entire
workbook into memory, which breaks on large files. Do not trust
ws.max_row in read-only mode: many non-Excel writers omit the
dimension record, so it comes back None or wrong. If you need a row
count, iterate or use pandas.
Legacy .xls — openpyxl raises InvalidFileException. Use:
import pandas as pd
df = pd.read_excel("/mnt/user-data/uploads/old.xls", engine="xlrd", nrows=5).ods (OpenDocument) — openpyxl also rejects this. Use:
import pandas as pd
df = pd.read_excel("/mnt/user-data/uploads/data.ods", engine="odf", nrows=5)PPTX
from itertools import islice
from pptx import Presentation
p = Presentation("/mnt/user-data/uploads/deck.pptx")
print(f"{len(p.slides)} slides")
for i, slide in enumerate(islice(p.slides, 3), 1):
texts = [s.text for s in slide.shapes if s.has_text_frame]
print(f"Slide {i}:", " | ".join(t for t in texts if t))p.slides is not subscriptable — p.slides[:3] raises
AttributeError. Use islice or list(p.slides)[:3].
Legacy .ppt — python-pptx only reads OOXML. Convert to .pptx
first via LibreOffice; see /mnt/skills/public/pptx/SKILL.md for the
sandbox-safe scripts/office/soffice.py wrapper (bare soffice hangs
here because the seccomp filter blocks the AF_UNIX sockets
LibreOffice uses for instance management).
For anything beyond reading, go to /mnt/skills/public/pptx/SKILL.md.
CSV / TSV
Do not cat or head these blindly. A CSV with a 50KB quoted cell
in row 1 will wreck your head -5. Use pandas with nrows:
import pandas as pd
df = pd.read_csv("/mnt/user-data/uploads/data.csv", nrows=5)
print(df)
print()
print(df.dtypes)Approximate row count without loading (over-counts if the file has RFC-4180 quoted newlines — the same quoted-cell case this section warned about above):
wc -l /mnt/user-data/uploads/data.csvFull analysis only after you know the shape:
df = pd.read_csv("/mnt/user-data/uploads/data.csv")
print(df.describe())TSV: same, with sep="\t".
JSON / JSONL
Structure first, content second:
jq 'type' /mnt/user-data/uploads/data.json
jq 'if type == "array" then length elif type == "object" then keys else . end' /mnt/user-data/uploads/data.json(keys errors on scalar JSON roots — a bare "hello" or 42 is valid
JSON per RFC 7159 — so guard the branch.)
Then drill into what the user actually asked about.
JSONL (one object per line) — do not jq the whole file; work line
by line:
head -3 /mnt/user-data/uploads/data.jsonl | jq .
wc -l /mnt/user-data/uploads/data.jsonlImages (JPG / PNG / GIF / WEBP)
You can already see uploaded images. They are injected into your
context as vision inputs alongside the <uploaded_files> pointer. You
do not need to read them from disk to describe them.
The disk copy is only needed if you are going to process the image programmatically:
from PIL import Image
img = Image.open("/mnt/user-data/uploads/photo.jpg")
print(img.size, img.mode, img.format)For OCR on an image (text extraction, not description):
import pytesseract
print(pytesseract.image_to_string(img))Note: the client resizes images larger than 2000×2000 down to that bound and re-encodes as JPEG before upload, so the disk copy may not be the user's original bytes. For most processing this doesn't matter; if the user is asking about original-resolution pixel data, flag it.
Archives (ZIP / TAR / TAR.GZ)
List first. Extract never — unless the user explicitly asks. Archives can be huge, contain path traversal, or nest forever.
unzip -l /mnt/user-data/uploads/bundle.zip
tar -tf /mnt/user-data/uploads/bundle.tarGNU tar auto-detects compression — tar -tf works on .tar,
.tar.gz, .tar.bz2, .tar.xz alike. Don't hard-code -z.
If the user wants one file from inside, extract just that one:
unzip -p /mnt/user-data/uploads/bundle.zip path/inside/file.txtStandalone .gz (not a tar) compresses a single file — there is
no manifest to list. Just peek at the decompressed content:
zcat /mnt/user-data/uploads/data.json.gz | head -50EPUB / ODT
pandoc /mnt/user-data/uploads/book.epub -t plain | head -200For long ebooks, pipe through head — you rarely need the whole thing
to answer a question.
RTF
Pandoc's RTF reader was added in 3.1.7 (Oct 2023). Debian Bookworm ships 2.17, so try pandoc first but expect it may fail:
pandoc /mnt/user-data/uploads/notes.rtf -t plain | head -200If you see Unknown input format rtf, convert via LibreOffice using
the sandbox-safe wrapper — see /mnt/skills/public/docx/SKILL.md for
scripts/office/soffice.py (do not call bare soffice; see the PPTX
section above for why).
Plain text / code / logs
Check the size first:
wc -c /mnt/user-data/uploads/app.log- Under ~20KB:
catis fine. - Over ~20KB:
head -100andtail -100to orient. If the user asked about something specific,grepfor it. Load the whole thing only if you genuinely need all of it.
For log files, the user almost always cares about the end:
tail -200 /mnt/user-data/uploads/app.logUnknown extension
file /mnt/user-data/uploads/mystery.bin
xxd /mnt/user-data/uploads/mystery.bin | head -5file identifies most things. xxd head shows magic bytes. If file
says "data" and the hex doesn't match anything you recognize, ask the
user what it is instead of guessing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

