commit-changes
FreeNo executable scriptsNot checkedCommit changes as signed Conventional Commits after the pre-commit checks. Use when committing or writing a commit message.
by torrust★ 539 GitHub starsAbout this skill
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:
- Stop the failed attempt immediately. Do not use
--no-gpg-signor skip signing. - 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 -Scommand while the user enters the passphrase directly in the terminal prompt.
- 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
Install commit-changes in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the commit-changes skill do?
Commit changes as signed Conventional Commits after the pre-commit checks. Use when committing or writing a commit message.
How do I install the commit-changes skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the commit-changes skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
by Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
by Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
by Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
by Anthropic