Preface¶
When building agent capabilities in DeepSeek Harness (DSH), a common issue arises: business logic is already distributed across frontend, backend, or full-stack source code, but to enable stable invocation by other agents, it still needs to be organized into Functions, MCP tools, and Skills.
leechen298/Code2Skill addresses this scenario by providing a capability in the form of a DSH plugin: it generates Functions, MCP tools, workflow Skills, and offline tests within the user-authorized source code scope, defaulting to offline technical validation only without calling live business APIs.
What Is This¶
Code2Skill is a plugin for generating and reviewing portable Function, MCP, and Agent Skill packages. It is maintained by leechen298 and licensed under MIT.
Its core goal is not to directly replace business systems but to organize recognizable business entry points and call chains from existing code into capability packages that other agents can invoke, reuse, and review.
Core Features¶
- Generate Functions, MCP tools, workflow Skills, and offline tests from existing code.
- Applicable to user-authorized frontend, backend, or full-stack source code.
- Identify independently completable goals within user-specified pages, directories, features, or public entry points.
- Handle field sourcing, inter-tool record handoff, request assembly, and deterministic transformations in Functions.
- Generate a Skill for each primary goal, reusing necessary Functions and MCP tools.
- Default to offline technical validation, without calling live business APIs.
- Provide review Skills for checking workflow completion and source semantics.
- Installable as a DeepSeek Harness bundle to a specified profile.
Installation and Enabling¶
Before installation, confirm which DSH profile you want to install to and check the plugin source code and license. The current example installs to the web profile, version v1.2.0:
dsh plugin --profile web add github:leechen298/Code2Skill#v1.2.0
Note: The plugin runs with the permissions of the current dsh process, so the authorization scope, source code access, and subsequent generation scope should all be within boundaries you can control.
Typical Usage¶
When generating capabilities, you can specify the entry points to convert and explicitly authorize the source code root directories:
Use $code2skill-generate to turn <page, directory, feature path, or public entry point> into runnable Functions, MCP tools, and Skills.
Authorized source roots: <frontend>, <backend>, <protocol>, and <service/message/task directories>.
If you only want to check whether the generated package can complete the primary goals:
Use $code2skill-review-flow to review whether the primary goals in <generated package path> can be completed.
If you want to verify whether a specific Skill or capability matches the authorized source code:
Use $code2skill-review-source to review whether <specific Skill or capability> in <generated package path> matches the authorized source code.
Use Cases and Notes¶
It is suitable for teams looking to distill reusable capabilities from existing frontend, backend, or full-stack code. It is ideal for generating the initial structure of Functions, MCP tools, Skills, and offline tests, which can then be paired with review capabilities to check the main flow and key semantics.
Please note before use:
- It does not prove that all business rules or real environments have been validated.
- It defaults to offline technical validation and will not call live business APIs.
- Offline tests do not replace real APIs or deployment acceptance.
- Generation results depend on the generation model, source completeness, and user authorization scope.
- If live business operations are required, you need to register the generated MCP server according to the
MCP-SETUP.mdin the corresponding generated package.
Links¶
GitHub Repository: https://github.com/leechen298/Code2Skill