Token导航 LogoToken导航TokenDH.com
待分类权限需确认github未标认证来源可访问许可证需确认审计未展示

cleanup-commits清理提交

Agent Skill

cleanup-commits 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

238

周安装

10

GitHub Stars

4

下载量

83
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cleanup-commits(清理提交)
来源仓库:https://github.com/apocohq/skills
仓库路径:skills/cleanup-commits
安装命令:
npx skills add https://github.com/apocohq/skills --skill cleanup-commits
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/apocohq/skills --skill cleanup-commits

简介

该技能暂无可用说明文档,请参考 GitHub 仓库获取最新信息。

  • 通常此类技能用于自动化清理 Git 提交历史或优化版本轨迹。
  • 安装前请确认是否需执行危险操作如 rebase 或 reset,并做好备份。
  • 建议先在副本仓库测试效果,避免对主分支造成不可逆影响。
  • 注意:因缺乏文档,使用时需自行评估风险与适用性。

SKILL.md

Cleanup Commits for PR Review

Reorganize all commits on the current branch into clean, logical commits that are easy to review.

Arguments

  • $0 - Base branch to rebase onto (default: main)

Process

1. Preparation

First, verify clean working state and identify the base:

git status --porcelain

If there are uncommitted changes, warn the user and stop.

Get the base branch (use argument or default to main):

  • Base branch: ${0:-main}

2. Analyze Changes

Get the full picture of what changed:

git log --oneline ${0:-main}..HEAD
git diff --stat ${0:-main}..HEAD
git diff ${0:-main}..HEAD

Also check the files changed to understand the scope:

git diff --name-only ${0:-main}..HEAD

3. Plan Commits

Based on the diff analysis, identify logical groupings. Common patterns:

  • Feature commits: Group related functionality together
  • Refactor commits: Structural changes without behavior change
  • Config/setup commits: Dependencies, configs, tooling
  • Test commits: Test additions/changes
  • Fix commits: Bug fixes
  • Docs commits: Documentation updates

Create a plan listing each commit with:

  • Clear subject line (imperative mood, <72 chars)
  • Which files go in each commit
  • Why this grouping makes sense

Show the plan to the user and ask for confirmation before proceeding.

4. Execute Rebase

After user confirms the plan:

git reset --soft ${0:-main}
git reset HEAD

This unstages everything while keeping all changes in working directory.

5. Create Commits

For each logical group in the plan:

  1. Stage the relevant files: git add <specific-files>
  2. Create commit with descriptive message: git commit -m "type: concise description - Detail 1 - Detail 2"

Use conventional commit prefixes:

  • feat: - New features
  • fix: - Bug fixes
  • refactor: - Code restructuring
  • test: - Test changes
  • docs: - Documentation
  • chore: - Build, config, dependencies

6. Verify Result

Show the new commit history:

git log --oneline ${0:-main}..HEAD

Compare with original to ensure nothing was lost:

git diff ${0:-main}..HEAD --stat

Important Notes

  • This is a destructive operation - it rewrites git history
  • Only use on branches that haven't been pushed, or be prepared to force push
  • Always verify the final diff matches the original diff
  • If something goes wrong, use git reflog to recover

Example Output

Before:

abc1234 wip
def5678 more stuff
ghi9012 fix thing
jkl3456 wip2

After:

aaa1111 feat: add user authentication flow
bbb2222 refactor: extract validation helpers
ccc3333 test: add auth integration tests

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.15%
按下载量换算29

Claude

31.66%
按下载量换算26

Cursor

19.06%
按下载量换算16

Gemini CLI

10.12%
按下载量换算8

安全审计

暂无安全审计结果可展示。

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills