Skip to content

Repository files navigation

codex-deepseek-subagent:将 DeepSeek 注册为 Codex 原生子 Agent

deepseek-v4-flash 注册为 Codex 原生自定义子 Agent,并验证实际派发路由。管理程序只负责配置和验收;配置完成后的普通编码任务由当前主 Agent 直接派发。

本仓库是面向 Windows 原生 PowerShell 的本地化版本,保留 macOS 兼容逻辑。项目基于上游 oil-oil/codex-deepseek-subagent,与 OpenAI 或 DeepSeek 没有隶属、授权或官方背书关系。

This repository is a Windows-first adaptation for native PowerShell, while retaining macOS compatibility. It is based on oil-oil/codex-deepseek-subagent and is not affiliated with, sponsored by, or officially endorsed by OpenAI or DeepSeek.

适用范围

这个 Skill 只用于:

  • 首次配置、状态检查和实时测试;
  • 父模型变化后的修复;
  • 停用或卸载 DeepSeek 配置。

普通的编码、探索、实现、评审和验证任务不应重复运行配置流程。

DeepSeek 子 Agent 的配置和验证流程

快速开始

要求:Windows 原生模式或 macOS、Python 3.11+、ChatGPT/Codex 桌面应用,以及 DeepSeek 官方 API Key。Windows 下需让 Codex Agent 运行在 PowerShell,而不是 WSL。

  1. 全局安装 Skill:
npx skills add maxwellyin008/codex-deepseek-subagent-windows -g -y
  1. 重启桌面应用并新建任务,让 Skill 生效。

  2. 在新任务中发出配置请求:

帮我把 DeepSeek 配置成 Codex 的原生子 Agent。
  1. Codex 会先检查状态;缺少凭据时再索要 API Key,通过标准输入保存到系统凭据存储(Windows Credential Manager 或 macOS Keychain),然后自动配置并验收。

  2. 看到 status: ready 后,再重启桌面应用并新建任务。此后可直接说:

用 DeepSeek 子 Agent 检查这个项目。

配置成功后,角色文件位于 $CODEX_HOME/agents/DeepSeek.toml;默认 CODEX_HOME~/.codex

使用与兼容性

  • 日常任务只能由主 Agent 直接调用 spawn_agent(agent_type="DeepSeek", fork_turns="none")
  • 配置与验收只使用桌面应用内置运行时;版本仅作诊断,实际能力以真实派发结果为准。
  • 父模型从当前配置读取;切换父模型后运行 repair
  • DeepSeek 只处理文本。图片、视频、截图等视觉输入必须由父 Agent 先识别并整理成文字。
  • 当前工具若不认识 DeepSeek 角色,只提示用户打开新任务或重启 Codex;不得用脚本或 codex exec 代做用户任务。

v1/v2 路由原因、配置位置和回滚规则见 兼容性说明

管理命令

管理命令由 Skill 按需调用:

<python> codex-deepseek-subagent/scripts/codex_deepseek.py status --json
<python> codex-deepseek-subagent/scripts/codex_deepseek.py setup --api-key-stdin --json
<python> codex-deepseek-subagent/scripts/codex_deepseek.py test --json
<python> codex-deepseek-subagent/scripts/codex_deepseek.py repair --json
<python> codex-deepseek-subagent/scripts/codex_deepseek.py disable --json
<python> codex-deepseek-subagent/scripts/codex_deepseek.py uninstall --json

Windows 使用 python,macOS 通常使用 python3

setuptest 会创建隔离验收会话;这不是日常任务的替代入口。验收必须同时满足数据库路由元数据与子 Agent 返回口令:

model_provider = deepseek
model = deepseek-v4-flash
reasoning_effort = high
agent_role = DeepSeek
NATIVE_DEEPSEEK_OK

不能只相信子 Agent 的自述。

安全与回滚

  • API Key 只通过标准输入传入并保存到 Windows Credential Manager 或 macOS Keychain,不写入配置、临时文件或测试输出。
  • 配置和模型目录写入前会创建备份;解析或实时测试失败会恢复本次事务。
  • 不修改主任务的顶层模型或登录方式。

Skill 执行规则见 SKILL.md

品牌素材

Codex 图标来自官方 ChatGPT 应用资源,DeepSeek 图标来自 DeepSeek 官方 CDN。相关商标与品牌素材归各自权利人所有,本项目与 OpenAI 或 DeepSeek 无隶属或官方背书关系。

开发验证

<python> scripts/test_manager.py
<python> scripts/build_readme_assets.py

License

MIT

About

Windows-first Codex Skill for configuring and validating DeepSeek as a native sub-agent, with secure credential storage and real routing checks. 面向 Windows 原生 PowerShell 的 Codex Skill,将 DeepSeek 配置为 Codex 原生子 Agent,支持安全凭据存储与真实路由验收,并保留 macOS 兼容性。

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages