file-reading — Claude Code skill: read uploaded files right
A routing skill that tells the agent which tool to reach for when a file is uploaded but its contents are not in context.
npx skills add SeifBenayed/cloclo --skill file-reading -a claude-codeWhat file-reading does
Uploads land at /mnt/user-data/uploads/ and the agent only sees the path. The tempting move is to run cat on it. That backfires: PDFs come out as binary noise, a large CSV eats the context window, DOCX dumps raw ZIP bytes. This skill replaces the guess with a lookup.
It ships a dispatch table keyed on file extension. PDFs start with pdfinfo and pdftotext; DOCX goes through pandoc into markdown; spreadsheets open with openpyxl in read_only=True mode or pandas with nrows; JSON gets jq for structure; archives are listed, not extracted. The general protocol is short: check the extension, run stat and file first, then read only as much as the question needs.
Legacy formats need detours. .doc and .ppt have to be converted before anything reads them, .xls goes through engine="xlrd" and .ods through engine="odf" because openpyxl rejects both. If the file body is already sitting in context inside a documents block, the skill does not apply — there is nothing left to fetch.
What it helps with
- open an uploaded PDF without binary garbage in the output
- inspect a large CSV without loading every row
- convert a DOCX to markdown with pandoc
- list sheet names in an XLSX before pulling data
- read a JSON file by structure instead of in full
Example prompts for the agent
- Check
/mnt/user-data/uploads/report.pdfand tell me the page count - What is the structure of
/mnt/user-data/uploads/data.json? - Open
/mnt/user-data/uploads/memo.docxand summarise the first few paragraphs
How to install file-reading
1Skills CLI (Vercel)
npx skills add SeifBenayed/cloclo --skill file-reading -a claude-code2Manually: put the files in place
~/.claude/skills/file-reading/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/file-reading/
1Skills CLI (Vercel)
npx skills add SeifBenayed/cloclo --skill file-reading -a codex2Manually: put the files in place
.agents/skills/file-reading/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add SeifBenayed/cloclo --skill file-reading -a cursor2Manually: put the files in place
.cursor/skills/file-reading/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install SeifBenayed/cloclo file-reading2Manually: put the files in place
.github/skills/file-reading/SKILL.md1Skills CLI (Vercel)
npx skills add SeifBenayed/cloclo --skill file-reading -a gemini-cli2Platform CLI
gemini skills install https://github.com/SeifBenayed/cloclo --path .claude/skills/file-readingManually: put the files in place
.devin/skills/file-reading/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add SeifBenayed/cloclo --skill file-reading -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about file-reading
How do I install file-reading in Claude Code?
Run npx skills add SeifBenayed/cloclo --skill file-reading -a claude-code. The skill then lives at ~/.claude/skills/file-reading/SKILL.md.
What does file-reading do?
It routes by file type, telling the agent which tool fits an uploaded file so it does not run cat on a binary or pull in more than it needs.
When should I skip file-reading?
When the file contents are already visible in context inside a documents block, there is nothing to read and the skill does not apply.