← スキル一覧に戻る

read-latest-download
by AnveshJarabani
all config files
⭐ 0🍴 0📅 2026年1月23日
SKILL.md
name: read-latest-download description: Read the latest file from the Downloads folder user: true
Read Latest Download
Instructions
When the user runs /read-latest-download or mentions "latest download" or "latest file from downloads", you should:
- Find the most recently modified file in the Downloads folder
- Check file size and type
- Read the file content appropriately based on type
Implementation
Find Latest Download
# Find latest file in Downloads folder (excluding directories)
DOWNLOADS_DIR="/mnt/c/users/anveshjarabani/downloads"
LATEST=$(find "$DOWNLOADS_DIR" -maxdepth 1 -type f -printf '%T@ %p\n' 2>/dev/null | sort -rn | head -1 | cut -d' ' -f2-)
if [ -n "$LATEST" ]; then
echo "Latest file: $(basename "$LATEST")"
echo "Modified: $(date -r "$LATEST" '+%Y-%m-%d %H:%M:%S')"
echo "Size: $(du -h "$LATEST" | cut -f1)"
echo "Path: $LATEST"
else
echo "No files found in Downloads folder"
fi
Handle Different File Types
- Text files (.txt, .md, .log): Use Read tool directly
- Large files (>256KB): Use Grep to search or Read with offset/limit
- Images (.png, .jpg, .gif): Use Read tool (supports images)
- PDFs (.pdf): Use Read tool (supports PDFs)
- Code files (.py, .js, .sh, etc.): Use Read tool
- Binary files: Show file info, ask user what to do
Steps
-
Find latest file:
bash -c 'ls -lt /mnt/c/users/anveshjarabani/downloads/*.* 2>/dev/null | head -5' -
Check file size:
- If < 256KB: Read entire file
- If > 256KB: Warn user and ask if they want to:
- Search for specific content (Grep)
- Read specific portion (Read with offset/limit)
- Get summary of first/last lines
-
Read the file:
- Use Read tool for text/images/PDFs
- For large text files, use Grep to search or Read with parameters
-
Handle errors gracefully:
- File too large: Offer alternatives
- Binary file: Show metadata, offer to search for text patterns
- Permission denied: Inform user
Example Usage
User: "Read latest download"
Assistant:
- Uses Bash to find latest file
- Shows filename, size, timestamp
- Reads content with appropriate tool
- If errors (e.g., "latest.txt" in your case had terraform errors), extracts relevant information
Special Cases
Terraform Plan Output
If the latest file contains terraform output:
- Use Grep to find errors:
grep -i "error\|failed\|exception" - Use Grep with context:
grep -B 5 -A 5 "Error:" - Extract specific resource errors
Log Files
- Show summary stats (lines, file size)
- Offer to grep for ERROR, WARN, INFO
- Show last N lines by default
Large JSON/YAML
- Parse and show structure
- Offer to extract specific keys
- Use Grep for specific values
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です