Agent skill

Skill2gene

by didi in didi/mpx

将传统文档导向的 Procedural Skill 转换为紧凑的 Strategy Gene 格式。基于论文 "From Procedural Skills to Strategy Genes" 的 Gene Evolution Protocol (GEP),将 ~2500 token 的文档型 Skill 蒸馏为 ~200-300 token 的控制型 Gene 集合。当用户要求将…

Apache-2.0Auto-check passedDevelopment

Install Skill2gene

skills CLI
$ npx skills add didi/mpx --skill skill2gene -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install didi/mpx skill2gene --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/didi/mpx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/skill2gene .claude/skills/skill2gene && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
skill2gene
GitHub stars
3.9k
Token cost
~558 tokens
SKILL.md length
156 words
Files
9 (incl. references)
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

将传统文档导向的 Procedural Skill 转换为紧凑的 Strategy Gene 格式。基于论文 "From Procedural Skills to Strategy Genes" 的 Gene Evolution Protocol (GEP),将 ~2500 token 的文档型 Skill 蒸馏为 ~200-300 token 的控制型 Gene 集合。当用户要求将…

  • Works in 4 steps: 分析与拆分 → 蒸馏为 Gene → 组装与验证 → …
  • Development work in your project
  • SKILL.md covers 核心理念, Gene 注册表, 转换流程 and 详细参考
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Skill2gene is an agent skill from didi/mpx. 将传统文档导向的 Procedural Skill 转换为紧凑的 Strategy Gene 格式。基于论文 "From Procedural Skills to Strategy Genes" 的 Gene Evolution Protocol (GEP),将 ~2500 token 的文档型 Skill 蒸馏为 ~200-300 token 的控制型 Gene 集合。当用户要求将 skill 转为 gene、优化 skill 的 token 效率、将经验知识蒸馏为紧凑控制指令、或提到 gene/GEP/strategy-gene 时调用。

Its SKILL.md is about 560 tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including reference files (for example `genes/GENES.md`, `genes/gene_distill.md` and `genes/gene_evolution.md`).

It sits in Development. It works with WeChat. The repository describes itself as: Mpx,一款具有优秀开发体验和深度性能优化的增强型跨端小程序框架. The licence is Apache-2.0.

When your agent uses it

  • Development work in your project

Example prompts

  • “From Procedural Skills to Strategy Genes”
  • “/skill2gene”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. 分析与拆分
  2. 蒸馏为 Gene
  3. 组装与验证
  4. 演化准备(可选)

What it can do on your machine

Read from SKILL.md and the folder at commit e2a7612. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Skill2gene loads about 558 tokens when it runs, and up to ~2k if it reads all its reference files. Until then it costs about 71 tokens; SKILL.md has 156 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~558
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from didi/mpx at commit e2a7612, republished under its Apache-2.0 licence (© didi). 156 words, ~558 tokens.

Download SKILL.mdSave it as .claude/skills/skill2gene/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
skill2gene
description
将传统文档导向的 Procedural Skill 转换为紧凑的 Strategy Gene 格式。基于论文 "From Procedural Skills to Strategy Genes" 的 Gene Evolution Protocol (GEP),将 ~2500 token 的文档型 Skill 蒸馏为 ~200-300 token 的控制型 Gene 集合。当用户要求将 skill 转为 gene、优化 skill 的 token 效率、将经验知识蒸馏为紧凑控制指令、或提到 gene/GEP/strategy-gene 时调用。
metadata.version
1.0.0
metadata.author
auto
metadata.approach
gene-evolution-protocol
metadata.paper
From Procedural Skills to Strategy Genes (arXiv:2604.15097)

Skill2Gene: Procedural Skill → Strategy Gene 转换器

本 Skill 自身采用 Gene 理念编写——紧凑、控制导向、面向行为而非文档。

核心理念

传统 Skill 是文档导向的经验表达(~2500 tokens),优化目标是人类可读性和完整性。Strategy Gene 是控制导向的经验表达(~200-300 tokens),优化目标是推理时行为控制的信号密度和有效性。

Gene 不是 Skill 的压缩版,而是一种不同的经验抽象。

Gene 注册表

gene_id触发信号文件
gene_distill蒸馏, 提取, 转换skill, 拆分genegenes/gene_distill.md
gene_gep_formatGEP格式, strategy-gene标签, 字段genes/gene_gep_format.md
gene_signal_density信号密度, token预算, 精简, 去噪genes/gene_signal_density.md
gene_failure_encoding失败经验, AVOID, 警告, 踩坑genes/gene_failure_encoding.md
gene_evolution演化, 迭代, 积累, capsule, eventgenes/gene_evolution.md
gene_validation验证, 校验, 质量检查, 对比genes/gene_validation.md

转换流程

输入:一个传统 Procedural Skill

读取目标 Skill 的全部文件:SKILL.md + references/ + scripts/

Step 1: 分析与拆分

始终加载: gene_distill + gene_gep_format

  1. 识别 Skill 中的控制信号——哪些内容实际影响模型行为(通常集中在 workflow 部分)
  2. 按功能域将控制信号拆分为原子 Gene 单元
  3. 丢弃纯文档性内容(overview、背景解释、API 文档搬运)
Step 2: 蒸馏为 Gene

按需加载: gene_signal_density + gene_failure_encoding

对每个原子功能域:

  1. 提取 keywords(触发信号)
  2. 写 1 句 summary(行为意图)
  3. 写 3-7 条 strategy(有序决策步骤)
  4. 提取 AVOID 项(从 pitfalls/error_handling 中蒸馏为紧凑警告)
Step 3: 组装与验证

加载: gene_validation

  1. 编写 GENES.md 注册表
  2. 编写 SKILL.md 入口(含调度规则)
  3. 对比验证:gene 是否覆盖了原 skill 的有效控制信号
Step 4: 演化准备(可选)

加载: gene_evolution

为后续迭代演化预留 Capsule 和 Event 接口

详细参考

参考文档用途
GEP 协议参考Gene Evolution Protocol 完整定义、对象模型、演化循环

© didi, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (references) in .agents/skills/skill2gene of didi/mpx.

  • SKILL.md
  • genes/GENES.md
  • genes/gene_distill.md
  • genes/gene_evolution.md
  • genes/gene_failure_encoding.md
  • genes/gene_gep_format.md
  • genes/gene_signal_density.md
  • genes/gene_validation.md
  • references/gep-protocol.md

Open the folder on GitHubat commit e2a7612

Compare with similar skills

Skill2gene next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Skill2gene compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Skill2gene this skilldidi/mpx3.9k—~558Automated safety check: PassApache-2.0
Releasing Php Packageyansongda/pay5.4k—~1.6kAutomated safety check: PassMIT
WxJava Upgrade Guidebinarywang/WxJava33k—~129Automated safety check: PassApache-2.0
Process PR Reviewsnexu-io/nexu3.3k—~2.5kAutomated safety check: PassMIT
Project ReleaseDavidLam-oss/obsidian-wechat-converter332—~597Automated safety check: PassMIT
Sync Specsnexu-io/nexu3.3k—~1.2kAutomated safety check: PassMIT

Similar skills

  • A skill your agent uses when preparing to publish a new version of a PHP Composer package and need to write or update CHANGELOG, upgrade guides, and documentation before tagging and releasing

    5.4k GitHub stars~1.6k tokensUpdated 10 days ago
    DevelopmentAuto-check passed
  • WxJava Upgrade Guide

    binarywang/WxJava

    Plans a WxJava version upgrade, checking the BOM, module dependencies, JDK version and configuration, with phased steps and clear rollback conditions.

    33k GitHub stars~129 tokensUpdated 12 days ago
    DevelopmentAuto-check passed
  • Process PR Reviews

    nexu-io/nexu

    A skill your agent uses when the user asks to process, triage, fetch, view, count, list, or resolve review feedback in a GitHub PR.

    3.3k GitHub stars~2.5k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Project Release

    DavidLam-oss/obsidian-wechat-converter

    Release workflow for obsidian-wechat-converter (version bump, release notes, tag and publish).

    332 GitHub stars~597 tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Sync Specs

    nexu-io/nexu

    A skill your agent uses when code changes may have made documentation outdated, when reviewing docs for consistency, or when the user asks to sync or audit documentation.

    3.3k GitHub stars~1.2k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Cloudbase Code Review

    TencentCloudBase/CloudBase-AI-Toolkit

    Code review and validation for CloudBase projects. An agent skill from TencentCloudBase/CloudBase-AI-Toolkit.

    1.1k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed

More from didi/mpx

  • 审计存量 Mpx 项目迁移到“mode 只负责目标筛选、srcMode 只负责源码方言”的新版编译语义。只要用户提到升级 Mpx 后检查条件编译、排查 .ali/.swan 等条件文件、mode/src-mode 区块、@mode/@mode、modeRules/srcModeRules 或外部模板迁移,就应使用本 Skill;不用于与该语义变更无关的普通 Mpx 升级。

    3.9k GitHub stars~731 tokensUpdated today
    Auto-check passed
  • Mpx2rn

    didi/mpx

    Mpx 跨端输出 RN(简称 Mpx2RN 或 Mpx2DRN)的开发适配指南,覆盖模板、脚本、样式、JSON 配置四大维度。当用户进行 Mpx2RN 相关任务时强制调用,包括但不限于:技术方案设计、页面 / 组件的开发迭代、旧项目跨端适配改造、编译和运行时报错排查、Code Review 等。当用户问题不涉及 Mpx2RN 时不应调用,如 Mpx 小程序开发问题,RN…

    3.9k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Mpx 跨端输出 RN(简称 Mpx2RN 或 Mpx2DRN)的开发适配指南,覆盖模板、脚本、样式、JSON 配置四大维度。当用户进行 Mpx2RN 相关任务时强制调用,包括但不限于:技术方案设计、页面 / 组件的开发迭代、旧项目跨端适配改造、编译和运行时报错排查、Code Review 等。当用户问题不涉及 Mpx2RN 时不应调用,如 Mpx 小程序开发问题,RN…

    3.9k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Review Loop

    didi/mpx

    当用户要求评审循环、自评审工作流、planner/reviewer/coder/code-reviewer 协作、先方案后编码、多轮 Agent 评审,或要求稳定的子 Agent 工作流依次产出方案、等待用户确认、实现代码、评审差异并保留修订记录时,使用此 Skill。此 Skill 必须使用真实子 Agent,不得退化为单 Agent 角色扮演。

    3.9k GitHub stars~828 tokensUpdated today
    Auto-check passed
  • 通过查看当前最新版本与上一版本间的git提交记录与代码变更,生成版本变更日志,当用户询问“创建/生成变更日志”、“创建/生成changelog”时使用。

    3.9k GitHub stars~640 tokensUpdated today
    Auto-check passed
  • Helps when network-related commands (like curl, git, npm, pip, brew) are failing, timing out, or running slowly due to network issues.

    3.9k GitHub stars~464 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Skill2gene

What does Skill2gene do?

将传统文档导向的 Procedural Skill 转换为紧凑的 Strategy Gene 格式。基于论文 "From Procedural Skills to Strategy Genes" 的 Gene Evolution Protocol (GEP),将 ~2500 token 的文档型 Skill 蒸馏为 ~200-300 token 的控制型 Gene 集合。当用户要求将…. Skill2gene is an agent skill from didi/mpx.

When should I use Skill2gene?

Skill2gene fits situations like: development work in your project.

How do I install Skill2gene in Claude Code?

Run `npx skills add didi/mpx --skill skill2gene -a claude-code`. Or copy the skill folder (.agents/skills/skill2gene in didi/mpx) into .claude/skills/skill2gene in your project. Claude Code loads it when a task matches its description.

How do I install Skill2gene in Codex?

Run `npx skills add didi/mpx --skill skill2gene -a codex`. Or copy the skill folder (.agents/skills/skill2gene in didi/mpx) into .agents/skills/skill2gene in your project. Codex loads it when a task matches its description.

Can I use Skill2gene in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add didi/mpx --skill skill2gene -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/skill2gene, .gemini/skills/skill2gene, .github/skills/skill2gene and .opencode/skills/skill2gene in your project.

What does Skill2gene need to run?

SKILL.md names no scripts, command-line tools or credentials: Skill2gene is instructions for the agent only.

Does Skill2gene access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Skill2gene safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Skill2gene use?

Skill2gene is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Skill2gene use?

About 558 tokens (SKILL.md is roughly 2.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.

What are the alternatives to Skill2gene?

Skills that share tags, products or a category with Skill2gene: Releasing Php Package (yansongda/pay, 5.4k stars), WxJava Upgrade Guide (binarywang/WxJava, 33k stars), Process PR Reviews (nexu-io/nexu, 3.3k stars) and Project Release (DavidLam-oss/obsidian-wechat-converter, 332 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Skill2gene?

didi (a GitHub organization) maintains it in didi/mpx, which has 3,941 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 8, 2026.

Source: didi/mpx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.