read-file
Skill1 starsChanged 17 days agoApache-2.0View on GitHub
Read a PDF, image or other non-note file from an Obsidian vault through the obsidian-mcp-brain server's read-file tool. Use whenever the user asks to read, open, summarise or look at a PDF, image or other non-markdown file that is in the vault. It first checks which Claude surface it is running on, because Claude chat surfaces show only images and silently drop other file types.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- justmytwospence/strava-mcptheir own version, first seen Nov 8, 2026
- Kaalia0912/dsh-data-analysis-modetheir own version, first seen Aug 20, 2026
- stephen94125/peon-libtheir own version, first seen Apr 17, 2026
- datafusion-contrib/datafusion-skillstheir own version, first seen Mar 21, 2026
- duckdb/duckdb-skillstheir own version, first seen Mar 19, 2026
- carlopi/duckdb-claude-skillstheir own version, first seen Mar 9, 2026
Used with
Projects with it also use attach-db and query.
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.
duckdbSkillattach-db
Attach a DuckDB database file for use with /duckdb-skills:query. Explores the schema (tables, columns, row counts) and writes a SQL state file so subsequent queries can restore this session automatically via duckdb -init.
Also in 3 projects that use this
ArtemXTechSkillquery
Query data from this vault. USE WHEN user asks about projects, clients, tasks, daily notes. Use grep to extract frontmatter - do NOT read full files.
Also in 4 projects that use this
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- duckdb/duckdb-skills★ 598same name
- datafusion-contrib/datafusion-skills★ 14same name
- carlopi/duckdb-claude-skills★ 2same name
- Kaalia0912/dsh-data-analysis-mode★ 2same name
- stephen94125/peon-lib★ 2same name
- justmytwospence/strava-mcp★ 0same 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 repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- replace-fileSkill
- upload-fileSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
6
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
- Distinctive: line 27
Look at where this skill file was loaded from and at the home directory:
- Distinctive: line 35
If you cannot tell, go to step 2 and use the check in step 3.
- Distinctive: line 39
Only stop for a file that is not an image.
- Distinctive: line 42
When you stop, say this to the user, with the file name filled in:
- Very specific: line 49
Do not try to work around it by base64-encoding the file into a message, or by calling read-file repeatedly.
- Very specific: line 54
If you do not know the path, call list-files (give extension, for example pdf, and, optionally, path to narrow it to a folder).
- Very specific: line 56
Call read-file with vault, filename and folder.
- Distinctive: line 80
Do not guess a file's contents from its name when the read did not work.
- Distinctive: line 82
Do not move or copy the file to another name or location to try again: the failure is about the file's type and the client, not its name or …
“Common” is measured: kept by at least 6 in 10 of the 6 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
Read a non-note file from the vault
read-file returns a file as an MCP embedded resource block (base64
bytes and a MIME type). What happens next depends on the client:
- Claude Code (including the code mode of the Claude Desktop app) saves the bytes to a file and gives you its path. You then open that path with your file-reading tool, which reads PDFs.
- Claude Desktop chat passes an embedded resource to the model only if it is
an image. A PDF is dropped without any error, and a text file such as a CSV is
rejected with
The tool returned an image in an unsupported format.(tested). claude.ai chat is reported to behave the same way but has not been tested here. As far as we can tell this is the client's behaviour, so nothing the server does changes it, and retrying does not help.
So check where you are before reading anything that is not an image.
Step 1: work out which surface you are on
Look at where this skill file was loaded from and at the home directory:
| This skill is found at | Surface | Reading a non-image file |
~/.claude/skills/read-file/, or a folder under ~/.claude/plugins/ (an installed plugin), under a home that is not claude (/home/<user>, /Users/<user>) | Claude Code | Works. Go to step 2 |
/mnt/skills/user/... or /mnt/skills/plugins/..., or the home directory is /home/claude | Claude Desktop chat or claude.ai chat | Does not work (tested in Desktop chat, reported for claude.ai). Stop and tell the user (below) |
/root/.claude/skills/synced/<bucket-id>/... | Cowork | Not tested. Go to step 2 and rely on the check in step 3 |
If you cannot tell, go to step 2 and use the check in step 3.
An image is expected to be fine on every surface (WebP was tested in Claude Desktop chat; PNG, JPEG and GIF are the other formats reported to be shown). Only stop for a file that is not an image. Treat SVG as a non-image: it is not one of those formats.
When you stop, say this to the user, with the file name filled in:
<file>is a PDF (or other non-image file), and this chat can't show non-image files from the vault: it drops them without an error. Open the vault in a Claude Code chat (in the Claude Desktop app, the code mode) and ask there; the same MCP server works in it.
Do not try to work around it by base64-encoding the file into a message, or by
calling read-file repeatedly.
Step 2: find and read the file
- If you do not know the path, call
list-files(giveextension, for examplepdf, and, optionally,pathto narrow it to a folder). - Call
read-filewithvault,filenameandfolder. A.mdnote can be read too, butread-noteis better for a note. - In Claude Code, the result gives a saved path. Open it with your file-reading tool. A PDF with a text layer is read as text, and a scanned PDF is read from rendered page images.
Step 3: check the result
- A text line and a file you can open: you are done. The
sha256:andLast-Modified:lines name the version you read; thereplace-fileskill needs them to replace the file. - Only the text lines (
<path> (<n> bytes, <mime type>), thensha256:andLast-Modified:) and no file or content, for a file that is not an image: this surface drops non-image files. Stop and tell the user as in step 1. Do not call the tool again. The operation timed outon a large file that has not been read recently: the server is still working and a second call is fast. Call it again, up to twice, then tell the user.Reading is restricted for '<path>': the owner has protected the file. Tell the user; do not look for another way to read it.- The file is larger than the limit: the message says so. Tell the user.
Rules
- Do not guess a file's contents from its name when the read did not work. Say that you could not read it.
- Do not move or copy the file to another name or location to try again: the failure is about the file's type and the client, not its name or size.
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.

