skill-tuner

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Tuner

Skill Tuner

Improve skills over time by capturing user feedback and applying it on future runs.
通过收集用户反馈并在后续运行时应用,持续优化skill效果。

When to Capture

何时收集

When a user responds to a skill's output with a correction or forward-looking instruction, capture it. Look for phrases like:
  • "Always...", "Never...", "From now on...", "Next time...", "Remember to..."
  • "Don't include...", "Make it shorter", "Use bullet points", "Only show..."
  • "Perfect, always do it like that"
Do NOT capture one-off requests ("just this once", "for now") or vague reactions.
当用户对skill的输出给出修正意见或面向未来的指令时,进行收集。留意以下类型的表述:
  • "Always...", "Never...", "From now on...", "Next time...", "Remember to..."
  • "不要包含…", "缩短内容", "使用项目符号列表", "仅展示…"
  • "非常好,以后都这么做"
请勿收集一次性请求(“仅此一次”、“暂时”)或模糊的反馈。

How to Capture

如何收集

  1. Create the storage directory if it doesn't exist:
    • Use
      $SKILL_TUNER_DIR
      if set, otherwise
      .skill-tuner/
      in the project root.
    • Add it to
      .gitignore
      if not already there.
  2. Read
    {storage-dir}/{skill-name}.md
    if it exists.
  3. If the new instruction contradicts an existing entry, replace it. If it refines one, update it. Otherwise append.
  4. Write the file with this format:
markdown
undefined
  1. 若存储目录不存在则先创建:
    • 优先使用环境变量
      $SKILL_TUNER_DIR
      指定的路径,否则使用项目根目录下的
      .skill-tuner/
    • 若该目录还未加入
      .gitignore
      ,请添加进去
  2. {storage-dir}/{skill-name}.md
    文件存在则读取内容
  3. 若新指令和已有条目冲突,则替换原有条目;若新指令是对已有条目的优化,则更新对应条目;否则追加新条目
  4. 按照以下格式写入文件:
markdown
undefined

Skill Tuner: {skill-name}

Skill Tuner: {skill-name}

Learned

Learned

  • [YYYY-MM-DD] {concise, actionable instruction}

5. Confirm to the user: *"Noted: {instruction}. I'll apply this next time."*
  • [YYYY-MM-DD] {concise, actionable instruction}

5. 向用户确认:*"已记录:{instruction}。我下次会应用该规则。"*

How to Recall

如何调用已存储规则

Before running any skill, check if
{storage-dir}/{skill-name}.md
exists. If it does, read it and apply every instruction in the
## Learned
section as additional constraints. Do not mention this to the user — just apply them silently.
运行任意skill之前,检查
{storage-dir}/{skill-name}.md
是否存在。若存在则读取文件内容,将
## Learned
板块下的所有指令作为额外约束应用。无需向用户告知该操作——直接静默应用即可。

Size Limits

存储上限

Max 30 entries / 50 lines per file. When exceeded: merge duplicates, then remove oldest entries first. Override limits via
{storage-dir}/config.json
:
json
{
  "default": { "max_entries": 30, "max_lines": 50 },
  "skills": { "ai-news": { "max_entries": 20 } }
}
每个文件最多存储30条条目 / 50行内容。超出上限时:先合并重复条目,再按时间顺序删除最旧的条目。可通过
{storage-dir}/config.json
自定义上限:
json
{
  "default": { "max_entries": 30, "max_lines": 50 },
  "skills": { "ai-news": { "max_entries": 20 } }
}

Direct Commands

直接指令

  • "What have you learned about {skill}?" — read and display the file.
  • "Forget {instruction} for {skill}" — remove that entry.
  • "Clear skill tuning for {skill}" / "Clear all skill tuning" — delete file(s).
  • "Show skill tuning" — list all skills with entry counts.
  • "What have you learned about {skill}?" — 读取并展示对应文件内容
  • "Forget {instruction} for {skill}" — 删除对应条目
  • "Clear skill tuning for {skill}" / "Clear all skill tuning" — 删除对应文件
  • "Show skill tuning" — 列出所有有调优规则的skill及其条目数量