# deepcode-skills **Repository Path**: newchina/deepcode-skills ## Basic Information - **Project Name**: deepcode-skills - **Description**: DeepCode Skills - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-08 - **Last Updated**: 2026-07-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 为 DeepCode 提供 Skills、对话记忆以及自动恢复能力 # A framework that adds Skills, Conversation Memory, and Self-Healing capabilities to DeepCode. 这是一个可迁移的 DeepCode 修复安装模板。Linux 优先:Linux/macOS 使用 `install.sh` 和 `check.sh` 作为主入口。Windows 兼容入口单独放在 PowerShell 脚本中,不影响 Linux 主路径。 主要功能是给DeepCode 独立安装一套 skill 文件和辅助脚本,让 DeepCode 按 Codex/Superpowers 的工作流习惯行动,但实际工具调用仍走 DeepCode 自己的 tools,解决 DeepCode 更新后 Skills、Memory、Superpowers 丢失的问题,通过自动检测与自恢复机制保持开发环境一致。 另外还有两个附加功能: - deepcode-memory:给 DeepCode 做会话历史镜像/搜索 - deepcode-self-heal:保证 skills、AGENTS.md、invoke-skill、memory 工具缺了能自动补回来 This is a portable DeepCode repair installation template. It is Linux-first: Linux/macOS use `install.sh` and `check.sh` as the primary entry points. Windows compatibility is provided through separate PowerShell scripts and does not affect the Linux path. The main function is to independently install a set of skill files and auxiliary scripts for DeepCode, enabling DeepCode to act in accordance with the workflow habits of Codex/Superpowers. However, the actual tool calls still follow DeepCode's own tools.Resolve the issue where Skills, Memory and Superpowers are lost after DeepCode update, by using automatic detection and self-recovery mechanisms to keep the development environment consistent. In addition, there are two additional functions: - deepcode-memory: To create a session history mirror/search for DeepCode - deepcode-self-heal: To ensure that if skills, AGENTS.md, invoke-skill, and memory tools are missing, they can be automatically restored ## 本次修复内容 / Recent Fixes - DeepCode skills now install into `~/.deepcode/skills//SKILL.md`, so the runtime no longer depends on `~/.agents/skills`. DeepCode skills are now installed under `~/.deepcode/skills//SKILL.md`, removing the runtime dependency on `~/.agents/skills`. - `using-superpowers` was changed from the aggressive `` instruction block to a bounded `` flow: load only clearly matching skills, avoid recursive chains, and keep thinking-mode skill selection short. `using-superpowers` now uses a bounded `` flow instead of the aggressive `` block: it loads only clearly matching skills, avoids recursive chains, and keeps thinking-mode skill selection short. - `AGENTS.md`, `invoke-skill`, and `deepcode-self-heal` now agree on the same skill root, preventing self-heal or sync from recreating `~/.agents/skills`. `AGENTS.md`, `invoke-skill`, and `deepcode-self-heal` now use the same skill root, preventing self-heal or sync from recreating `~/.agents/skills`. - The template now packages 22 skills, matching the repaired runtime skill set. The template now packages 22 skills, matching the repaired runtime skill set. ## Linux 快速安装 / Linux Quick Install 先检查模板和依赖: Check the template and dependencies first: ```bash cd /media/dawn/hdd_rebuilt/share/promise_work/deepcode-repair-project ./install.sh --check ``` 预演安装,不写入文件: Preview installation without writing files: ```bash ./install.sh --dry-run ``` 执行安装: Run installation: ```bash ./install.sh ``` 如果新环境的真实 DeepCode 程序不在默认位置,指定路径: If the real DeepCode binary is not in the default location on the new environment, pass its path: ```bash ./install.sh --real-binary /path/to/deepcode ``` 如果只是先铺好模板文件,真实 DeepCode 程序之后再安装: If you want to install the template files first and install the real DeepCode binary later: ```bash ./install.sh --force ``` ## Windows 兼容安装 / Windows Compatibility Install Windows 使用 PowerShell 入口。这个兼容层保留同样的项目结构和技能文件,但安装目标改为 Windows 用户目录。 Windows uses the PowerShell entry points. This compatibility layer keeps the same project structure and skill files, but installs into a Windows user profile. 在 PowerShell 中运行: Run in PowerShell: ```powershell cd X:\path\to\deepcode-repair-project .\check.ps1 .\install.ps1 -DryRun .\install.ps1 ``` 如果当前系统禁止运行 PowerShell 脚本,可以用 `.cmd` 启动器: If the current system blocks direct PowerShell script execution, use the `.cmd` launchers: ```cmd check-windows.cmd install-windows.cmd ``` 指定真实 DeepCode 程序路径: Set the real DeepCode executable path: ```powershell .\install.ps1 -RealBinary "C:\Path\To\deepcode.exe" ``` 如果只是先安装模板文件,真实 DeepCode 程序之后再补: If you only want to install the template files first and add the real DeepCode binary later: ```powershell .\install.ps1 -Force ``` Windows 会安装到: Windows installs to: ```text %USERPROFILE%\bin\deepcode.ps1 %USERPROFILE%\bin\deepcode-self-heal.ps1 %USERPROFILE%\bin\deepcode-memory.ps1 %USERPROFILE%\.deepcode\invoke-skill.ps1 %USERPROFILE%\.deepcode\AGENTS.md %USERPROFILE%\.deepcode\repair.windows.json %USERPROFILE%\.deepcode\skills\\SKILL.md ``` ## 换环境用法 / Moving To Another Environment 默认安装到当前用户的 `$HOME`。如果要安装到另一个用户主目录: By default, installation targets the current user's `$HOME`. To install into another user home: ```bash ./install.sh --prefix /home/target-user --real-binary /home/target-user/.local/bin/deepcode ``` 也可以复制配置模板: You can also copy the configuration template: ```bash cp install.conf.example install.conf ``` 然后在 `install.conf` 里设置: Then set values in `install.conf`: ```bash DEEPCODE_REPAIR_HOME=/home/target-user DEEPCODE_REAL_BINARY=/home/target-user/.local/bin/deepcode DEEPCODE_REPAIR_SKIP_HEAL=0 DEEPCODE_REPAIR_ALLOW_MISSING_OPTIONAL=0 ``` 环境变量也可以覆盖配置文件: Environment variables can also override the config file: ```bash DEEPCODE_REPAIR_HOME=/home/target-user ./install.sh ``` Windows 可以复制配置模板: On Windows, copy the Windows config template: ```powershell Copy-Item install.windows.conf.example.ps1 install.windows.conf.ps1 ``` 然后设置: Then set: ```powershell $DeepCodeRepairHome = 'C:\Users\TargetUser' $DeepCodeRealBinary = 'C:\Path\To\deepcode.exe' $DeepCodeRepairSkipHeal = $false $DeepCodeRepairAllowMissingOptional = $false ``` ## 安装内容 / What Gets Installed - `~/bin/deepcode` DeepCode 启动包装器;读取 `~/.deepcode/repair.env` 里的真实 DeepCode 路径。 DeepCode launcher wrapper; reads the real DeepCode path from `~/.deepcode/repair.env`. - `~/bin/deepcode-self-heal` 自修复脚本;重建必要的 DeepCode 辅助文件、技能和链接。 Self-heal script; recreates required DeepCode helper files, skills, and links. - `~/bin/deepcode-memory` 记忆备份工具;同步和搜索 DeepCode 会话备份。 Memory backup tool; syncs and searches DeepCode session backups. - `~/bin/deepcode-session-patch` DeepCode 会话命令补丁工具;为真实 DeepCode 程序增加外部 `resume` 和 `sessions` 命令。 Session command patch helper; adds external `resume` and `sessions` commands to the real DeepCode binary. - `~/.deepcode/invoke-skill` 技能加载备用命令。 Fallback command for listing and loading skills. - `~/.deepcode/AGENTS.md` DeepCode 操作说明。 DeepCode operating instructions. - `~/.deepcode/repair.env` 安装时写入的真实 DeepCode 程序路径。 Installed environment file containing the real DeepCode binary path. - `~/.deepcode/skills//SKILL.md` DeepCode 可见的技能文件。 Skill files visible to DeepCode. ## 项目结构 / Project Layout ```text deepcode-repair-project/ bin/ deepcode deepcode-memory deepcode-session-patch deepcode-self-heal deepcode/ AGENTS.md invoke-skill windows/ bin/ deepcode.ps1 deepcode-memory.ps1 deepcode-self-heal.ps1 deepcode/ invoke-skill.ps1 check.ps1 install.ps1 skills/ deepcode-memory/SKILL.md deepcode-tool-use/SKILL.md superpowers-entrypoint/SKILL.md using-superpowers/SKILL.md systematic-debugging/SKILL.md test-driven-development/SKILL.md verification-before-completion/SKILL.md ... check.sh check.ps1 install.sh install.ps1 install-windows.cmd check-windows.cmd install.conf.example install.windows.conf.example.ps1 MANIFEST.md README.md ``` ## 安装选项 / Installer Options ```text ./install.sh [options] --check 检查模板文件、依赖和目标 HOME。 Check project files, dependencies, and target HOME. --dry-run 只显示将安装什么,不写入文件。 Show what would be installed without writing files. --prefix 安装到指定用户主目录。 Install into a specific user home directory. --real-binary 指定真实 DeepCode 程序路径。 Set the real DeepCode binary path. --force 即使真实 DeepCode 程序还不存在,也继续安装。 Continue even if the real DeepCode binary is not present. --skip-heal 安装后不运行自修复。 Do not run self-heal after installing files. ``` Windows PowerShell 选项: Windows PowerShell options: ```text .\install.ps1 [options] -Check 检查模板文件、依赖和目标用户目录。 Check project files, dependencies, and target user profile. -DryRun 只显示将安装什么,不写入文件。 Show what would be installed without writing files. -Prefix 安装到指定 Windows 用户目录。 Install into a specific Windows user profile. -RealBinary 指定真实 DeepCode 程序路径。 Set the real DeepCode executable path. -Force 即使真实 DeepCode 程序还不存在,也继续安装。 Continue even if the real DeepCode binary is not present. -SkipHeal 安装后不运行自修复。 Do not run self-heal after installing files. ``` 安装时如果目标文件已经存在,会先备份到: If a target file already exists, it is backed up first under: ```text ~/.deepcode/repair-backups// ``` ## 验证 / Verify 安装后运行: After installation, run: ```bash deepcode-self-heal --check deepcode-session-patch --check deepcode-memory check invoke-skill --list ``` Windows 安装后运行: After Windows installation, run: ```powershell & "$env:USERPROFILE\bin\deepcode-self-heal.ps1" -Check & "$env:USERPROFILE\bin\deepcode-memory.ps1" check & "$env:USERPROFILE\.deepcode\invoke-skill.ps1" --list ``` 预期结果: Expected result: - `deepcode-self-heal --check` 报告可见技能文件数量。 `deepcode-self-heal --check` reports the number of visible skill files. - `deepcode-session-patch --check` 报告真实 DeepCode 程序已有外部 session 命令补丁。 `deepcode-session-patch --check` reports that the real DeepCode binary has the external session command patch. - `deepcode-memory check` 在已有同步后报告备份里的 JSONL 会话数量。 `deepcode-memory check` reports JSONL sessions in the backup after a sync has happened. - `invoke-skill --list` 显示 DeepCode 可见的技能。 `invoke-skill --list` shows skills visible to DeepCode. ## 日常使用 / Daily Use 启动 DeepCode: Start DeepCode: ```bash deepcode ``` Windows 启动: Start on Windows: ```powershell & "$env:USERPROFILE\bin\deepcode.ps1" ``` 包装器会先运行自修复,再同步记忆,然后启动 `~/.deepcode/repair.env` 中配置的真实 DeepCode 程序。DeepCode 退出后,包装器会再次同步记忆。 The wrapper runs self-heal, syncs memory, and then starts the real DeepCode binary configured in `~/.deepcode/repair.env`. After DeepCode exits, it syncs memory again. ## 会话命令 / Session CLI Linux 安装会通过 `deepcode-session-patch` 给真实 DeepCode 程序增加类似 Codex 的外部会话命令,并把原生 `/skills` 的用户级技能目录改为 `~/.deepcode/skills`。自修复会在启动前检查并补回这个补丁,因此 DeepCode npm 包更新后也可以恢复。 Linux installs add Codex-style external session commands to the real DeepCode binary through `deepcode-session-patch`, and redirects native `/skills` user-level discovery to `~/.deepcode/skills`. Self-heal checks and restores this patch before startup, so it can recover after DeepCode npm package updates. 列出当前项目最近的会话: List recent sessions for the current project: ```bash deepcode sessions deepcode sessions 20 ``` 列出所有项目的会话: List sessions from all projects: ```bash deepcode sessions --all ``` 恢复会话: Resume sessions: ```bash deepcode resume deepcode resume --last deepcode resume deepcode resume "继续处理这个问题" ``` 检查或重新应用补丁: Check or reapply the patch: ```bash deepcode-session-patch --check deepcode-session-patch --heal ``` 常用命令: Useful commands: ```bash deepcode-memory sync deepcode-memory status deepcode-memory sessions 20 deepcode-memory latest 10 deepcode-memory search deepcode resume --last deepcode-self-heal --heal invoke-skill --sync invoke-skill --list invoke-skill ``` ## 注意事项 / Notes - 这个模板不包含 `~/.deepcode/projects` 或 `~/.deepcode/memory-backup` 中的私人对话数据。 This template does not include private conversation data from `~/.deepcode/projects` or `~/.deepcode/memory-backup`. - 脚本需要 Bash、Node.js、`rsync` 和常见 GNU/Linux 命令行工具。 The scripts require Bash, Node.js, `rsync`, and common GNU/Linux command-line tools. - 如果新环境的 PATH 里没有 `~/bin`,需要把它加入 PATH,或者用完整路径运行 `~/bin/deepcode`。 If `~/bin` is not in PATH on the new environment, add it to PATH or run `~/bin/deepcode` directly.