Jaylor-Wang/dsh-tool-ast-grep

AST-based structural code search and outline plugin for DeepSeek Harness powered by ast-grep: ast_search matches structural patterns with meta-variables ($NAME, $$$), node kinds and strictness modes across formatting and whitespace, and ast_outline extracts an ultra-compact structural outline (functions, classes, types, interfaces, exports) that saves 80-95% of the tokens of reading the whole file. It is invoked via child processes with JSON streaming, so it avoids shell quoting pitfalls.

dsh-tool-ast-grep adds AST-based structural code search and outline inspection to DeepSeek Harness, powered by ast-grep, for coding agents that would otherwise rely on regular-expression grep. Its ast_search tool matches structural patterns using meta-variables ($NAME, $$$), finds patterns across multiple lines regardless of formatting or whitespace, supports node-kind queries such as function_declaration or interface_declaration, offers smart/relaxed/ast/cst strictness modes and file-path or glob filtering; its ast_outline tool extracts an ultra-compact structural outline (functions, classes, types, interfaces, exports) with depth control, saving 80-95% of the tokens of reading the whole file. Both are invoked safely via child processes with JSON streaming, so they are immune to Windows shell argument escaping and quoting pitfalls.

Coding & Development ★ 2
View on GitHub ↗

Install

dsh plugin --profile web add dsh-tool-ast-grep

Copied verbatim from the README's install block; it requires the ast-grep CLI (npm install -g @ast-grep/cli).

Compatibility

Prerequisite: the ast-grep CLI (npm install -g @ast-grep/cli). Exposes the ast_search and ast_outline tools to the DSH agent. English README with a 中文 translation.

Details

Alternatives

030611/dsh-context-provenance · 030611/qiushi-dsh-evidence-audit · 0x3fffff/dsh-desktop-launcher

More plugins in Coding & Development

Browse more in Coding & Development

Guides for Coding & Development plugins