mcpbeat Sign in

LLM CLI Skill for Claude

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.

25k tokens
context cost
the whole folder, loaded on every use
17
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
337
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/glebis/claude-skills --skill llm-cli

What comes with it

94 352 bytes besides the instruction
.claude-plugin/plugin.json
FILES.md
GROQ_INTEGRATION.md
IMPLEMENTATION_SUMMARY.md
INSTALL.md
OPENROUTER_INTEGRATION.md
QUICKSTART.md
QUICK_REFERENCE.md
README.md
START_HERE.md
executor.py
input_handler.py
llm_skill.py
models.py
providers.py
requirements.txt

The instruction itself

28 sections, as written by the author

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 model
  • gpt-4-1 / gpt-4.1 - Latest high-performance
  • gpt-4-1-mini / gpt-4.1-mini - Smaller, faster version
  • gpt-4o - Multimodal omni model
  • gpt-4o-mini - Lightweight multimodal
  • o3 - Advanced reasoning
  • o3-mini / o3-mini-high - Reasoning variants

Aliases: openai, gpt

Anthropic

  • Latest Models (2025):
  • claude-sonnet-4.5 - Latest flagship model
  • claude-opus-4.1 - Complex task specialist
  • claude-opus-4 - Coding specialist
  • claude-sonnet-4 - Balanced performance
  • claude-3.5-sonnet - Previous generation
  • claude-3.5-haiku - Fast & efficient

Aliases: anthropic, claude

Google Gemini

  • Latest Models (2025):
  • gemini-2.5-pro - Most advanced
  • gemini-2.5-flash - Default fast model
  • gemini-2.5-flash-lite - Speed optimized
  • gemini-2.0-flash - Previous generation
  • gemini-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 flagship
  • deepseek-coder - Code specialist
  • starcode2 - 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 Config

Features

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 --interactive

5. 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 orchestration
  • providers.py - Provider detection & config
  • models.py - Model definitions & aliases
  • executor.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_model config preference
load_input(input_source)
  • Handles stdin, file paths, or inline text
  • Returns content string
execute_llm(content, model, interactive=False)
  • Calls llm CLI 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 this

Other skills for the same job

different authors, same section of the catalogue
At Dispatch V2
by pytorch
vendor ×3

Convert PyTorch AT_DISPATCH macros to AT_DISPATCH_V2 format in ATen C++ code. Use when porting AT_DISPATCH_ALL_TYPES_AND*, AT_DISPATCH_FLOATING_TYPES*, or other dispatch macros to the new v2 API. For ATen kernel files, CUDA kernels, and native operator implementations.

2k tokens
Docstring
by pytorch
vendor ×3

Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.

3k tokens
Statsmodels
by christophacham
×3

Statistical models library for Python. Use when you need specific model classes (OLS, GLM, mixed models, ARIMA) with detailed diagnostics, residuals, and inference. Best for econometrics, time series, rigorous inference with coefficient tables. For guided statistical test selection with APA reporting use statistical-analysis.

27k tokens
AI SDK
by vercel-labs
vendor ×2

Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".

6k tokens
Create Llms
by github
vendor ×1

Create an llms.txt file from scratch based on repository structure following the llms.txt specification at https://llmstxt.org/

2k tokens
Esm
by K-Dense-AI
×1

Use when working directly with the `esm` Python SDK, ESM3 or ESMC model IDs, Forge/Biohub inference clients, or ESMFold2 folding workflows.

21k tokens
Modal
by K-Dense-AI
×1

Modal is a serverless cloud platform for running Python on demand, including on-demand GPUs. Use when deploying or serving AI/ML models, running GPU-accelerated workloads (training, fine-tuning, inference), serving web endpoints, scheduling batch jobs, or scaling Python code to cloud containers with the Modal SDK.

19k tokens
Pytdc
by K-Dense-AI
×1

Use Therapeutics Data Commons through the PyTDC Python package for registry discovery, approved dataset access, task-aware splits, evaluator metrics, benchmark groups, and bounded molecular-oracle workflows.

27k tokens scripts

How to use it

Copy the folder

Take glebis/llm-cli from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference pip. Without those the skill loads but fails at the first command.