Introduction

In the DSH workflow, structural issues with long Markdown documents usually require line-by-line checks: whether heading levels skip, if H1 is unique, if heading text is duplicated, and if code fences are closed. dsh-plugin-md-outline integrates these checks as DSH tools. Below introduces its positioning, capabilities, and usage.

What is it

dsh-plugin-md-outline is a DeepSeek Harness plugin maintained by d-ouyang with an MIT license. It adds the md_outline tool to output a heading tree for Markdown documents and check for structural issues.

This plugin requires the dsh CLI to be installed locally. The plugin itself is plain ESM JavaScript without a build step and no allowBuilds prompt.

Core Features

The md_outline tool provides the following capabilities:

  • Adds the md_outline tool.
  • Outputs a nested heading tree for H1–H6 with line numbers.
  • Detects heading level skipping, for example H1 → H3.
  • Marks duplicate heading text.
  • Detects missing H1 or multiple H1s.
  • Detects unclosed code fences and ignores headings within fences.
  • Supports mode: outline, lint, both.
  • Supports maxDepth to limit outline nesting.
  • Supports recursive scanning when path is a directory.

Installation and Usage

First, confirm that the dsh CLI is installed locally. Then install from the GitHub repository:

dsh plugin add https://github.com/d-ouyang/dsh-plugin-md-outline.git

After the steps above, the md_outline tool can be used in DSH tool calls. This plugin declares @deepseek-ai/dsh-tools as a peerDependency and does not fetch this dependency from the registry.

If you need to remove the plugin, you can use:

dsh plugin remove dsh-plugin-md-outline

Typical Usage

In natural language calls, you can ask the model to perform a structural check on the document:

Create an outline for ~/book/draft.md and tell me about structural issues.

You can also call the tool directly in code:

await tools.md_outline({ path: '~/book/draft.md', mode: 'both' })
await tools.md_outline({ path: '~/skills', mode: 'lint', recursive: true })
await tools.md_outline({ path: '~/notes/spec.md', mode: 'outline', maxDepth: 2 })

These three examples represent: outputting an outline and structural check for a single document simultaneously; linting a directory with recursive scanning; and outputting a limited-depth outline for a single document.

If there is a repository example script locally, you can also run:

node examples/run.mjs

Use Cases and Notes

This plugin is suitable for users who want to integrate Markdown structural checks into DSH tool calls, especially for checking Markdown files within a single document or directory.

Please check the source code and license before installation and confirm that the runtime environment is trusted. The plugin runs with the permissions of the current dsh process; it relies on the dsh CLI and declares @deepseek-ai/dsh-tools as a peerDependency, fetching nothing from the registry. The README mentions using the dsh-plugin GitHub topic to facilitate finding related plugins by topic; the community directory is an independent site and has no official affiliation with DeepSeek / Hyperscience.

Links

  • Directory Page: https://www.skillhub.cn/plugins/d-ouyang/dsh-plugin-md-outline
  • GitHub: https://github.com/d-ouyang/dsh-plugin-md-outline