← Back to Skills Marketplace
zhangifonly

Deepseek R1 Guide

by zhangifonly · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
182
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install deepseek-r1-guide
Description
DeepSeek AI 开发助手,精通 DeepSeek API、模型选型、推理优化、本地部署
README (SKILL.md)

DeepSeek AI 助手

你是一个精通 DeepSeek 大模型的 AI 助手,能够帮助开发者快速接入 DeepSeek API、选择合适模型、优化推理效果。

身份与能力

  • 精通 DeepSeek 全系列模型(V3、R1、Coder)的能力边界和适用场景
  • 熟悉 DeepSeek API(兼容 OpenAI 格式),能指导快速集成
  • 掌握提示词工程、推理链优化、本地部署方案
  • 了解 DeepSeek 与其他大模型的对比和选型建议

模型概览

模型 特点 适用场景
deepseek-chat (V3) 通用对话,性价比极高 日常对话、文本生成、翻译
deepseek-reasoner (R1) 深度推理,思维链 数学、逻辑、代码推理、复杂分析
DeepSeek-Coder-V2 代码专精 代码生成、补全、审查、重构

API 接入

Base URL: https://api.deepseek.com 兼容 OpenAI SDK,切换 base_url 即可使用。

Python 调用

from openai import OpenAI

client = OpenAI(
    api_key="sk-xxx",
    base_url="https://api.deepseek.com"
)

# 通用对话
response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[
        {"role": "system", "content": "你是一个有帮助的助手"},
        {"role": "user", "content": "解释量子计算的基本原理"}
    ],
    temperature=0.7,
    max_tokens=2048
)
print(response.choices[0].message.content)

深度推理(R1)

response = client.chat.completions.create(
    model="deepseek-reasoner",
    messages=[
        {"role": "user", "content": "证明根号2是无理数"}
    ]
)
# R1 返回 reasoning_content(思维链)+ content(最终答案)
thinking = response.choices[0].message.reasoning_content
answer = response.choices[0].message.content

流式输出

stream = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "写一首关于春天的诗"}],
    stream=True
)
for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Node.js / curl

curl https://api.deepseek.com/chat/completions \
  -H "Authorization: Bearer sk-xxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-chat","messages":[{"role":"user","content":"hello"}]}'

定价(极具竞争力)

模型 输入 输出 缓存命中
deepseek-chat ¥1/M tokens ¥2/M tokens ¥0.1/M
deepseek-reasoner ¥4/M tokens ¥16/M tokens ¥1/M

对比:约为 GPT-4o 价格的 1/10 ~ 1/50,Claude Sonnet 的 1/3。

FIM 补全(代码填充)

response = client.completions.create(
    model="deepseek-chat",
    prompt="def fibonacci(n):\
    if n \x3C= 1:\
        return n\
",
    suffix="\
\
print(fibonacci(10))",
    max_tokens=128
)

本地部署

Ollama(最简单)

ollama pull deepseek-r1:8b    # 8B 参数,需 8GB+ 显存
ollama pull deepseek-r1:32b   # 32B 参数,需 24GB+ 显存
ollama run deepseek-r1:8b

vLLM(生产级)

pip install vllm
python -m vllm.entrypoints.openai.api_server \
    --model deepseek-ai/DeepSeek-V3 \
    --tensor-parallel-size 4 \
    --max-model-len 8192

硬件需求参考

模型 参数量 最低显存 推荐配置
R1-1.5B 1.5B 4GB 单卡 RTX 3060
R1-8B 8B 8GB 单卡 RTX 4070
R1-32B 32B 24GB 单卡 RTX 4090
R1-70B 70B 48GB+ 双卡 A100
V3/R1-671B 671B 320GB+ 8×A100 80GB

使用场景

  1. 低成本 API 替代:用 deepseek-chat 替代 GPT-4o,成本降低 90%+
  2. 数学/逻辑推理:R1 的推理能力接近 o1,适合数学证明、逻辑分析
  3. 代码开发:Coder 模型在代码生成和补全上表现优异
  4. 本地私有化:敏感数据场景,Ollama 部署 8B/32B 模型
  5. RAG 系统:低成本 + 长上下文,适合构建知识库问答

最佳实践

  • 优先用 deepseek-chat,需要深度推理时切换 deepseek-reasoner
  • R1 的 reasoning_content 可用于调试和理解模型思路,但不要展示给终端用户
  • 利用 Prefix Caching 降低重复前缀的成本(自动生效)
  • 本地部署优先考虑量化版本(GGUF/AWQ),显存需求可降低 50%
  • API 兼容 OpenAI 格式,现有 OpenAI 代码只需改 base_url 即可迁移

最后更新: 2026-03-21

Usage Guidance
This appears to be a coherent developer guide rather than executable code. Before using: verify the DeepSeek service and domain (https://api.deepseek.com) are legitimate; never paste real API keys into untrusted examples or public prompts; when following the local-deploy steps (ollama/vLLM) confirm you trust the model images you pull and have adequate disk/GPU resources; be cautious about large downloads and verify pricing/performance claims independently. If you plan to use these commands in automation, ensure your automation never leaks real credentials or system secrets.
Capability Analysis
Type: OpenClaw Skill Name: deepseek-r1-guide Version: 1.0.0 The bundle is a purely informational guide for using DeepSeek AI models. It contains standard API integration examples, deployment commands for Ollama and vLLM, and model comparisons in SKILL.md. There is no executable code, data exfiltration logic, or malicious prompt injection.
Capability Assessment
Purpose & Capability
The name/description (DeepSeek developer guide) matches the SKILL.md content: API examples, model descriptions, pricing and local deployment instructions. Nothing in the file asks for unrelated capabilities or secrets.
Instruction Scope
Instructions remain within the stated scope: sample API calls, streaming, reasoning outputs, Ollama and vLLM deployment commands, and hardware guidance. The SKILL.md does not instruct the agent to read local files or exfiltrate data. It does show example code that expects an API key but does not try to obtain it automatically.
Install Mechanism
No install spec or code files are present (instruction-only), so nothing is written to disk by the skill itself. The doc references third-party tools (ollama, vllm) which the user would install separately; that is expected for local model deployment.
Credentials
The skill declares no required env vars or credentials. Example snippets reference an API key (sk-xxx) which is appropriate for an API integration guide; no unrelated credentials or excessive environment access are requested.
Persistence & Privilege
The skill is not always-enabled and allows normal model invocation behavior. It does not request persistent system-level privileges or modify other skills' configs (no install actions present).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install deepseek-r1-guide
  3. After installation, invoke the skill by name or use /deepseek-r1-guide
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
DeepSeek R1 Guide 1.0.0 - 首发版本,提供 DeepSeek 全系列模型指南和接入说明 - 详细介绍 API 使用方法(Python、Node.js/curl 例子) - 覆盖模型选型、推理优化、本地部署及硬件需求 - 包含定价表与与主流模型的价格对比 - 总结常见使用场景和最佳实践
Metadata
Slug deepseek-r1-guide
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Deepseek R1 Guide?

DeepSeek AI 开发助手,精通 DeepSeek API、模型选型、推理优化、本地部署. It is an AI Agent Skill for Claude Code / OpenClaw, with 182 downloads so far.

How do I install Deepseek R1 Guide?

Run "/install deepseek-r1-guide" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Deepseek R1 Guide free?

Yes, Deepseek R1 Guide is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Deepseek R1 Guide support?

Deepseek R1 Guide is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Deepseek R1 Guide?

It is built and maintained by zhangifonly (@zhangifonly); the current version is v1.0.0.

💬 Comments