claude-handoff
MAmattpocock/skills337k近 7 天新增 4,978 个 star
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/skills337k近 7 天新增 4,978 个 star
MAmattpocock/skills337k近 7 天新增 4,978 个 star
AFaffaan-m/ECC315k近 7 天新增 4,381 个 star
AFaffaan-m/ECC315k近 7 天新增 4,381 个 star
AFaffaan-m/ECC315k近 7 天新增 4,381 个 star
DIDietrichGebert/ponytail203k近 7 天新增 4,904 个 star