llm-cli
Skill387 starsChanged 5 months agoMITView on GitHub
Process textual and multimedia files with various LLM providers using the llm CLI. Supports both non-interactive and interactive modes with model selection, config persistence, and file input handling.
- Reads credentials
- Installs packages
In this repository104 other files it gives its agents.
- automation-advisor/CLAUDE.mdCLAUDE.md
- agency-docs-updaterSkill
- agency-meetup-publishSkill
- agency-socialsSkill
- agent-cliSkill
- app-releaseSkill
- automation-advisorSkill
- balancedSkill
- brand-agencySkill
- browser-mateSkill
- browsing-historySkill
- chrome-historySkill
- coaching-session-summarizerSkill
- codexSkill
- cognitive-toolkitSkill
- context-builderSkill
- cull-release-checkSkill
- cull-release-prepareSkill
- cull-release-publishSkill
- cull-release-recoverSkill
- cull-releaseSkill
- cull-release-verifySkill
- cullSkill
- daydreamSkill
- decision-toolkitSkill
- deep-researchSkill
- design-tokensSkill
- doctorgSkill
- ecosystemSkill
- elevenlabs-ttsSkill
- elimination-researchSkill
- fathomSkill
- feature-factorySkill
- firecrawl-researchSkill
- font-featuresSkill
- github-gistSkill
- gmailSkill
- google-image-searchSkill
- gpt-image-2Skill
- granolaSkill
- gwsSkill
- health-dataSkill
- i18n-studioSkill
- init-tauri-appSkill
- init-xcode-appSkill
- insight-extractorSkill
- jtbdSkill
- lab-retroSkill
- learning-vaultSkill
- linearSkill
- local-modelsSkill
- meeting-prepSkill
- meeting-processorSkill
- metaSkill
- name-auditionSkill
- nano-bananaSkill
- nielsen-heuristicsSkill
- pdf-generationSkill
- peer-agent-collaborationSkill
- presentation-generatorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 174
When user invokes this skill, Claude should:
- Distinctive: line 176
Call skill with content and optional model parameter
- Distinctive: line 177
Wait for provider/model selection if needed
- Distinctive: line 183
If no providers available: Suggest installing API keys
- Distinctive: line 184
If model not found: Show available models for chosen provider
- Very specific: line 185
If llm CLI not installed: Suggest installation via pip install llm
- Distinctive: line 186
If file not readable: Fall back to treating as inline text
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
LLM CLI Skill
Purpose
This skill enables seamless interaction with multiple LLM providers (OpenAI, Anthropic, Google Gemini, Ollama) through the llm CLI tool. It processes textual and multimedia information with support for both one-off executions and interactive conversation modes.
When to Use This Skill
Trigger this skill when:
- User wants to process text/files with an LLM
- User needs to choose between multiple available LLMs
- User wants interactive conversation with an LLM
- User needs to pipe content through an LLM for processing
- User wants to use specific model aliases (e.g., "claude-opus", "gpt-4o")
Example user requests:
- "Process this file with Claude"
- "Analyze this text with the fastest available model"
- "Start an interactive chat with OpenAI"
- "Use Gemini to summarize this document"
- "Chat mode with my local Ollama instance"
Supported Providers & Models
OpenAI
- Latest Models (2025):
gpt-5- Most advanced modelgpt-4-1/gpt-4.1- Latest high-performancegpt-4-1-mini/gpt-4.1-mini- Smaller, faster versiongpt-4o- Multimodal omni modelgpt-4o-mini- Lightweight multimodalo3- Advanced reasoningo3-mini/o3-mini-high- Reasoning variants
Aliases: openai, gpt
Anthropic
- Latest Models (2025):
claude-sonnet-4.5- Latest flagship modelclaude-opus-4.1- Complex task specialistclaude-opus-4- Coding specialistclaude-sonnet-4- Balanced performanceclaude-3.5-sonnet- Previous generationclaude-3.5-haiku- Fast & efficient
Aliases: anthropic, claude
Google Gemini
- Latest Models (2025):
gemini-2.5-pro- Most advancedgemini-2.5-flash- Default fast modelgemini-2.5-flash-lite- Speed optimizedgemini-2.0-flash- Previous generationgemini-2.5-computer-use- UI interaction
Aliases: google, gemini
Ollama (Local)
- Popular Models:
llama3.1- Meta's latest (8b, 70b, 405b)llama3.2- Compact versions (1b, 3b)mistral-large-2- Mistral flagshipdeepseek-coder- Code specialiststarcode2- Code models
Aliases: ollama, local
Workflow Overview
User Input (with optional model)
↓
Check Available Providers (env vars)
↓
Determine Model to Use:
- If specified: Use provided model
- If ambiguous: Show selection menu
- Otherwise: Use last remembered choice
↓
Load/Create Config (~/.claude/llm-skill-config.json)
↓
Detect Input Type:
- stdin/piped
- file path
- inline text
↓
Execute llm CLI:
- Non-interactive: Process & return
- Interactive: Keep conversation loop
↓
Save Model Choice to ConfigFeatures
1. Provider Detection
- Checks environment variables for API keys
- Suggests available LLM providers on first run
- Detects:
OPENAI_API_KEY,ANTHROPIC_API_KEY,GOOGLE_API_KEY,OLLAMA_BASE_URL
2. Model Selection
- Accept model aliases (
gpt-4o,claude-opus,gemini-2.5-pro) - Accept provider aliases (
openai,anthropic,google,ollama) - Interactive menu when selection is ambiguous
- Remembers last used model in
~/.claude/llm-skill-config.json
3. Input Processing
- Accepts stdin/piped input
- Processes file paths (detects: .txt, .md, .json, .pdf, images)
- Handles inline text prompts
- Supports multimedia files with appropriate encoding
4. Execution Modes
Non-Interactive (Default)
llm "Your prompt here"
llm --model gpt-4o "Process this text"
llm < file.txt
cat document.md | llm "Summarize"Interactive Mode
llm --interactive
llm -i
llm --model claude-opus --interactive5. Configuration
Persistent config location: ~/.claude/llm-skill-config.json
{
"last_model": "claude-sonnet-4.5",
"default_provider": "anthropic",
"available_providers": ["openai", "anthropic", "google", "ollama"]
}Implementation Details
Core Files
llm_skill.py- Main skill orchestrationproviders.py- Provider detection & configmodels.py- Model definitions & aliasesexecutor.py- Execution logic (interactive/non-interactive)input_handler.py- Input type detection
Key Functions
detect_providers()
- Scans environment for provider API keys
- Returns dict of available providers
get_model_selector(input_text, provider=None)
- Returns selected model, showing menu if needed
- Respects
last_modelconfig preference
load_input(input_source)
- Handles stdin, file paths, or inline text
- Returns content string
execute_llm(content, model, interactive=False)
- Calls
llmCLI with appropriate parameters - Manages stdin/stdout for interactive mode
Usage in Claude Code
When user invokes this skill, Claude should:
- Parse input for model specification (e.g.,
--model gpt-4o) - Call skill with content and optional model parameter
- Wait for provider/model selection if needed
- Execute and return results
- For interactive mode, maintain conversation loop
Error Handling
- If no providers available: Suggest installing API keys
- If model not found: Show available models for chosen provider
- If llm CLI not installed: Suggest installation via
pip install llm - If file not readable: Fall back to treating as inline text
Configuration
Users can pre-configure preferences:
{
"last_model": "claude-sonnet-4.5",
"default_provider": "anthropic",
"interactive_mode": false,
"available_providers": ["openai", "anthropic"]
}Slash Command Integration
Support /llm command:
/llm process this text
/llm --interactive
/llm --model gpt-4o analyze thisDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

