Llm Cli logo

Llm Cli

Community
glebis
llm-cli

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.

Overview

Publisherglebis
Repositoryclaude-skills
Skill namellm-cli
Stars
379
Forks
56
Bundled files
14
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 14 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by glebis on GitHub. Read the source before you install it.

Installation

Install the Llm Cli AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/glebis/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/llm-cli .claude/skills/llm-cli
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Llm Cli in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Llm Cli on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Llm Cli is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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)
bash
llm "Your prompt here"
llm --model gpt-4o "Process this text"
llm < file.txt
cat document.md | llm "Summarize"
Interactive Mode
bash
llm --interactive
llm -i
llm --model claude-opus --interactive

5. Configuration

Persistent config location: ~/.claude/llm-skill-config.json

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:

  1. Parse input for model specification (e.g., --model gpt-4o)
  2. Call skill with content and optional model parameter
  3. Wait for provider/model selection if needed
  4. Execute and return results
  5. 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:

json
{
  "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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Llm Cli AI skill do?

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.

Why use Llm Cli on TypingMind?

Because you install it once and use it with any model. Llm Cli is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Llm Cli in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/glebis/claude-skills/tree/main/llm-cli. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Llm Cli?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Llm Cli?

As many as you like. As long as a model supports skills, you can use Llm Cli with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Llm Cli AI skill free?

Yes. It is published on GitHub by glebis under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇