commit-changes
О программе
Навык commit-changes выполняет индексацию, коммит и правку изменений в Git с использованием conventional commit сообщений. Он позволяет осуществлять выборочную индексацию, создавать описательные сообщения в формате HEREDOC и проверять историю коммитов. Используйте его для сохранения логических единиц работы в системе контроля версий с соблюдением правильных практик коммитов.
Быстрая установка
Claude Code
Рекомендуетсяnpx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/commit-changesСкопируйте и вставьте эту команду в Claude Code для установки этого навыка
Документация
Commit Changes
Stage files selective. Write clear commit messages. Verify commit history.
When Use
- Save logical unit of work to version control
- Create commit with descriptive, conventional message
- Amend most recent commit (message or content)
- Review what commit before commit
Inputs
- Required: One or more changed files to commit
- Optional: Commit message (drafted if not given)
- Optional: Whether amend previous commit
- Optional: Co-author attribution
Steps
Step 1: Review Current Changes
Check working tree status. Inspect diffs.
# See which files are modified, staged, or untracked
git status
# See unstaged changes
git diff
# See staged changes
git diff --staged
Got: Clear picture of all modified, staged, untracked files.
If fail: git status fail? Verify inside git repo (git rev-parse --is-inside-work-tree).
Step 2: Stage Files Selective
Stage specific files. Avoid git add . or git add -A — may grab sensitive files or unrelated changes.
# Stage specific files by name
git add src/feature.R tests/test-feature.R
# Stage all changes in a specific directory
git add src/
# Stage parts of a file interactively (not supported in non-interactive contexts)
# git add -p filename
Review staged before commit.
git diff --staged
Got: Only intended files and changes staged. No .env, credentials, large binaries.
If fail: Unstage accidental files with git reset HEAD <file>. Sensitive data staged? Unstage now, before commit.
Step 3: Write Commit Message
Use conventional commits format. Always pass message via HEREDOC for proper formatting.
git commit -m "$(cat <<'EOF'
feat: add weighted mean calculation
Implements weighted_mean() with support for NA handling and
zero-weight filtering. Includes input validation for mismatched
vector lengths.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
EOF
)"
Conventional commit types:
| Type | When use |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation only |
test | Add or update tests |
refactor | Code change — no fix, no new feature |
chore | Build, CI, dependency updates |
style | Formatting, whitespace (no logic change) |
Got: Commit created with descriptive message. Explains why, not just what.
If fail: Pre-commit hook fail? Fix issue, re-stage with git add, create new commit. No --amend — failed commit never created.
Step 4: Amend Last Commit (Optional)
Only amend if commit not pushed to shared remote.
# Amend message only
git commit --amend -m "$(cat <<'EOF'
fix: correct weighted mean edge case for empty vectors
EOF
)"
# Amend with additional staged changes
git add forgotten-file.R
git commit --amend --no-edit
Got: Previous commit updated in-place. git log -1 shows amended content.
If fail: Commit already pushed? No amend. Create new commit. Force-push amended commits to shared branches breaks history.
Step 5: Verify Commit
# View the last commit
git log -1 --stat
# View recent commit history
git log --oneline -5
# Verify the commit content
git show HEAD
Got: Commit appears in history with correct message, author, file changes.
If fail: Commit has wrong files? Use git reset --soft HEAD~1 to undo commit, keep changes staged. Re-commit correct.
Checks
- Only intended files in commit
- No sensitive data (tokens, passwords,
.envfiles) committed - Commit message follows conventional commits format
- Message body explains why change made
-
git logshows commit with correct metadata - Pre-commit hooks (if any) passed
Pitfalls
- Commit too much at once: Each commit = one logical change. Split unrelated changes into separate commits.
- Using
git add .blind: Always reviewgit statusfirst. Prefer stage specific files by name. - Amend pushed commits: Never amend commits pushed to shared branch. Rewrites history. Breaks collaborators.
- Vague commit messages: "fix bug" or "update" tells nothing. Describe what changed and why.
- Forget
--no-editon content amends: Adding forgotten files to last commit? Use--no-edit— keeps existing message. - Hook fail leading to
--amend: Pre-commit hook fail → commit never created.--amendwould modify previous commit. Always create new commit after fix hook issues.
See Also
manage-git-branches- branch workflow before commitcreate-pull-request- next step after commitresolve-git-conflicts- handle conflicts during merge/rebaseconfigure-git-repository- repo setup and conventions
GitHub репозиторий
Frequently asked questions
What is the commit-changes skill?
commit-changes is a Claude Skill by pjt222. Skills package instructions and resources that Claude loads on demand, so Claude can perform commit-changes-related tasks without extra prompting.
How do I install commit-changes?
Use the install commands on this page: add commit-changes to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.
What category does commit-changes belong to?
commit-changes is in the Meta category, tagged general.
Is commit-changes free to use?
Yes. commit-changes is listed on AIMCP and free to install. It runs inside Claude, so no separate service account is required to use the skill itself.
Похожие навыки
Этот навык предоставляет проверенную в продакшене настройку для Content Collections — TypeScript-ориентированного инструмента, который преобразует файлы Markdown/MDX в типобезопасные коллекции данных с валидацией Zod. Используйте его при создании блогов, сайтов документации или контентных приложений на Vite + React для обеспечения типобезопасности и автоматической проверки содержимого. Он охватывает всё: от настройки плагина Vite и компиляции MDX до оптимизации развертывания и валидации схем.
Этот навык позволяет разработчикам создавать приложения на платформе прогнозных рынков Polymarket, включая интеграцию с API для торговли и получения рыночных данных. Он также обеспечивает потоковую передачу данных в реальном времени через WebSocket для отслеживания текущих сделок и рыночной активности. Используйте его для реализации торговых стратегий или создания инструментов, обрабатывающих обновления рынка в реальном времени.
Этот навык помогает разработчикам создавать плагины OpenCode, которые подключаются к более чем 25 типам событий, таким как команды, файлы и операции LSP. Он предоставляет структуру плагина, спецификации API событий и шаблоны реализации для модулей на JavaScript/TypeScript. Используйте его, когда вам нужно перехватывать, отслеживать или расширять жизненный цикл ассистента OpenCode AI с помощью пользовательской событийно-ориентированной логики.
SGLang — это высокопроизводительный фреймворк для обслуживания больших языковых моделей (LLM), специализирующийся на быстрой структурированной генерации JSON, regex и рабочих процессов агентов с использованием кэширования префиксов RadixAttention. Он обеспечивает значительно более высокую скорость вывода, особенно для задач с повторяющимися префиксами, что делает его идеальным для сложных структурированных результатов и многократных диалогов. Выбирайте SGLang вместо альтернатив, таких как vLLM, когда вам требуется ограниченное декодирование или вы создаете приложения с интенсивным совместным использованием префиксов.
