Introduction¶
Under DSH’s “everything is a plugin” philosophy, extending capabilities often goes beyond writing a single plugin: it also involves building, migrating to a standalone repository, committing, and mounting to the current session or profile. dsh-plugin-forge provides a forge_plugin tool called by AI, integrating this workflow into task execution.
It is maintained by csiroqa and is licensed under MIT. For DSH / agent developers, its value is turning “capability gaps” into checkable, commit-able standalone plugin repositories, and making them available in the current session whenever possible.
What is it¶
dsh-plugin-forge (package name @dsh-external/plugin-forge, version 0.1.0) is an AI-native DSH plugin generation tool. The core is the forge_plugin tool: AI calls it during task execution to complete sub-agent development, migration to a standalone git repository, English Conventional Commit commits, hot mounting, and profile installation.
Core Features¶
AI Invocation and Capability Gaps¶
forge_plugin is called by AI during task execution. Based on verified facts, it supports AI spontaneously discovering capability gaps and pushing requirements into a plugin repository.
When called, at least the requirement parameter must be provided; optional parameters include:
nametargetRootmigrateupdateinstallhot
Sub-agent Development and Quality Checks¶
The sub-agent is responsible for development and executes typecheck, test, and build.
The host side also performs:
- Smoke load check
- Host tool name conflict interception
- Diff check before commit
According to the security instructions in the README, the sub-agent only writes to the staging area (inside the working directory). If it fails, the staging area is retained for troubleshooting.
Migration, Committing, and Mounting¶
The plugin is migrated into a standalone git repository at project-root/dsh-plugins/<name> and is committed with an English Conventional Commit when the feature is complete.
After successful generation, the tool supports:
- Hot mounting to the current session/runtime
- Loading into the current profile, defaulting to automatic
push is disabled by default and only executes when explicitly configured; the tool does not automatically push/tag/release.
Duplicate Detection and Updates¶
If the sub-agent determines that it duplicates an existing plugin, the host will reject the new creation and return the name of the existing repository.
When iterating on an existing plugin, you can use update=true to update the existing repository.
Repository Source¶
The repository source panel line format is:
github:owner/repo#ref
For monorepo sub-packages, add:
&path:/packages/<sub-package>
Installation and Activation¶
Prerequisites¶
- Node ≥ 22
- pnpm
- Local
deepseek-harnesscheckout package.jsonmarkedprivate: true
Dependencies in this repository use local link: paths, so the installation commands usually correspond to the local development directory.
Local Installation Example from README¶
The following commands are from the README and are used for local link installation and building:
pnpm install && pnpm build
dsh plugin --profile web add link:D:\2-OGP\dsh-plugin-forge
The link:D:\2-OGP\dsh-plugin-forge above is a local path example from the original README; its universality cannot be confirmed. In actual use, it needs to be adjusted according to the local directory. Verified materials do not provide registry/npm installation commands other than the local link installation.
Restart dsh web after installation.
Typical Usage¶
View Plugin Repository Status¶
Use:
/forge status
This command is used to view the status of each plugin repository, including the HEAD, working directory, recent commits, and total commit count for each repository.
Real LLM Testing¶
The README provides the following commands:
node scripts/llm-e2e-host.mjs prompt <name> <stagingDir> <targetRoot> <harnessRoot> "<需求>"
node scripts/llm-e2e-host.mjs run <name> <stagingDir> <targetRoot> <harnessRoot> "feat: <name>: <摘要>"
These two commands are used for real LLM testing.
Applicable Scenarios and Notes¶
Suitable for¶
- Have a local
deepseek-harnesscheckout and want to generate plugin repositories from requirements in DSH - Need AI to call tools to complete development, building, committing, and mounting
- Need
/forge statusto view generated plugin repositories - Want hot mounting or loading into a profile after plugin generation
Notes¶
- Plugins run with the current
dshprocess permissions; source code and license should be checked before installation - License is MIT
- Only pass trusted requirements to
forge_plugin - Sub-agents will execute development, building, git commit, and other actions
- Does not automatically push/tag/release
- On failure (sub-agent incomplete / build fails after migration / smoke load check fails), it will throw, and staging is retained
Links¶
- Community directory page: https://www.skillhub.cn/plugins/csiroqa/dsh-plugin-forge
- GitHub: https://github.com/csiroqa/dsh-plugin-forge