Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

llm-call

A Claude Code Skill for calling external LLM APIs (DeepSeek, Qwen, OpenAI-compatible) directly from Claude Code — without consuming Opus tokens.

Why

When working in Claude Code, every task runs through Opus. But many routine tasks (translation, summarization, polishing) work perfectly fine with cheaper models. This skill lets you route those tasks to your own API endpoints.

Features

  • Multi-provider: DeepSeek, Qwen, OpenAI, or any OpenAI-compatible API
  • Preset tasks: translate, summarize, polish, explain — one flag to invoke
  • Batch processing: glob pattern to process multiple files at once
  • Config via env vars or JSON: no hardcoded credentials
  • Interactive setup: guided init script for first-time configuration
  • Stream output: real-time streaming support

Install

git clone https://github.com/physics-dimension/llm-call-skill.git
cp -r llm-call-skill ~/.claude/skills/llm-call

Setup

Run the interactive setup:

cd ~/.claude/skills/llm-call
python scripts/init.py

Or set environment variables:

export LLM_DEFAULT_PROVIDER=deepseek
export LLM_DEEPSEEK_BASE_URL=http://your-server:5001/v1
export LLM_DEEPSEEK_API_KEY=sk-xxx
export LLM_DEEPSEEK_MODEL=deepseek-chat

Usage

In Claude Code

Once installed, just say:

  • "Use DeepSeek to translate this file"
  • "Summarize this article with a cheap model"
  • "Batch translate all markdown files in articles/"

CLI

python scripts/llm_call.py "What is RAG?"
python scripts/llm_call.py --task translate article.md
python scripts/llm_call.py -p qwen --task summarize article.md
python scripts/llm_call.py --task translate --batch "articles/*.md" -o ./output/
python scripts/llm_call.py --stream "Explain transformers"

Config management

python scripts/init.py --show       # Show config (keys masked)
python scripts/init.py --env        # Print env export commands
python scripts/init.py --add qwen   # Add/update a provider

Preset Tasks

Task Description
translate EN → CN, preserves Markdown
translate-en CN → EN
summarize Structured summary
polish Chinese text polishing
explain Simple explanation for beginners

Requirements

  • Python 3.8+
  • openai package (pip install openai)
  • At least one OpenAI-compatible API endpoint

License

MIT

About

Claude Code Skill: Call external LLM APIs (DeepSeek, Qwen, OpenAI-compatible) without consuming Opus tokens

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages