Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

commit-changes

БесплатноБез исполняемых скриптовНе проверен

Commit changes as signed Conventional Commits after the pre-commit checks. Use when committing or writing a commit message.

torrustот torrust★ 539 звёзд на GitHub

Об этом скилле

Committing Changes

This skill guides you through the complete commit process for the Torrust Tracker project.

Quick Reference

# One-time setup: install the pre-commit Git hook
./contrib/dev-tools/git/install-git-hooks.sh

# Stage changes
git add <files>

# Commit with conventional format and GPG signature (MANDATORY)
# The pre-commit hook runs ./contrib/dev-tools/git/hooks/pre-commit.sh automatically
git commit -S -m "<type>[(<scope>)]: <description>"

Conventional Commit Format

We follow Conventional Commits specification.

Commit Message Structure

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Scope should reflect the affected package or area (e.g., tracker-core, udp-protocol, ci, docs).

Commit Types

Type Description Example
feat New feature or enhancement feat(tracker-core): add peer expiry grace period
fix Bug fix fix(udp-protocol): resolve endianness in announce response
docs Documentation changes docs(agents): add root AGENTS.md
style Code style changes (formatting, etc.) style: apply rustfmt to all source files
refactor Code refactoring refactor(tracker-core): extract peer list to own module
test Adding or updating tests test(http-core): add announce response tests
chore Maintenance tasks chore: update dependencies
ci CI/CD related changes ci: add workflow for container publishing
perf Performance improvements perf(swarm-coordination-registry): switch to dashmap

GPG Commit Signing (MANDATORY)

All commits must be GPG signed. Use the -S flag:

git commit -S -m "your commit message"

Restricted Agent Sandboxes

Some agent sandboxes cannot write hook logs to /tmp and can invoke Git hooks with a PATH that does not resolve the Rust toolchain. Preserve GPG signing and explicitly restore Cargo's conventional installation directory while writing hook logs inside the workspace:

PATH="${CARGO_HOME:-$HOME/.cargo}/bin:$PATH" \
TORRUST_GIT_HOOKS_LOG_DIR=.tmp \
git commit -S -m "<type>(<scope>): <description>"

The repository hook also tries to restore Cargo. First validate with the same PATH and TORRUST_GIT_HOOKS_LOG_DIR variables by running the pre-commit script directly. If Git still launches the hook without usable Cargo in the restricted agent sandbox, rerun the signed git commit outside that sandbox; do not bypass the hook or signing. This workaround keeps hook logs in the git-ignored workspace .tmp/ directory and does not alter the checks or replace normal developer setup.

One Signed Commit per Step

Run each signed commit as its own step, and check its result (the exit status, and git log -1 --format=%G?) before staging or committing anything else. Never chain a commit with a later git add or git commit in one command using ; or newlines: if the signature fails, its changes stay staged and the next commit sweeps them in. In issue #2505 a commit failed with a GPG timeout, and the next commit, issued in the same command, swept the staged rename into an unrelated docs commit.

GPG Timeout Handling

If the GPG passphrase prompt times out (gpg: signing failed: Timeout), the agent must:

  1. Stop the failed attempt immediately. Do not use --no-gpg-sign or skip signing.
  2. Notify the user that the passphrase prompt timed out and offer these choices:
  • retry the same signed commit manually; or
  • have the agent retry the same git commit -S command while the user enters the passphrase directly in the terminal prompt.
  1. Wait for the user's choice. Do not retry automatically. If the user requests an agent-assisted retry, invoke only the same signed commit command and allow the user to provide the passphrase; never receive, request, or handle the passphrase in chat.

This rule is absolute. Never bypass GPG signing for any reason.

Pre-commit Verification (MANDATORY)

Git Hook

The repository ships a pre-commit Git hook that runs ./contrib/dev-tools/git/hooks/pre-commit.sh automatically on every git commit. Install it once after cloning:

./contrib/dev-tools/git/install-git-hooks.sh

Once installed, the hook fires on every commit and you do not need to run the script manually. To check whether it is installed before you run the script by hand, see the [`run-pre-commit

Полный SKILL.md на GitHub

Установить commit-changes в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

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

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл commit-changes?

Commit changes as signed Conventional Commits after the pre-commit checks. Use when committing or writing a commit message.

Как установить скилл commit-changes?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл commit-changes запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить commit-changes с