Introduction¶
When reading open-source code, we often experience the situation of “understanding it this time, but forgetting it next time.” The dsh-codevault plugin is designed to address this problem. It records notes at the moment of understanding, groups them by repository, file, or symbol, and stores them in Markdown format so that they can be opened in Obsidian.
Plugin Overview¶
dsh-codevault is a plugin for DeepSeek Harness (DSH). It archives your understanding of open-source code. It is maintained by 1014029855. It addresses the problem of forgetting details during reading by organizing notes into cards.
Core Capabilities¶
The plugin provides the following features:
- Archive Notes: Archive records by repository, file, or symbol.
- Data Format: Stores Markdown + JSONL files that can be opened directly in Obsidian.
- Version History: Supports replaying version history to view card states at any point in time.
- Obsidian Integration: Integrates with Obsidian Vault (read-only search and automatic linking).
- Toolset: Includes 11 built-in tools (quick notes, deep reading, querying, deletion, history replay, etc.).
- Skill Framework: Provides the
code-readingskill framework for structured deep-reading notes.
Installation and Activation¶
Before installing the plugin, first confirm whether dsh-market has already been installed.
- In the terminal, run the following command to install the market (if this is the first time):
dsh plugin --profile web add dshmarket
-
Search for “dsh-codevault” in the DSH market and install it with one click.
-
Or install it manually:
dsh plugin --profile web add dsh-codevault
Restart dsh web. The installation is successful when the startup log shows [dsh-codevault] loaded.
Configuration¶
Data is written to <DSH_HOME>/data/dsh-codevault/ by default. It is recommended to point dataDir to an Obsidian vault (or a subdirectory of the vault).
Edit the cordis.patch.yml file in the profile:
# <DSH_HOME>/profiles/web/cordis.patch.yml
- id: dsh-codevault
config:
# 档案写入位置:默认 ~/.dsh/data/dsh-codevault;放进 Obsidian vault(或其子目录)最顺手
dataDir: 'D:/Obsidian/源码阅读'
# 可选:你的 Obsidian vault 根目录。配了之后模型才能只读搜你的笔记、给卡片挂链接
vaultDir: 'D:/Obsidian'
Changing dataDir/vaultDir will trigger cordis hot replacement and take effect in new sessions. Changing the environment variable DSCODEVAULT_DATA_DIR requires restarting dsh web.
Usage¶
The plugin provides 11 tools and the /codevault command, supporting quick notes, deep reading, history replay, and Vault linking.
- Quick Notes
When you reach a key point, ask the model to record it directly. For example:Note down what I just read: in deepseek-harness, src/core/plugin.ts, apply is the plugin entry point.
The model will write 2–4 key sentences and generate a title.
- Deep Reading
Perform an in-depth analysis of a mechanism. For example:Write a deep-reading note on cordis’s service injection mechanism.
The model will write according to the code-reading skill framework (object coordinates → mechanism → extraction/comparison → doubts and revisit), with a minimum length of 200 characters.
-
Rereading and Appending
When rereading the same object, you do not need to provide a title again. New events are appended to the timeline of the same card, the top-levelreadCountis incremented by one, and key points extracted from each pass are deduplicated and merged. -
Command Operations
Use the/codevaultcommand series:
-/codevault: Usage instructions.
-/codevault recent: Objects read recently.
-/codevault history: History replay.
-/codevault vault: Current data directory and Obsidian integration guidance. -
Vault Linking
After configuringvaultDir, you can use the following tools:
-vault_suggest: Search existing notes and find old notes worth linking.
-read_link: After confirmation, complete the structured link[[link]].
-vault_search/vault_read: Read-only search in your vault. -
Revisit and Delete
- Each note can include revisit questions, and a “Revisit Questions” section is generated at the end of the card.
- Say “delete the one just recorded,” and useread_deleteto remove the record (confirmation required).
- Useread_historyto replay the Nth reading or a version before a certain date.
Notes¶
- Local-Only Operation: The plugin does not connect to the network, does not call external APIs, does not read repositories, and only writes to its own data directory.
- Tag Discipline:
tagsonly accepts tags already present in the archive. If the archive has no tags yet, the tags in the first batch of notes become the starting vocabulary. UsenewTagsfor newly added topic terms afterward. - Operation Confirmation: Operations such as deleting records or upgrading to deep reading require user confirmation.
- No Scoring Mechanism: The plugin does not score notes and has no impression score; it only records what you have understood.
Conclusion¶
dsh-codevault aims to transform the code-reading process into traceable knowledge assets. Through event-stream storage and version replay, it helps you retain your understanding of code and build a visualized knowledge graph in Obsidian. For more details, visit GitHub.