Introduction¶
In plugin frameworks like DSH, agents can execute complex workflows within a session. If only the results are kept without preserving the “how,” similar tasks in the future may require repeating trial and error. dsh-skill-manage addresses this issue by providing the skill_manage tool to agents for creating, patching, disabling, deleting skills, and adding safeguards during deletion and modification.
What is it¶
dsh-skill-manage is a DSH (DeepSeek Harness) plugin maintained by fuxin123z and licensed under the MIT license. It translates procedural memory into maintainable skill files, allowing agents to manage their own skills via the skill_manage tool.
Repository address:
https://github.com/fuxin123z/dsh-skill-manage
Core Features¶
skill_manage Tool¶
The plugin provides the skill_manage tool supporting the following actions:
createpatcheditdeletedisableenablepinunpinwrite_fileremove_filelist
Scope¶
Supports two scopes:
scope: 'user': writes to~/.dsh/skills, applicable to all workspaces.scope: 'project': writes to<projectRoot>/.dsh/skills, applicable to the current workspace.
Skill Layout¶
Supports two on-disk layouts:
- Directory skills:
<root>/<name>/SKILL.md - Single-file skills:
<root>/<name>.md
Disabling and Enabling¶
disable / enable are implemented by toggling disable-model-invocation in the SKILL.md frontmatter.
Pinning and Unpinning¶
pin / unpin are implemented by toggling the pinned flag in the frontmatter. pinned: true prevents deletion.
Deletion Protection¶
Deletion operations in skill_manage are subject to the following restrictions:
- Only skills with the
created_by: agenttag can be deleted. pinned: trueprevents deletion.- Skill root path restrictions.
- Rejected symlinked skill directories.
patch/editcannot implicitly rename.
Validation and Writing¶
The plugin validates skill content:
- Name regex and length validation.
- Frontmatter must contain
name+description. description≤ 1024 characters.SKILL.md≤ 100k characters.- Auxiliary files ≤ 1 MiB.
- Auxiliary paths restricted to
references/ templates/ scripts/ assets/.
Regarding writing:
- Uses temp + rename for atomic writes.
- Supports CRLF-safe frontmatter parsing.
- Hot-reload watcher based on
skill-filesystem.
Installation and Usage¶
Recommended Installation¶
Execute the following command to add the plugin to the web profile:
dsh plugin --profile web add dsh-skill-manage
Manual Installation¶
Execute in the DSH profile directory:
npm install dsh-skill-manage
This step adds plugin dependencies. Then, add dsh-skill-manage to dsh.profile.bundles in package.json, and restart dsh web.
No configuration is required for the plugin. When you see:
[dsh-skill-manage] ready
it indicates the plugin is loaded.
Typical Usage¶
After installation, the agent can call the skill_manage tool to operate on skill files:
- Use
createto create a new skill. - Use
patch/editto modify a skill. - Use
write_file/remove_fileto maintain auxiliary files. - Use
disable/enableto toggle skill status. - Use
pin/unpinto decide if deletion is allowed. - Use
listto view skills.
If you only want to temporarily disable a skill, you can use disable; if a skill needs to avoid being deleted, you can use pin.
Development and Testing¶
When developing or debugging, you can run:
node test.mjs
This runs guard-level smoke tests. Then, run:
node loadtest.mjs
This runs host-shape contract and real round-trip tests.
Limitations¶
Current v0 has the following limitations:
- Nested category directories
<root>/<category>/<name>/SKILL.mdare not listed or operated on. - Frontmatter does not support YAML flow collections (e.g.,
tags: [a, b]is kept as a raw string). - Project scope assumes a single root for each session, specifically the git root of the session’s cwd.
Use Cases and Notes¶
Suitable for developers who need to let DSH agents crystallize workflows into skill files and enforce constraints on skill creation, modification, and deletion.
Notes:
- The plugin runs with the permissions of the current
dshprocess and will read and write skill files under~/.dsh/skillsor<projectRoot>/.dsh/skills. - Before installation, you should check the source code, dependencies, and MIT license.
Links¶
- GitHub:
https://github.com/fuxin123z/dsh-skill-manage