Please help me download LLM instruction documents from the yuheitomi/llm-instructions repository. Here's what I need you to do:
- First, fetch the index from https://raw.githubusercontent.com/yuheitomi/llm-instructions/refs/heads/main/index.md using
curlorwget(prefer these over WebFetch) - Parse the index to understand available documents
- Use the '$ARGUMENTS' keyword to find the most relevant document(s)
- If '$ARGUMENTS' is provided, search for documents that match the keyword in:
- File names
- Document titles
- Document descriptions
- If no keyword is provided or multiple matches are found, ask the user to clarify which document they want
- Download the selected document(s) to the ./docs directory (create if it doesn't exist)
- Provide a summary of what was downloaded
Search Strategy:
When matching keywords, consider these common patterns:
- "react" → React Router documentation
- "next" or "nextjs" → Next.js documentation
- "daisy" or "daisyui" → daisyUI documentation
- "svelte" → Svelte 5 documentation
- "router" → React Router documentation
- "advanced" → Advanced React Router documentation
Download Process:
- Create ./docs directory if it doesn't exist using
mkdir -p ./docs - Download raw markdown files using
curlorwgetfrom:https://raw.githubusercontent.com/yuheitomi/llm-instructions/refs/heads/main/frameworks/[file-name] - Prefer
curl -o filename.md URLorwget -O filename.md URLfor downloads - Save files with descriptive names that include the framework/topic
- Confirm successful download with file size and location
Command Examples:
# Fetch index first
curl -s https://raw.githubusercontent.com/yuheitomi/llm-instructions/refs/heads/main/frameworks/index.md
# Download specific documents
curl -o ./docs/react-router-v7.md https://raw.githubusercontent.com/yuheitomi/llm-instructions/refs/heads/main/frameworks/react-router-v7.md
wget -O ./docs/nextjs-v15.md https://raw.githubusercontent.com/yuheitomi/llm-instructions/refs/heads/main/frameworks/nextjs-v15.md
curl -o ./docs/svelte5.md https://raw.githubusercontent.com/yuheitomi/llm-instructions/refs/heads/main/frameworks/svelte5.md
Error Handling:
- If the keyword is ambiguous (multiple matches), list all matches and ask user to choose
- If no matches found, show available documents and ask for clarification
- If
curlorwgetdownload fails, provide clear error message and suggest alternatives - If ./docs directory cannot be created, suggest alternative location
- Only use WebFetch as a fallback if curl/wget are not available or fail
Tool Priority:
- First choice: Use
curlorwgetfor all HTTP requests - Fallback: Use WebFetch only if curl/wget fail or are unavailable
- Always: Use
mkdir -p ./docsto ensure directory exists