deepseek-minimal-anchor — Claude Code hook: setup and features
deepseek-minimal-anchor adjusts DeepSeek default reasoning behavior in Claude Code and Codex. It injects working anchors at session start, guides prompts per turn, and logs trajectory reports.
MIT ★ 1,596 updated 2026-10-29
.claude/settings.jsonWhat deepseek-minimal-anchor does
The hook bundle addresses weak default reasoning in DeepSeek models when paired with Codex. It also includes an evaluation harness based on BigCodeBench to track performance across tasks.
Three lifecycle triggers handle the automation: SessionStart, UserPromptSubmit, and SessionEnd. Starting or compacting a session runs anchor-session.mjs with a 3000 token limit. Each user prompt triggers maintain-mode.mjs within a 2500 token window, while finishing a session triggers report-trajectory.mjs under a 3-second timeout.
All scripts execute via node. Node.js must be present in your environment for the automation to run.
What it helps with
- fix weak default reasoning in DeepSeek models inside Codex
- inject routing personas and contracts at session initialization
- maintain reasoning mode guidance across individual user prompts
- generate a trajectory summary when a session terminates
Example prompts for the agent
- Refactor the authentication handler and verify edge cases
- Analyze the database schema migration and draft the rollback steps
How to install deepseek-minimal-anchor
Manually: put the files in place
.claude/settings.jsonThe hooks block: event (PreToolUse, PostToolUse, Stop…) → command. Personal ones go to ~/.claude/settings.json
Step by step, with commands for each platform: Claude Code hooks: what they are, where to configure them, how to block a risky command
Questions about deepseek-minimal-anchor
How to install deepseek-minimal-anchor in Claude Code?
Add the hook configuration block into your .claude/settings.json file.
What does deepseek-minimal-anchor do?
It manages DeepSeek prompts across session lifecycles, applying minimal anchors, guiding turns, and writing trajectory reports.
What dependencies are required to run these hooks?
Node.js must be installed and callable from the command line because each event executes an .mjs script via node.
Source text
hooks.json · MIT
Hooks bundle shipped with the deepseek-minimal-anchor plugin for Claude Code.
Task-aware spec/react/flash working-contract plugin that fixes DeepSeek weak default reasoning inside Codex, with a measured BigCodeBench harness included.
Triggers on: UserPromptSubmit, SessionStart, SessionEnd.
```json
{
"description": "DeepSeek mini-router: Pro gets the Minimal one-sentence anchor, Flash gets the decide-and-verify router persona at session start (including compact re-anchor), Flash-only per-turn guidance, and a best-effort trajectory report.",
"hooks": {
"SessionStart": [
{
"matcher": "startup|resume|clear|compact",
"hooks": [
{
"type": "command",
"command": "node \"${PLUGIN_ROOT}/scripts/anchor-session.mjs\"",
"timeout": 10,
"additionalContextLimit": 3000,
"statusMessage": "DeepSeek mini-router"
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "node \"${PLUGIN_ROOT}/scripts/maintain-mode.mjs\"",
"timeout": 10,
"additionalContextLimit": 2500,
"statusMessage": "DeepSeek mode guidance"
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "node \"${PLUGIN_ROOT}/scripts/report-trajectory.mjs\"",
"timeout": 3
}
]
}
]
}
}
```
© Hzz · MIT · hashgraph-online/awesome-codex-plugins