Logo de File Reading

File Reading

Organização
Wide-Moat
file-reading

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.

Visão geral

Publicado porWide-Moat
Repositórioopen-computer-use
Nome da habilidadefile-reading
Estrelas
123
Forks
29
Arquivos incluídos
Somente instruções
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Sem arquivos extras

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por Wide-Moat no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA File Reading no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/Wide-Moat/open-computer-use/tree/main/skills/public/file-reading
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Wide-Moat/open-computer-use.git /tmp/open-computer-use
mkdir -p .claude/skills
cp -r /tmp/open-computer-use/skills/public/file-reading .claude/skills/file-reading
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative File Reading em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega File Reading automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, File Reading não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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.
    bash
    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).

Dispatch table

ExtensionFirst moveDedicated skill
.pdfContent inventory (see PDF section)/mnt/skills/public/pdf-reading/SKILL.md
.docxextract-text/mnt/skills/public/docx/SKILL.md
.doc (legacy)Convert to .docx first/mnt/skills/public/docx/SKILL.md
.xlsxextract-text/mnt/skills/public/xlsx/SKILL.md
.xlsmextract-text --format xlsx/mnt/skills/public/xlsx/SKILL.md
.xls (legacy)pd.read_excel(engine="xlrd") — openpyxl rejects it/mnt/skills/public/xlsx/SKILL.md
.odspd.read_excel(engine="odf") — openpyxl rejects it/mnt/skills/public/xlsx/SKILL.md
.pptxextract-text/mnt/skills/public/pptx/SKILL.md
.ppt (legacy)Convert to .pptx first/mnt/skills/public/pptx/SKILL.md
.csv, .tsvpandas with nrows— (below)
.json, .jsonljq for structure— (below)
.jpg, .png, .gif, .webpAlready in your context as vision input— (below)
.zip, .tar, .tar.gzList contents, do not auto-extract— (below)
.gz (single file)zcat | head — no manifest to list— (below)
.epub, .odtextract-text— (below)
.rtfextract-text— (below)
.ipynbextract-text— (below)
.txt, .md, .log, code fileswc -c then head or full cat— (below)
Unknownfile then decide—

PDF

Never cat a PDF — it prints binary garbage.

Quick first move — get the page count and check if text is extractable:

bash
pdfinfo /mnt/user-data/uploads/report.pdf
pdftotext -f 1 -l 1 /mnt/user-data/uploads/report.pdf - | head -20

Then peek at the text content:

python
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:

bash
extract-text /mnt/user-data/uploads/memo.docx | head -200

Legacy .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 an .xlsx:

bash
extract-text /mnt/user-data/uploads/data.xlsx | head -100

For .xlsm, add --format xlsx (same zip structure; only the extension differs). When you need a structured preview in Python:

python
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:

python
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:

python
import pandas as pd
df = pd.read_excel("/mnt/user-data/uploads/data.ods", engine="odf", nrows=5)

PPTX

bash
extract-text /mnt/user-data/uploads/deck.pptx | head -200

Legacy .ppt — 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:

python
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):

bash
wc -l /mnt/user-data/uploads/data.csv

Full analysis only after you know the shape:

python
df = pd.read_csv("/mnt/user-data/uploads/data.csv")
print(df.describe())

TSV: same, with sep="\t".


JSON / JSONL

Structure first, content second:

bash
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:

bash
head -3 /mnt/user-data/uploads/data.jsonl | jq .
wc -l /mnt/user-data/uploads/data.jsonl

Images (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:

python
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):

python
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.

bash
unzip -l /mnt/user-data/uploads/bundle.zip
tar -tf /mnt/user-data/uploads/bundle.tar

GNU 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:

bash
unzip -p /mnt/user-data/uploads/bundle.zip path/inside/file.txt

Standalone .gz (not a tar) compresses a single file — there is no manifest to list. Just peek at the decompressed content:

bash
zcat /mnt/user-data/uploads/data.json.gz | head -50

EPUB / ODT

bash
extract-text /mnt/user-data/uploads/book.epub | head -200

For long ebooks, pipe through head — you rarely need the whole thing to answer a question.


RTF / IPYNB

bash
extract-text /mnt/user-data/uploads/notes.rtf | head -200
extract-text /mnt/user-data/uploads/notebook.ipynb | head -200

Plain text / code / logs

Check the size first:

bash
wc -c /mnt/user-data/uploads/app.log
  • Under ~20KB: cat is fine.
  • Over ~20KB: head -100 and tail -100 to orient. If the user asked about something specific, grep for it. Load the whole thing only if you genuinely need all of it.

For log files, the user almost always cares about the end:

bash
tail -200 /mnt/user-data/uploads/app.log

Unknown extension

bash
file /mnt/user-data/uploads/mystery.bin
xxd /mnt/user-data/uploads/mystery.bin | head -5

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

Perguntas frequentes

O que a habilidade de IA File Reading faz?

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 visibl...

Por que usar File Reading no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade File Reading é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar File Reading no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/Wide-Moat/open-computer-use/tree/main/skills/public/file-reading. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar File Reading?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com File Reading?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar File Reading com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA File Reading é gratuita?

A habilidade é publicada no GitHub por Wide-Moat. Consulte os termos de licenciamento no repositório. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇