360 Secure SkillHub
360 安全技能中心

Deepseek V4

这是一款终端工具,可调用DeepSeek V4的Flash(快廉)和Pro(强推理)两款模型,具备单轮问答、带推理轨迹的思考模式、多轮对话功能,还可查看模型与定价。日常问答、写作、编码适合用Flash,复杂推理、数学问题选Pro。需配置API密钥,基于Python脚本实现,兼容OpenAI SDK,输入为终端命令,输出AI回复。

jiajiaoy
jiajiaoy
热度 34.34
最近更新 2026-05-11 17:46:21
分类:开发依赖:代码执行 / 第三方 API应用场景:代码生成 / 代码审查 / 调试排错 / 翻译 ...

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add deepseek-v4
Metadata
name
deepseek-v4
version
1.0.0
author
jiajiaoy
homepage
https://clawhub.ai/skills/deepseek-v4
description
Use DeepSeek V4 (Flash & Pro) from the command line — one-shot Q&A, thinking mode, multi-turn chat. OpenAI-compatible API, no special CLI needed. Supports deepseek-v4-flash and deepseek-v4-pro.
keywords
["deepseek","deepseek v4","deepseek-v4-flash","deepseek-v4-pro","deepseek api","deepseek cli","deepseek chat","deepseek reasoning","deepseek thinking mode","LLM cli","AI cli","cheap LLM","fast LLM","openai compatible","chinese AI","open source LLM","deepseek v4 flash","deepseek v4 pro","AI model","LLM api","deepseek-reasoner","deepseek-chat","AI assistant cli","command line AI","深度求索","DeepSeek接口"]
metadata
{"clawdbot":{"emoji":"🧠","requires":{"bins":["uv"],"env":["DEEPSEEK_API_KEY"]},"install":[{"id":"uv-brew","kind":"brew","formula":"uv","bins":["uv"],"label":"Install uv (brew)"}]}}

DeepSeek V4

Use DeepSeek V4 Flash and Pro directly from your terminal — one-shot questions, deep reasoning with thinking mode, and multi-turn chat. No special CLI required; uses the OpenAI-compatible API via a small Python script.

Setup

1. Get API key: https://platform.deepseek.com/api_keys

2. Set environment variable:

export DEEPSEEK_API_KEY=your_key_here
# Add to ~/.zshrc or ~/.bashrc to persist

Models

Model ID Best for Price (input/output)
V4 Flash ⚡ deepseek-v4-flash Q&A, writing, coding, summaries $0.014 / $0.028 per 1M
V4 Pro 🚀 deepseek-v4-pro Hard reasoning, math, deep analysis $0.174 / $0.348 per 1M

Both support 1M token context. Cache hits are 10× cheaper.

Legacy aliases (deepseek-chat → flash, deepseek-reasoner → pro) deprecated 2026-07-24.

Commands

One-shot question (Flash — fast & cheap)

uv run {baseDir}/scripts/ask.py "Explain the difference between V4 Flash and V4 Pro"

One-shot with Pro model

uv run {baseDir}/scripts/ask.py "Write a merge sort in Rust" --model pro

Thinking mode (Pro with visible reasoning trace)

uv run {baseDir}/scripts/ask.py "Prove that there are infinitely many primes" --think

Multi-turn chat

uv run {baseDir}/scripts/chat.py --model flash
uv run {baseDir}/scripts/chat.py --model pro --think

Show models & pricing

uv run {baseDir}/scripts/models.py

Model Selection Guide

Use Flash when:

  • Everyday Q&A and explanations
  • Writing, editing, translation
  • Code generation and review
  • Summarization and classification
  • Cost is a priority

Use Pro when:

  • Multi-step math or logic problems
  • Complex debugging or architecture decisions
  • Deep research and analysis
  • You want to see the reasoning process (--think)

Tips

  • Thinking mode (--think) streams the internal reasoning before the final answer — useful for hard problems and to verify correctness
  • System prompt: --system "You are a concise assistant" to set tone
  • No streaming: --no-stream for cleaner output in scripts
  • DeepSeek's API is OpenAI-compatible — any OpenAI SDK works with base_url="https://api.deepseek.com/v1"