code2skill-generate

A tool for turning authorized application code into installable agent capabilities such as Functions, MCP tools, and Skills. It extracts useful features, interfaces, workflows, and fixes from existing frontend, backend, or full-stack code.

In plain words
What is it for?
It helps package page features, APIs, business workflows, and corrections to generated packages so other agents can run or install them.
Why use it?
It avoids rebuilding an existing business capability from scratch when another agent needs to use it as a small runtime package.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/leechen298/code2skill/code2skill-generate
Any agent
npx skills add leechen298/Code2Skill --skill code2skill-generate
Clone the repo
git clone --depth 1 https://github.com/leechen298/Code2Skill

Made for: Claude Code, Codex.

Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,047 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00096 $0.06047
Opus 5 $0.00048 $0.03024
Sonnet 5 $0.00019 $0.01209
Haiku 4.5 $0.00010 $0.00605

Measured yesterday against content hash 201d273cf4f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code2skill-generate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 14 executable files (assets/mcp-runtime-entry.mjs, assets/portable-agent-result.mjs, assets/portable-error-normalizer.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/code2skill-generate/SKILL.md · 216 lines

How it starts

The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code2Skill

Complete Chinese version: SKILL.zh-CN.md.

Use the user's language for the final response, generated Skills, and user-facing documentation. When no language is explicitly requested, follow the language of the user's current request.

Turn the business capabilities of an existing application into Functions, MCP tools, and Skills that other agents can use. The default goal is a small, reliable runtime package, not an audit archive of the source code.

Use the current coding agent to search, understand, and modify user-authorized code; do not build a separate scanner. The Consumer of the generated package may not be the current agent. Do not assume that it can read the original repository, files on the Producer machine, or session state, except for controlled attachment paths or attachment references explicitly passed to a tool by the Consumer Host.

Default Generated Result

Unless the user explicitly requests a strict audit, generate only:

generated/code2skill/<feature-id>/
├── SKILL.md                    # Used when there is only one primary goal
├── skills/                     # Replaces the root SKILL.md when there are multiple primary goals
│   ├── <goal-a>/SKILL.md
│   └── <goal-b>/SKILL.md
├── MCP-SETUP.md
├── package.json              # Current node-stdio profile example: package metadata, runtime scripts, and dependencies
├── function-core/
│   └── index.mjs             # Current node-stdio profile example
├── mcp-tool/
│   └── index.mjs             # Current node-stdio profile example
├── portable-agent-result.mjs # Generic result projection helper for node-stdio (readHttpResponse/httpResultFromError are HTTP-only)
├── tests/
│   └── *.test.mjs            # Current node-stdio profile example
└── references/
    └── feature-context.md     # Generated only when business context cannot be kept concise in the Skill

The default artifact composition remains the same, while extensions, dependencies, and startup methods follow the runtime profile. core-export-v1 is implemented by node-stdio.

Read the full file on GitHub · 216 lines

Files

What ships with it

40 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 216 lines · 96 tokens per session scan A 201d273cf4f5

Subscribe to this mod's changes

code2skill-generate is a skill published in the GitHub repository leechen298/Code2Skill (8 stars, last pushed 5d ago), licensed MIT. It adds 96 tokens to every session and 6,047 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

dsh-web-release

Release and publish the dsh-web monorepo (DSH Web GUI plugin family + skin collection) — bump all packages to one unified version, commit and tag (tags are cut from main after dev integration; dev is the integration branch), push the vX.Y.Z tag that triggers the GitHub Actions publish pipeline, and verify the npm…

zhu1090093659/dsh-web · 151 tokens

dsh-web-community-plugin-developer

Develop a DSH community plugin and register it in the dsh-web Community Plugins index — author the plugin in the contributor's own repository following the official cordis bundle standard, add its entry to packages/dsh-community-plugins/community.json, regenerate the index with scripts/community-index, rebuild and…

zhu1090093659/dsh-web · 123 tokens

dsh-web-skin-developer

Build a new skin for the dsh-web skin collection (DSH Web GUI) and publish it into the Skin Center — the first-level settings section — scaffold with scripts/dsh-skin-new, author the v2 skin.json manifest plus skin.css token remap (pure asset directory, no package.json, no build step), validate with scripts/dsh-skin…

zhu1090093659/dsh-web · 120 tokens

dsh-web-pre-push-checks

Use before pushing, opening or updating a pull request, or claiming dsh-web checks pass. Selects the required repository gates and diff-specific generation, build, and GUI evidence.

zhu1090093659/dsh-web · 45 tokens

dsh-web-documentation

Use when adding or editing dsh-web README files, docs, AGENTS.md instructions, user-facing configuration text, or bilingual documentation pairs.

zhu1090093659/dsh-web · 34 tokens

dsh-web-sdk-compatibility

Adapt and repair dsh-web after an approved official @deepseek-ai SDK/runtime cohort is selected or installed. Compare public API, type, service-injection, module-table, protocol, and behavior changes; map every change to repository consumers; implement the smallest fixes and durable compatibility contracts; handle…

zhu1090093659/dsh-web · 107 tokens