deepseek-harness

deepseek-harness is a skill for Claude Code from HenryZ838978/deepseek-harness. It costs 144 tokens per session (1,958 once invoked), scanned A, original, MIT.

A set of rules for calling DeepSeek V4-Pro or V4-Flash through an OpenAI-compatible API. An API is a programmatic way for software to send requests to a service and receive responses.

In plain words
What is it for?
Use it when configuring Python or TypeScript DeepSeek calls, controlling thinking mode and preserving reasoning content in multi-turn tool-calling conversations.
Why use it?
It helps avoid documented request and conversation-handling bugs when using DeepSeek models, including unnecessary reasoning and missing response data.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: positional $N argument; built for cline.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python reports/probes/probe_2_reasoning_lifecycle.py --n 3.

Good fit Use it when configuring Python or TypeScript DeepSeek calls, controlling thinking mode and preserving reasoning content in multi-turn tool-calling conversations.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/HenryZ838978/deepseek-harness
agentmods
npx agentmods add skills/henryz838978/deepseek-harness/skill

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deepseek-harness

README.md
[![agentmods](https://agentmods.dev/badge/skills/henryz838978/deepseek-harness/skill/github.svg)](https://agentmods.dev/skills/henryz838978/deepseek-harness/skill)
Your own site
<a href="https://agentmods.dev/skills/henryz838978/deepseek-harness/skill"><img src="https://agentmods.dev/badge/skills/henryz838978/deepseek-harness/skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for deepseek-harness

Your own site · 80×15
<a href="https://agentmods.dev/skills/henryz838978/deepseek-harness/skill"><img src="https://agentmods.dev/badge/skills/henryz838978/deepseek-harness/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,958 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 7
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium MCP Rug Pull · line 139
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00144 $0.01958
Opus 5 $0.00072 $0.00979
Sonnet 5 $0.00029 $0.00392
Haiku 4.5 $0.00014 $0.00196

Measured 9d ago against content hash 4343ee57f281, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

deepseek-harness scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/safe_init.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/skill/SKILL.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DeepSeek V4 Harness

When you call DeepSeek V4-Pro or V4-Flash via the OpenAI-compatible API, you MUST follow the 10 contract rules below. Violating any one of them causes a documented production bug (the upstream issue and our reproduction probe are cited per rule).

The 10 contract rules (ranked by blast radius)

C1 · Disable thinking unless the task is genuinely reasoning-heavy

deepseek-v4-pro defaults to thinking=enabled. Every call then burns 30-300 reasoning_tokens even on trivial prompts.

client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=messages,
    extra_body={"thinking": {"type": "disabled"}},  # ← saves money on every non-reasoning call
)

For TypeScript / openai-node, put thinking at the top level of the request, not inside extra_body (the JS SDK passes unknown top-level keys through):

await openai.chat.completions.create({
  model: "deepseek-v4-pro",
  messages,
  thinking: { type: "disabled" },
} as any);

C2 · In multi-turn loops, preserve reasoning_content on assistant messages

If thinking IS enabled and you re-send a prior assistant message that has tool_calls, you must include the original reasoning_content field. Otherwise the next request returns:

HTTP 400: The reasoning_content in the thinking mode must be passed back to the API.

(Reproduced in reports/probes/probe_2_reasoning_lifecycle.py 3/3 trials on V4-Pro and V4-Flash, 2026-05-09.)

msg = response.choices[0].message
history.append({
    "role": "assistant",
    "content": msg.content,
    "tool_calls": _serialize_tool_calls(msg.tool_calls),
    "reasoning_content": getattr(msg, "reasoning_content", None),  # ← REQUIRED
})

When a NEW user turn arrives, you MAY strip reasoning_content from prior assistant messages — DeepSeek doesn't require it across user-turn boundaries, and keeping it bloats the prefix-cache key.

C3 · Always set max_tokens (default 4096)

Without an output cap, reasoning_content can stream 8000+ chunks (probes/probe_9_reasoning_runaway.py measured 26 KB / 84 s on a self-doubt prompt) and downstream Electron clients (ChatWise, Cherry Studio) crash with RangeError: Invalid string length once their string buffer hits V8's 512 MB ceiling.

Read the full file on GitHub · 160 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 160 lines · 144 tokens per session scan A 4343ee57f281

Subscribe to this mod's changes

deepseek-harness is a skill published in the GitHub repository HenryZ838978/deepseek-harness (49 stars, last pushed 2d ago), licensed MIT. It adds 144 tokens to every session and 1,958 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories