Перейти к содержанию
Skillpedia
Код в целом17k · #10793

squash-commits

Что он делает

Этот скилл переупорядочивает коммиты в текущей ветке в небольшой набор логичных коммитов. Он нужен разработчикам, которые хотят чистую историю перед тем, как поделиться работой.

Когда использовать

  • ✓Когда в ветке много мелких или беспорядочных коммитов и вы хотите более чистую историю.
  • ✓Когда нужно сгруппировать связанные изменения в несколько осмысленных коммитов перед открытием pull request.
  • ✓Когда из ветки нужно убрать коммиты слияния из main, которые в неё попали.

Ссылка на скилл

https://github.com/pipecat-ai/pipecat/blob/main/.claude/skills/squash-commits/SKILL.md

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/pipecat-ai/pipecat/blob/main/.claude/skills/squash-commits/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Приведи коммиты в моей ветке к нескольким понятным, не меняя код.”

5 новых скиллов в неделю. 1 минута чтения.

Как это работает

Агент проверяет, что ваша работа сохранена, создаёт резервную копию ветки и переписывает коммиты, сохраняя все изменения. Затем он предлагает группы и просит подтвердить их перед созданием коммитов.

Технический текст (оригинальный SKILL.md)

Оригинальный текст автора на английском, прямо с GitHub.

Reorganize the commits on the current branch into a small number of logical commits. Do NOT change any file content — only the commit structure changes.

Instructions

1. Safety check

git status --short

If there are uncommitted changes, stop and tell the user to commit or stash them first.

2. Inspect the branch

git log main..HEAD --oneline
git diff main..HEAD --name-only

List every file changed vs main and every commit on the branch (excluding merge commits from main).

3. Create a backup branch

git branch backup/<current-branch-name>

Tell the user the backup exists so they can recover if needed.

4. Soft-reset to main and unstage everything

git reset --soft main
git restore --staged .

All branch changes are now in the working tree, unstaged. No content has changed.

5. Plan the logical groups

Read the changed files and the original commit messages to understand what the work covers. Group related files into logical commits. Typical groups:

  • Core feature or fix (new source files + modified core files)
  • Secondary features or fixes (each as its own commit if distinct)
  • Refactoring or renames
  • Tests
  • Changelogs / docs

Use the changelog files (if any) as a strong hint — each changelog entry often maps to one commit.

Present the proposed grouping to the user and ask for confirmation before committing.

6. Commit in logical groups

For each group, stage only the relevant files and commit with a clear message following the project's conventions:

git add <file1> <file2> ...
git commit -m "..."

Use conventional commit prefixes if the project uses them (feat:, fix:, refactor:, test:, chore:).

7. Verify

git log main..HEAD --oneline
git diff main..HEAD --name-only
git status --short

Confirm:

  • Commit count is small and each message is meaningful
  • The set of changed files vs main is identical to before
  • Working tree is clean

8. Remind about force-push

The branch history has been rewritten. Tell the user they will need to git push --force-with-lease when they are ready to update the remote. Do NOT push automatically.

Rules

  • Never change file contents. If you find yourself editing a file, stop.
  • Never skip the backup branch step.
  • Never force-push without explicit user instruction.
  • If any step fails or the result looks wrong, tell the user and suggest restoring from the backup: git reset --hard backup/<branch-name>.
Частые вопросы

Изменит ли это мой код?

Нет. Скилл меняет только порядок коммитов, а не содержимое файлов.

Можно ли это отменить?

Да. Скилл сначала создаёт резервную ветку, чтобы при необходимости вернуться к исходным коммитам.

Нужно ли подтверждать группировку?

Да. Агент показывает предлагаемые группы коммитов и просит одобрения перед созданием любых коммитов.

Подробности

Оригинальное описание автора

Reorganize messy branch commits into a small set of logical, meaningful commits without changing any content. Drops merge-from-main commits. Safe: creates a backup branch first.

repo: pipecat-ai/pipecat

Популярность

Звёзды на GitHub
17k
Место в рейтинге
#10793
Лицензия
BSD-2-Clause
Обновлён
02.11.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы