deepseek-reason

Runs reasoning completions against DeepSeek's deepseek-reasoner model and returns chain-of-thought separately.

70.1k|8.4k|Updated Jun 2, 2025
One-click install
npx skills add https://github.com/ruvnet/claude-flow --skill deepseek-reason
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deepseek-reason
Source: https://github.com/ruvnet/claude-flow/tree/main/plugins/ruflo-deepseek-harness/skills/deepseek-reason
Command: npx skills add https://github.com/ruvnet/claude-flow --skill deepseek-reason

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

DeepSeek's reasoner models return chain-of-thought mixed with the final answer, forcing callers to parse it out manually. This Skill surfaces the model's reasoning_content separately from the final content so you can display, audit, or discard the reasoning without extra parsing.

Core Features & Use Cases

  • Separated Chain-of-Thought: Returns reasoning_content and final content as distinct fields in the JSON output.
  • Reasoning Token Accounting: Surfaces reasoningTokens from usage details so you can attribute cost to thinking versus answering.
  • Graceful Degradation: Exits 0 with a status:degraded envelope when DEEPSEEK_API_KEY is missing or the API is unreachable.
  • Use Case: Ask the model to prove that sqrt(2) is irrational with --show-reasoning to inspect its full derivation before reading the final answer, useful for audits, training data, or sanity-checking hard bug triage.

Quick Start

Ask the agent to run the deepseek-reason skill with a prompt like "Prove that sqrt(2) is irrational" and show the reasoning alongside the final answer.

Frequently Asked Questions about deepseek-reason

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get chain-of-thought from DeepSeek's reasoner model?

Call the deepseek-reasoner model through /v1/chat/completions and read the reasoning_content field on the response message, which is separate from the final content. This skill extracts both fields automatically and returns them as distinct JSON keys.

How to run deepseek-reason from the command line?

Run node plugins/ruflo-deepseek-harness/scripts/reason.mjs with --prompt and optionally --system, --max-tokens, --show-reasoning, and --format table or json. The DEEPSEEK_API_KEY environment variable must be set for live calls.

Does deepseek-reasoner support temperature and top_p settings?

No. DeepSeek's specification ignores temperature and top_p for reasoner models, so this skill does not forward those parameters. Only model, messages, and max_tokens are sent to the API.

What happens when DEEPSEEK_API_KEY is missing or the API is down?

The skill degrades gracefully: it exits with code 0 and returns a status:degraded envelope instead of crashing. This lets calling pipelines continue without special error handling for missing credentials or network failures.

When should I use deepseek-reasoner instead of deepseek-chat?

Use the reasoner for multi-step reasoning tasks like proofs, plans, and root-cause analysis where seeing the thinking adds value. Choose deepseek-chat when latency and token cost matter more, since reasoning tokens are billed separately.