Summarize
Summarize a file or set of files using the local LLM — saves Claude context by pre-digesting large files before deeper analysisFrom its SKILL.md
npx -y skills add avanrossum/claude-local-llm-skills --skill summarizeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.0 KB, as published. Nobody here has run it
/summarize — Summarize Files via Local LLM
You are summarizing one or more files using the local/remote LLM endpoint to save Claude tokens. The local model handles the grunt work; you interpret and relay the results.
Arguments: $ARGUMENTS
How It Works
- Identify the file(s) to summarize from the user's arguments (path, glob, or directory)
- For each file, send it to the local LLM via curl
- Return the summary to the user
Step 1 — Resolve Files
Parse the argument to determine which files to summarize:
- A single file path: summarize just that file
- A glob pattern (e.g.,
src/**/*.py): use the Glob tool to find matching files - A directory: list files in the directory and summarize each
If more than 10 files match, ask the user to confirm before proceeding.
Step 2 — Send to Local LLM
For each file, read its content with the Read tool, then call the local LLM using Bash:
LLM_API_TOKEN=$(security find-generic-password -a "$USER" -s "lm-studio-token" -w 2>/dev/null)
curl -s "${LLM_BASE_URL:-https://lm.mipyip.com}/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LLM_API_TOKEN" \
-d '{
"model": "'"${LLM_MODEL:-qwen/qwen3.5-35b-a3b}"'",
"messages": [
{"role": "system", "content": "You are a senior developer. Summarize the following source file concisely: what it does, its key components, and notable patterns. Keep it under 10 lines."},
{"role": "user", "content": "File: {file_path}\n\n{file_content}"}
],
"stream": false,
"temperature": 0.3
}'
Extract the response content from .choices[0].message.content.
Important:
- The
LLM_BASE_URLenvironment variable overrides the default endpoint. If not set, usehttps://lm.mipyip.com. - The
LLM_MODELenvironment variable overrides the default model. If not set, useqwen/qwen3.5-35b-a3b. - The bearer token is pulled from macOS Keychain automatically. If the keychain lookup fails, check if
LLM_API_TOKENis set as an env var instead. - If the curl fails (timeout, connection error), tell the user the local LLM is unreachable and offer to summarize directly instead.
Step 3 — Present Results
Format the summaries cleanly for the user. For multiple files, use a heading per file. Don't add your own analysis on top — just relay what the local model said. If the user wants deeper analysis, they can ask and you'll use your own capabilities.
Error Handling
- If the LLM endpoint is unreachable, say so and offer to summarize the file yourself (using Claude tokens)
- If a file is too large for the local model's context window, note it and skip it
- If the token is missing, tell the user to set it up:
Or setsecurity add-generic-password -a "$USER" -s "lm-studio-token" -w "your-token"LLM_API_TOKENas an environment variable.