claude-handoff
MAmattpocock/skills337k4,978 new stars in the last 7 days
Download files from URLs to the Obsidian attachments folder and organize them with descriptive names. Use when the user provides URLs to download, asks to save files from the web, or wants to add web content as attachments.
Download files from URLs to attachments folder and organize them with descriptive names.
/download-attachment <url1> [url2] [url3...]
/download-attachment https://example.com/document.pdf
/download-attachment https://site.com/image.png https://site.com/report.pdf
You are tasked with downloading files from URLs and organizing them in the Obsidian vault attachments folder.
Extract the URL(s) from the user's input. Handle multiple URLs if provided.
if [[ ! "$url" =~ ^https?:// ]]; then
echo "Error: Only HTTP/HTTPS URLs are allowed"
exit 1
fi
For each URL:
# Sanitize filename to prevent path traversal
# Remove ../ and other dangerous characters
filename=$(basename "$url" | sed 's/[^a-zA-Z0-9._-]/_/g')
# Use wget or curl to download with timeout
wget --timeout=30 -O "05_Attachments/$filename" "$url"
# or
curl --max-time 30 -L "$url" -o "05_Attachments/$filename"
Check that files were downloaded successfully:
ls -la "05_Attachments/"
After downloading, run the organize-attachments command to rename files with descriptive names:
For PDFs:
pdftotextFor Images:
mcp__gemini-vision__analyze_image or
mcp__gemini-vision__analyze_multipleMove renamed files to 05_Attachments/Organized/ with descriptive names
Add entries to 05_Attachments/00_Index.md
git add -A
git commit -m "Download and organize attachments from URLs"
git push
File Naming:
Supported Types:
Error Handling:
Organization:
05_Attachments/05_Attachments/Organized/MAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
AFaffaan-m/ECC315k4,381 new stars in the last 7 days
AFaffaan-m/ECC315k4,381 new stars in the last 7 days
AFaffaan-m/ECC315k4,381 new stars in the last 7 days
DIDietrichGebert/ponytail203k4,904 new stars in the last 7 days