Li Summarize

v0.0.2

使用国内 OpenAI 兼容 API 快速总结 URLs、本地文件、YouTube 链接。支持所有国内大模型 API(百度千帆、阿里云、腾讯混元、字节火山、Moonshot、DeepSeek 等)。

0· 13·1 current·1 all-time
byTerry S Fisher@43622283
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (summarize URLs, local files, YouTube using domestic OpenAI‑compatible APIs) match the declared runtime requirement (binary 'summarize') and the SKILL.md examples. The included install scripts install the @steipete/summarize CLI which is coherent with the stated purpose.
Instruction Scope
SKILL.md and scripts expect and use OPENAI_BASE_URL and OPENAI_API_KEY and instruct creating/reading ~/.summarize/config.json — these are appropriate for a multi‑provider summarizer, but the registry metadata lists no required env vars; the skill will still operate when the user provides those env vars or edits the config file.
Install Mechanism
There is no registry install spec, but scripts call 'npm install -g @steipete/summarize' if 'summarize' is missing. Installing a global npm package is a normal delivery for a CLI but carries the usual npm risks (package executes install scripts, modifies system). The installers do not download from obscure URLs and create files under the user's home directory.
Credentials
Requested/used environment variables (OPENAI_BASE_URL, OPENAI_API_KEY, optional SUMMARIZE_MODEL) are directly relevant to contacting OpenAI‑compatible model endpoints; no unrelated credentials or high‑privilege secrets are requested.
Persistence & Privilege
Skill does not request always:true and does not modify other skills or global agent settings. It writes config files to ~/.summarize, which is appropriate for a CLI tool.
Assessment
This skill appears internally consistent with its purpose. Before installing: 1) Review the npm package '@steipete/summarize' (source/reputation) because 'npm install -g' runs code on your machine. 2) Be aware the scripts create ~/.summarize/config.json and providers.json and may write a placeholder API key — replace placeholders with your own keys and avoid committing those files. 3) If you prefer tighter control, run the install steps manually (inspect the package, or install locally rather than globally) and avoid running scripts as root. 4) Confirm you trust the model provider endpoints you configure (OPENAI_BASE_URL) since API keys you place in config or env vars grant those endpoints access to billing/usage.

Like a lobster shell, security has layers — review code before you run it.

latestvk973m0vh146z55jsgbq7e1fs118463e5

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

📝 Clawdis
Binssummarize

SKILL.md

li-summarize

国内优化版的 summarize CLI,全面支持 OpenAI 兼容 API 的各种国内大模型服务。

快速开始

# 使用环境变量(推荐)
export OPENAI_BASE_URL="https://qianfan.baidubce.com/v2"
export OPENAI_API_KEY="your-api-key"
summarize "https://example.com" --model qianfan/codegeex-4-2025-01-15

# 或者使用模型简称
summarize "https://example.com" --model baidu Ernie-4.0-8K

支持的国内 API 提供商

1. 百度智能云千帆 (QianFan)

export OPENAI_BASE_URL="https://qianfan.baidubce.com/v2"
export OPENAI_API_KEY="your-bce-api-key"

# 支持的模型
summarize "url" --model qianfan/ernie-4.0-8k
summarize "url" --model qianfan/ernie-3.5-8k
summarize "url" --model qianfan/codegeex-4

2. 阿里云通义千问 (Dashscope)

export OPENAI_BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1"
export OPENAI_API_KEY="your-api-key"

# 支持的模型
summarize "url" --model qwen/qwen2.5-72b-instruct
summarize "url" --model qwen/qwen2.5-32b-instruct
summarize "url" --model qwen/qwen-max
summarize "url" --model qwen/qwen-turbo

3. 腾讯混元 (Hunyuan)

export OPENAI_BASE_URL="https://hunyuancloud.tencent.com/api/v3"
export OPENAI_API_KEY="your-api-key"

summarize "url" --model hunyuan/hunyuan-pro
summarize "url" --model hunyuan/hunyuan-standard

4. 字节跳动火山引擎 (VeFy)

export OPENAI_BASE_URL="https://ark.cn-beijing.volces.com/api/v3"
export OPENAI_API_KEY="your-api-key"

summarize "url" --model doubao-pro-32k
summarize "url" --model doubao-standard-32k

5. Moonshot AI (月之暗面)

export OPENAI_BASE_URL="https://api.moonshot.cn/v1"
export OPENAI_API_KEY="your-api-key"

summarize "url" --model moonshot/kimi-k2-0711-preview
summarize "url" --model moonshot/kimi-long

6. DeepSeek

export OPENAI_BASE_URL="https://api.deepseek.com/v1"
export OPENAI_API_KEY="your-api-key"

summarize "url" --model deepseek-chat
summarize "url" --model deepseek-coder

7. 智谱 AI (Zhipu)

export OPENAI_BASE_URL="https://open.bigmodel.cn/api/paas/v4"
export OPENAI_API_KEY="your-api-key"

summarize "url" --model glm-4-plus
summarize "url" --model glm-4-flash
summarize "url" --model glm-4

8. MiniMax (稀宇)

export OPENAI_BASE_URL="https://api.minimax.chat/v1"
export OPENAI_API_KEY="your-api-key"

summarize "url" --model MiniMax-Text-01
summarize "url" --model abab6.5s-chat

9. 阶跃星辰 (StepFun)

export OPENAI_BASE_URL="https://api.stepfun.com/v1"
export OPENAI_API_KEY="your-api-key"

summarize "url" --model step-1v-8k
summarize "url" --model step-1.5-chat

10. Ollama (本地部署)

export OPENAI_BASE_URL="http://localhost:11434/v1"
export OPENAI_API_KEY="not-needed"

summarize "url" --model llama3
summarize "url" --model qwen2.5:72b

11. OneAPI / All In One

export OPENAI_BASE_URL="http://your-oneapi-server:3000/v1"
export OPENAI_API_KEY="your-key"

summarize "url" --model gpt-4
summarize "url" --model claude-3

预设配置(推荐)

为了简化使用,可以在 ~/.summarize/config.json 中预设常用配置:

{
  "model": "baidu/ernie-4.0-8k",
  "openaiBaseUrl": "https://qianfan.baidubce.com/v2",
  "openaiApiKey": "your-bce-key",
  "length": "xl",
  "language": "zh-CN"
}

使用示例

# 总结网页
summarize "https://news.ycombinator.com" --model qwen/qwen2.5-72b-instruct

# 总结 YouTube 视频
summarize "https://youtube.com/watch?v=xxx" --model deepseek-chat

# 总结本地 PDF
summarize "/path/to/file.pdf" --model glm-4-plus

# 指定输出长度
summarize "https://example.com" --length medium

# 输出 JSON 格式
summarize "https://example.com" --json

# 仅提取内容(不总结)
summarize "https://example.com" --extract

# 流式输出
summarize "https://example.com" --stream on

环境变量速查表

提供商BASE_URLAPI_KEY 环境变量
百度千帆https://qianfan.baidubce.com/v2OPENAI_API_KEY
阿里通义https://dashscope.aliyuncs.com/compatible-mode/v1OPENAI_API_KEY
腾讯混元https://hunyuancloud.tencent.com/api/v3OPENAI_API_KEY
字节火山https://ark.cn-beijing.volces.com/api/v3OPENAI_API_KEY
Moonshothttps://api.moonshot.cn/v1OPENAI_API_KEY
DeepSeekhttps://api.deepseek.com/v1OPENAI_API_KEY
智谱 AIhttps://open.bigmodel.cn/api/paas/v4OPENAI_API_KEY
MiniMaxhttps://api.minimax.chat/v1OPENAI_API_KEY
StepFunhttps://api.stepfun.com/v1OPENAI_API_KEY
Ollamahttp://localhost:11434/v1任意
OneAPIhttp://localhost:3000/v1OPENAI_API_KEY

配置模板

百度千帆(推荐)

# .bashrc 或 .zshrc
export OPENAI_BASE_URL="https://qianfan.baidubce.com/v2"
export OPENAI_API_KEY="your-bce-v3-api-key"

# 使用
summarize "url" --model qianfan/ernie-4.0-8k

阿里云通义千问

export OPENAI_BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1"
export OPENAI_API_KEY="your-dashscope-api-key"

summarize "url" --model qwen/qwen-max

DeepSeek(便宜好用)

export OPENAI_BASE_URL="https://api.deepseek.com/v1"
export OPENAI_API_KEY="your-deepseek-api-key"

summarize "url" --model deepseek-chat

故障排除

401 认证错误

  • 检查 OPENAI_API_KEY 是否正确
  • 确认 API Key 有足够余额

403 权限错误

  • 确认 API Key 已开通对应模型权限
  • 百度千帆需要在控制台开通模型试用

404 模型不存在

  • 确认模型名称拼写正确
  • 确认该模型在对应平台可用

超时错误

  • 增加超时时间: summarize "url" --timeout 5m
  • 检查网络连接

依赖问题

# 如果缺少 ffmpeg (YouTube 音频处理)
sudo apt install ffmpeg  # Ubuntu/Debian
sudo yum install ffmpeg  # CentOS
brew install ffmpeg      # macOS

相关链接

Files

3 total
Select a file
Select a file to preview.

Comments

Loading comments…