@chtholly-fan/dsh-cpp-optimization: Perform low-level code review based on real engineering C++ standards

Preface

When asking models to modify C++ code in DSH, the common issue is not whether they can “write syntactically correct code,” but rather the drift in review criteria: the project actually uses C++14, yet the response mixes in C++20 std::span; or it discusses RAII in general terms without cross-referencing the current project’s compilation options and ABI constraints. It is difficult for general conversations to stably achieve “first clarify the standard, then provide conclusions based on checkpoints.”

Below is an introduction to the bundle plugin @chtholly-fan/dsh-cpp-optimization, published by community maintainer ChthollyFan. Upon installation, it provides the skill cpp-opt-audit, designed for reviewing and writing low-level C++. By default, it first produces an evidence-based report, and only modifies code after user confirmation.

What is this

@chtholly-fan/dsh-cpp-optimization is a bundle plugin package for DeepSeek Harness (DSH), categorized under workflows. Its core artifact is the skill cpp-opt-audit, used to review or write “fast and safe” low-level C++.

Hard constraints are written in the skill entry: First confirm the target project’s actual C++ standard; if it cannot be detected, ask the user. Until the standard is confirmed, do not recommend or write any features higher than that standard. Each conclusion is organized according to four elements: “Checkpoint / Why / Counter-example to Positive example / Applicable Standard,” avoiding slogans without evidence.

Core Features

Two-stage Workflow

The skill defaults to read-only review: it outputs a structured report and only enters the code modification phase after obtaining user consent. This is suitable for viewing priorities and risk surfaces before actually modifying files.

Checkpoints Covered by Dimension

Under assets/cpp-opt-audit/, checkpoints are organized using ten reference files (Type Safety and ABI/Interface Design are combined into one dimension), mainly including:

  1. RAII and Ownership (15 items)
  2. Move Semantics and Value Categories (12 items)
  3. Exception Safety (14 items)
  4. Performance and Memory (13 items)
  5. Containers and Algorithms (7 items)
  6. Concurrency Safety (14 items)
  7. Templates and Compile-time (9 items)
  8. Standard Boundaries and C++20/23 Mechanisms (24 + 11 items)
  9. Type Safety and ABI (13 items)
  10. Object Semantics and Interface Design (13 items)

Additionally, standard-detection.md describes standard detection and __cplusplus verification, while audit-report-template.md defines the report structure and P0/P1/P2 grading. The end of each reference file lists topics not yet covered, preventing “not checked” from being treated as “no problem.”

Trigger Methods

  • Automatic Model Trigger: When a task involves C++ code review, optimization, or low-level implementation, the session directory prompts the model to load this skill first.
  • Explicit User Invocation: Enter /cpp-opt-audit in the session.

The plugin registers the skill provider via ctx.skills.registerProvider; get() re-reads the content every time, so if only the skill file content changes, there is no need to reinstall (if replacing an installed package with the same name, a restart is required to load the new module).

Installation and Activation

Use the dsh CLI to install to a specified profile. The example below installs to web; tui, desktop, etc., are similar:

dsh plugin --profile web add @chtholly-fan/dsh-cpp-optimization

Parameters following dsh plugin are passed directly to pnpm. When installing from a local directory, replace the package name with the absolute path to the repository directory:

dsh plugin --profile web add <absolute path to this repository directory>

This package is a bundle plugin: upon installation, it writes to the package dependencies of that profile and selects this package’s cordis.patch.yml. Do not manually modify the profile’s package.json or cordis.patch.yml, and do not run pnpm in the profile directory.

Alternative: In a DSH session, let the agent use install_bundle from plugin_manager, passing the package name or directory absolute path as target.

After installation, cpp-opt-audit is generally visible in the session directory without needing a restart. The package requires Node >=20 and is licensed under MIT.

Typical Usage

  1. Open a session related to the target C++ project under the profile where the plugin is installed.
  2. Directly input /cpp-opt-audit, or describe tasks like “review this low-level C++ / optimize the hot path / check exception safety,” and wait for the model to load the skill.
  3. Read the first-stage report (including grading and the four elements) and confirm whether to allow code modifications based on the report.
  4. After agreeing, let the model execute the modifications; if the standard is still unclear, supplement the project standard information first as required by the skill.

If you do not want to install the plugin, you can copy the entire assets/cpp-opt-audit/ directory to the skill scan root, such as user-level ~/.dsh/skills/cpp-opt-audit/ or project-level <project root>/.dsh/skills/cpp-opt-audit/. The directory name is the skill name.

Applicable Scenarios and Notes

Suitable for: Teams or individuals who need reproducible low-level C++ reviews in DSH; who want conclusions bound to the project’s actual standards; who want to view graded reports before modifying code.

Notes:

  • The plugin runs with the permissions of the current dsh process. Before installation, please check the GitHub repository source code and MIT license yourself.
  • The community directory SkillHub Plugin Page has no official affiliation with DeepSeek or Quantilla; the DSH ecosystem emphasizes “everything is a plugin,” and the directory is an independent site, not an official app store.
  • Checkpoints, no matter how comprehensive, cannot replace CI, static analysis, and manual review; uncovered topics are explicitly stated in the reference files.

Conclusion

@chtholly-fan/dsh-cpp-optimization bundles “standard boundaries + dimension-based checkpoints + report first, then modify code” into a single skill, suitable for stably reviewing low-level C++ in Harness sessions. See above for installation commands; details and file structure are subject to the repository README.

  • Directory Page: https://www.skillhub.cn/plugins/ChthollyFan/dsh-cpp-optimization
  • GitHub: https://github.com/ChthollyFan/dsh-cpp-optimization
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye