Agent skill · creative production · aradotso
deepseek-v4-roleplay-instruct
deepseek-v4-roleplay-instruct — an agent skill for coding agents.
Why this skill is useful
Provides specific prompt markers for controlling DeepSeek-V4's thinking modes, which are not commonly known or documented.
What it needs
Requires deepseek account access. About 4k tokens when loaded. Last updated 2026-07-09. 70 stars on the source repository.
What this skill does
python INNEROSMARKER = ( "\n\n【角色沉浸要求】在你的思考过程(<think>标签内)中,请遵守以下规则:\n" "1. 请以角色第一人称进行内心独白,用括号包裹内心活动,例如"(心想:……)"或"(内心OS:……)"\n" "2. 用第一人称描写角色的内心感受,例如"我心想""我觉得""我暗自"等\n" "3. 思考内容应沉浸在角色中,通过内心独白分析剧情和规划回复" ) python NOINNEROSMARKER = ( "\n\n【思维模式要求】在你的思考过程(<think>标签内)中,请遵守以下规则:\n" "1. 禁止使用圆括号包裹内心独白,例如"(心想:……)"或"(内心OS:……)",所有分析内容直接陈述即可\n" "2. 禁止以角色第一人称描写内心活动,例如"我心想""我觉得""我暗自"等,请用分析性语言替代\n" "3. 思考内容应聚焦于剧情走向分析和回复内容规划,不要在思考中进行角色扮演式的内心戏表演" ) bash git clone https://github.com/victorchen96/deepseekv4rolepalyinstruct bash export DEEPSEEKAPIKEY=yourapikeyhere python import os from openai import OpenAI # DeepSeek uses OpenAI-compatible API INNEROSMARKER = ( "\n\n【角色沉浸要求】在你的思考过程(<think>标签内)中,请遵守以下规则:\n" "1. 请以角色第一人称进行内心独白,用括号包裹内心活动,例如"(心想:……)"或"(内心OS:……)"\n" "2. 用第一人称描写角色的内心感受,例如"我心想""我觉得""我暗自"等\n" "3. 思考内容应沉浸在角色中,通过内心独白分析剧情和规划回复" ) NOINNEROSMARKER = ( "\n\n【思维模式要求】在你的思考过程(<think>标签内)中,请遵守以下规则:\n" "1. 禁止使用圆括号包裹内心独白,例如"(心想:……)"或"(内心OS:……)",所有分析内容直接陈述即可\n" "2. 禁止以角色第一人称描写内心活动,例如"我心想""我觉得""我暗自"等,请用分析性语言替代\n" "3. 思考内容应聚焦于剧情走向分析和回复内容规划,不要在思考中进行角色扮演式的内心戏表演" ) def buildmessages(systemprompt: str, userfirstmessage: str, mode: str = "default") -> list[dict]: """ Build the initial messages list with the appropriate thinking-mode marker. Args: systemprompt: The character/scenario system prompt. userfirstmessage: The player's opening action/line. mode: "inneros" → character immersion (inner monologue) "noinneros" → pure analysis (no inner voice) "default" → let the model decide Returns: A messages list ready for the DeepSeek API. """ if mode == "inneros": userfirstmessage += INNEROSMARKER elif mode == "noinneros": userfirstmessage += NOINNEROSMARKER return [ {"role": "system", "content": systemprompt}, {"role": "user", "content": userfirstmessage}, ] python import os from openai import OpenAI client = OpenAI( apikey=os.environ["DEEPSEEKAPIKEY"], baseurl="https://api.deepseek.com/v1", ) INNEROSMARKER = ( "\n\n【角色沉浸要求】在你的思考过程(<think>标签内)中,请遵守以下规则:\n" "1. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aradotso/deepseek-v4-roleplay-instruct