# file-reading

A routing skill that tells the agent which tool to reach for when a file is uploaded but its contents are not in context.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 116
- Author: SeifBenayed
- License: LicenseRef-Proprietary · policy=link-only · description only; the file stays with the author
- Source: https://github.com/SeifBenayed/cloclo/tree/HEAD/.claude/skills/file-reading/SKILL.md
- Updated: 2026-04-05
- HTML: https://affpapa.org/en/nevibecode/skills/file-reading

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add SeifBenayed/cloclo --skill file-reading -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/file-reading/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/file-reading/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add SeifBenayed/cloclo --skill file-reading -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/file-reading/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add SeifBenayed/cloclo --skill file-reading -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/file-reading/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install SeifBenayed/cloclo file-reading
```

2. **Manually: put the files in place**
- File: `.github/skills/file-reading/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add SeifBenayed/cloclo --skill file-reading -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/SeifBenayed/cloclo --path .claude/skills/file-reading
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/file-reading/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add SeifBenayed/cloclo --skill file-reading -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/SeifBenayed/cloclo/tree/HEAD/.claude/skills/file-reading/SKILL.md

## When to use it
- 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
- Check `/mnt/user-data/uploads/report.pdf` and tell me the page count
- What is the structure of `/mnt/user-data/uploads/data.json`?
- Open `/mnt/user-data/uploads/memo.docx` and summarise the first few paragraphs

## Similar
- [shuck-file](https://affpapa.org/en/nevibecode/mcp/shuck-file.md) — MCP server · ★ 6
- [convert-documents-to-markdown](https://affpapa.org/en/nevibecode/skills/convert-documents-to-markdown.md) — skill · 12600 installs
- [PDF Converter](https://affpapa.org/en/nevibecode/skills/pdf-converter.md) — skill · 5200 installs
- [convert-to-md](https://affpapa.org/en/nevibecode/plugins/convert-to-md.md) — plugin · ★ 40451
- [office-oxide-mcp](https://affpapa.org/en/nevibecode/mcp/office-oxide-mcp.md) — MCP server · ★ 162
- [document-converter-suite](https://affpapa.org/en/nevibecode/skills/document-converter-suite.md) — skill · 483 installs

From the same set: [seifbenayed/cloclo](https://affpapa.org/en/nevibecode/by/seifbenayed/cloclo.md) — 3 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
