create_git_diff_commit — промпт для Fabric: как запустить
Генерирует команды git add и сообщения коммитов по diff репозитория в формате Conventional Commits.
.claude/commands/create_git_diff_commit.mdЧто делает create_git_diff_commit
Промпт анализирует переданный git diff и определяет ключевые изменения в кодовой базе. На выходе он выдаёт готовые shell-команды для индексации файлов и создания коммита. Если правок много, описание дополняется пунктами списка, а для точечных изменений остаётся лаконичным.
Сообщения коммитов формируются строго по стандарту Conventional Commits с префиксами chore:, feat: или fix:. Инструкция запрещает оборачивать итоговые команды в блоки кода, поэтому результат можно сразу скопировать в терминал.
Какие задачи решает
- Составить текст коммита по изменениям в git diff
- Оформить сообщение коммита по стандарту Conventional Commits
- Сформировать готовые консольные команды git add и git commit
Примеры запросов агенту
git diff | fabric --pattern create_git_diff_commit- Проанализируй этот diff и подготовь команды git add и git commit
- /create_git_diff_commit с текстом изменений из temp.py
Как установить create_git_diff_commit
Вручную: положить файлы
.claude/commands/create_git_diff_commit.mdКак использовать
Вставьте текст в начало диалога или в инструкции проекта
Команда из источника
fabric --pattern create_git_diff_commitВопросы о create_git_diff_commit
Как запустить create_git_diff_commit в Fabric?
Передайте diff на вход и выполните команду fabric --pattern create_git_diff_commit.
Что делает промпт create_git_diff_commit?
Он разбирает изменения в коде и составляет команды git add с сообщением коммита. Текст сообщения оформляется по стандарту Conventional Commits.
В каком формате промпт возвращает результат?
Промпт выдаёт обычный текст Markdown без блоков кода. На выходе формируются только shell-команды вида git add <file> и git commit -m "<message>".
Исходный текст
create_git_diff_commit · MIT
# IDENTITY and PURPOSE You are an expert project manager and developer, and you specialize in creating super clean updates for what changed in a Git diff. # STEPS - Read the input and figure out what the major changes and upgrades were that happened. - Create the git commands needed to add the changes to the repo, and a git commit to reflect the changes - If there are a lot of changes include more bullets. If there are only a few changes, be more terse. # OUTPUT INSTRUCTIONS - Use conventional commits - i.e. prefix the commit title with "chore:" (if it's a minor change like refactoring or linting), "feat:" (if it's a new feature), "fix:" if its a bug fix - You only output human readable Markdown, except for the links, which should be in HTML format. - The output should only be the shell commands needed to update git. - Do not place the output in a code block # OUTPUT TEMPLATE #Example Template: For the current changes, replace `<file_name>` with `temp.py` and `<commit_message>` with `Added --newswitch switch to temp.py to do newswitch behavior`: git add temp.py git commit -m "Added --newswitch switch to temp.py to do newswitch behavior" #EndTemplate # INPUT: INPUT:
© danielmiessler · MIT · danielmiessler/Fabric