upload-file
Skill1 starsChanged 17 days agoApache-2.0View on GitHub
Put a local file (a PDF, image or other binary) into an Obsidian vault through the obsidian-mcp-brain server's upload-file tool, without base64-encoding it. Use whenever the user asks to add, save, file or upload a local file to the vault, and the file is more than a few KB or the server offers upload-file.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- mia-cx/skillstheir own version, first seen Oct 16, 2026
- 0gfoundation/0g-agent-skillstheir own version, first seen Sep 17, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- 0gfoundation/0g-agent-skills★ 15same name
- mia-cx/skills★ 4same 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
- read-fileSkill
- replace-fileSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Run the helper from this skill's directory: scripts/upload-file.sh.
- Very specific: line 27
Reserve: Call the upload-file tool with vault, filename, size and sha256 exactly as printed, plus folder for where it should go in the …
- Distinctive: line 36
Do the three steps back to back.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Upload a local file to the vault
upload-file reserves a one-time URL on the MCP server; the file then
goes straight from disk to the server with curl, so its bytes never pass
through you. Use this instead of create-file, which needs the whole
file as base64 text in a tool call. That is slow, costs a large number of
tokens, and a single wrong character corrupts the file.
This workflow needs a shell on a machine that can reach the MCP server. If you
have no shell, use create-file for small files and tell the user it is
not possible for large ones.
Steps
Run the helper from this skill's directory: scripts/upload-file.sh.
- Prepare.
sh scripts/upload-file.sh prepare "<path to the local file>"printsfilename=,size=andsha256=lines. - Reserve. Call the
upload-filetool withvault,filename,sizeandsha256exactly as printed, plusfolderfor where it should go in the vault. The result contains a one-time URL. - Send.
sh scripts/upload-file.sh send "<path to the local file>" "<the URL>". It uploads the file, then checks the server's reply against the local file and printsuploaded <vault path> ... verified against the local fileon success.
Do the three steps back to back. The URL expires after a few minutes and works once.
Rules
- Never work out the hash or size by hand, and never paste the file's
contents into a tool call. Use
prepare; it is the only source forsizeandsha256. - Do not reuse a URL. Any request to it, even a failed one, uses it up. Call
upload-fileagain for a new one. - Do not share or log the URL. The helper never prints it.
- Choose the destination before reserving. An upload never overwrites: the
name must not already exist in the vault. To replace a file that is there, use
the
replace-fileskill.
When it fails
| The helper reports | Meaning | What to do |
404 | The URL expired or was already used | Reserve a new URL (step 2) and send again |
403 | The request carried an Origin header, came from a different address from the one that reserved it (only when the server checks that), or the destination is not allowed | Check the machine that ran send is the one that is connected to the server; if the path is restricted, tell the user |
409, or the tool itself says the file already exists | The destination exists (or appeared after the URL was reserved) | Choose another filename or folder, or ask the user; to replace the existing file use the replace-file skill |
422 | The file does not match the declared hash (it changed, or was damaged) | Run prepare again, then reserve a new URL |
400 saying a note must be valid UTF-8 | The file is a .md note whose bytes are not UTF-8 text | Fix the encoding, or tell the user; do not send it under another extension |
411, 413 or 400 | The declared size does not match the file, or exceeds the upload limit | Run prepare again; if the file is over the limit, tell the user |
503 | Too many uploads in progress | Wait a few seconds and start again from step 2 |
| curl could not connect | The URL's address is not reachable from this machine | Tell the user: the server's mcpBaseUrl may be wrong for this client |
Report any other failure to the user with the message the helper printed.
Reading the file back
To check the upload or read a PDF afterwards, use read-file, then open
the saved path it returns with your file-reading tool. If it times out on a
large file, call it again.
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.

