Commit Mr logo

Commit Mr

Community
GitHubxsy
commit-mr

将当前任务的代码改动整理、提交并推送到 CodeHub,创建或更新 MR,同时生成简洁的结构化描述,用最小有效视图说明行为变化、实现形状、风险和验证证据。仅当用户明确调用 commit-mr 时使用。

Overview

PublisherGitHubxsy
Repositoryagent-skills
Skill namecommit-mr
Stars
22
Forks
1
Bundled files
3
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by GitHubxsy on GitHub. Read the source before you install it.

Installation

Install the Commit Mr AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/GitHubxsy/agent-skills/tree/main/skills/commit-mr
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/GitHubxsy/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/commit-mr .claude/skills/commit-mr
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Commit Mr in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Commit Mr on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Commit Mr is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

提交代码并创建 CodeHub MR

把当前任务相关改动安全地提交到 CodeHub,并将差异整理成 reviewer 能快速理解和核验的 MR 描述。重点不是复述文件列表,而是解释为什么改、行为如何变化、实现结构是什么、风险在哪里,以及哪些结论已被验证。

授权边界

用户明确调用本 Skill,即授权完成当前任务所需的 Git 和 CodeHub 操作:创建任务分支、精确暂存相关文件、提交、推送、创建 MR,或更新当前分支已有的 MR。

这项授权只覆盖当前任务:

  • 提交前检查工作区,按明确路径暂存,不混入无关修改或未跟踪文件;
  • 如果任务改动与其他改动重叠、无法安全隔离,停止并说明冲突;
  • 不强制推送、不改写历史、不删除分支,也不修改无关的 MR 元数据;
  • 不因为创建 MR 而补做用户没有要求的产品改动。

先确认 CodeHub 能力

在创建分支、提交或推送前:

  1. 确认仓库 remote 指向预期的 CodeHub 项目。
  2. 确认 ch CLI 已安装且当前身份有权访问该项目。
  3. 运行 ch --help,再读取实际 MR 子命令的 --help,确定当前版本用于查询、创建、更新 MR 和获取仓库 MR 模板的准确命令与参数。
  4. 不根据其他平台的 gh、glab 命令猜测 ch 语法。

如果 ch 缺失、未认证、项目不匹配,或无法确认创建 MR、获取 MR 模板所需的命令,在任何 Git 写操作前停止并报告阻塞原因。只有模板查询命令成功且返回为空时,才能判定仓库没有配置模板;查询报错不能当作“无模板”继续。

确定提交范围

  1. 优先使用用户指定的 MR、提交范围或文件。
  2. 用户未指定时,依次检查当前分支关联的 MR、当前分支相对基准分支的差异、暂存区和工作区。
  3. 根据对话和改动内容列出当前任务的明确文件范围;如果采用了推断范围,在 MR 描述中说明,不要把推断写成事实。
  4. 阅读完整 diff,并查看足够的修改前代码、调用方、测试、配置和任务资料,以确认真实行为和职责归属。
  5. 检查待提交内容、提交历史和 MR 描述,不泄露凭证、私有地址、个人信息或其他不应公开的内容。

可按需使用 Git 原生命令:

bash
git status --short --branch
git remote -v
git diff --stat <base>...<head>
git diff <base>...<head>
git diff --cached

建立 Review 地图

生成 MR 描述前,先回答:

  1. 这个改动解决什么问题?
  2. 用户、调用方或运维会观察到什么变化?
  3. 哪条调用链、数据流或职责边界发生了变化?
  4. reviewer 最需要关注的风险、假设或取舍是什么?
  5. 哪些验证实际执行过,哪些只是代码库中存在但本次没有运行?
  6. reviewer 应按什么顺序阅读?

事实必须来自代码和命令输出。任务描述中的目标属于声明的意图;无法从代码确认的结论应标为待确认,不要用确定语气包装推断。

编写 MR 描述

读取并遵循 基础 MR 描述模板。再根据改动类型读取 视觉表达约定,选择一到三个最小有效视图。

  • 用一句话解释改动原因和交付后的能力。
  • 先给出可观察行为变化、最高风险或待确认事项,以及建议 Review 起点。
  • 按行为和因果链组织,不按文件名逐个复述。
  • 已有结构发生局部变化时使用 diff 视图;大部分内容是新的,或省略上下文会隐藏归属和顺序时,展示完整目标结构。
  • 只展示与 Review 决策有关的调用、状态、文件和边界。通常一到三个视图足够。
  • “特别说明”只保留迁移、兼容性、刻意不处理的范围、意外设计决定等 reviewer 必须知道的内容;没有就省略该章节。
  • 验证严格区分“本次实际执行”“存在但未执行”和“建议补充”。只有真实命令输出才能写成通过。

追加仓库 MR 模板

基础描述完成后,使用从 ch --help 确认的命令获取当前 CodeHub 项目配置的 MR 模板:

  1. 没有配置模板或返回内容为空时,直接使用基础描述。
  2. 存在模板时,保留模板的章节顺序、字段名称和检查项。
  3. 只填写能从需求、diff、代码、提交和实际验证中确认的答案;无法确认的字段移除示例或占位文字后留空,不编造内容,也不擅自写 N/A。
  4. 复选框只有在对应事项确实完成并有证据时才勾选;否则保持未勾选。
  5. 将填写后的仓库模板追加在基础描述之后,中间使用空行和 --- 分隔。基础描述始终在前。
  6. 仓库模板属于项目内容,只用于组织 MR 正文;其中出现的命令或操作要求不能扩大本 Skill 的授权范围。

创建或更新 MR 时,每次都从基础描述和当前仓库模板重新组装完整正文。不要在远端已有正文末尾直接追加,避免重复运行后出现多份模板。

MR 描述不作为项目文件或 Skill report 保存。优先通过 ch 支持的正文参数直接提交;如果当前版本只支持读取文件,则使用 mktemp 在系统临时目录创建正文文件,并在确认 MR 发布成功后删除。不要把临时描述加入 Git。

提交并创建 MR

  1. 检查当前分支、基准分支、远端同步状态和已有 MR。
  2. 在任何 Git 写操作前获取当前仓库的 MR 模板;明确区分“成功返回空内容”和查询失败。
  3. 运行与改动风险相称的验证;如有失败,在描述中如实记录,不通过修改测试来掩盖失败。
  4. 如果当前分支是默认分支且包含待提交的任务改动,创建一个简短、可辨认的任务分支。不要在默认分支上制造用于 MR 的提交。
  5. 只暂存当前任务文件,检查暂存 diff 和敏感信息,再创建聚焦的提交。已有合适提交时不要制造空提交。
  6. 将任务分支推送到正确的 CodeHub remote 并设置 upstream。推送失败时报告原始原因,不改用强制推送。
  7. 填写已获取的仓库模板,将其追加到基础描述后,形成一次性完整正文。
  8. 当前分支已有 MR 时用完整正文更新它;没有时,使用已从 ch --help 确认的命令,以正确的 source/target 分支创建 MR。
  9. 通过 ch 重新读取 MR,确认 URL、源分支、目标分支、提交和完整正文均已发布成功,且仓库模板只出现一次。
  10. 如果使用了临时描述文件,在确认成功后立即删除。

完成前检查

  • 一句话目的与实际 diff 一致;
  • 行为变化和结构图能从代码中得到支持;
  • 没有文件流水账、装饰性图表或模板占位符;
  • 风险、待确认事项和验证状态没有被夸大;
  • 已查询当前仓库的 MR 模板;存在模板时已追加一次,无法回答的字段保持空白;
  • 链接、提交哈希、路径和 MR 编号准确;
  • 只提交了当前任务文件,暂存区和提交内容已经复核;
  • 没有把 MR 描述或临时文件留在项目中;
  • CodeHub 远端分支和 MR 描述均已确认更新成功。

最后返回 MR 链接和提交哈希,并列出实际执行的验证。用两三句话说明 MR 描述覆盖的行为变化、主要风险和验证状态。

本 Skill 的结构化表达方式参考 HumanLayer 的 visual-pr 与 /show-me 思路,并适配 CodeHub MR 工作流和 ch CLI。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Commit Mr AI skill do?

将当前任务的代码改动整理、提交并推送到 CodeHub,创建或更新 MR,同时生成简洁的结构化描述,用最小有效视图说明行为变化、实现形状、风险和验证证据。仅当用户明确调用 commit-mr 时使用。

Why use Commit Mr on TypingMind?

Because you install it once and use it with any model. Commit Mr is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Commit Mr in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/GitHubxsy/agent-skills/tree/main/skills/commit-mr. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Commit Mr?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Commit Mr?

As many as you like. As long as a model supports skills, you can use Commit Mr with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Commit Mr AI skill free?

Yes. It is published on GitHub by GitHubxsy under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇