commit-changes
정보
이 Claude Skill은 컨벤셔널 커밋 메시지를 지원하며 Git 스테이징, 커밋, 수정 작업을 처리합니다. 선택적 스테이징, 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-changesClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Commit Changes
Stage selective → clear msg → verify history.
Use When
- Save logical unit → version control
- Write conventional msg
- Amend last commit (msg or content)
- Review before commit
In
- Required: Changed files
- Optional: Commit msg (drafted if none)
- Optional: Amend prev?
- Optional: Co-author
Do
Step 1: Review
Check tree + diffs:
# See which files are modified, staged, or untracked
git status
# See unstaged changes
git diff
# See staged changes
git diff --staged
→ Clear view all modified, staged, untracked.
If err: git status fails → verify inside repo (git rev-parse --is-inside-work-tree).
Step 2: Stage Selective
Stage specific files, not git add . or -A → avoids secrets + 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
→ Only intended files. No .env, creds, big binaries.
If err: accidental stage → git reset HEAD <file>. Secret staged → unstage immediately before commit.
Step 3: Write Msg
Conventional format. Always HEREDOC → 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 types:
| Type | When |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Docs only |
test | Add/update tests |
refactor | No behavior change |
chore | Build, CI, deps |
style | Formatting, whitespace |
→ Commit created w/ msg explaining why, not what.
If err: pre-commit hook fails → fix, re-stage, create new commit (no --amend → failed commit never existed).
Step 4: Amend Last (Optional)
Amend only if not pushed:
# 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
→ Prev commit updated in-place. git log -1 shows amended.
If err: already pushed → no amend. New commit instead. Force-push → history divergence.
Step 5: Verify
# View the last commit
git log -1 --stat
# View recent commit history
git log --oneline -5
# Verify the commit content
git show HEAD
→ Commit in history w/ correct msg, author, files.
If err: wrong files → git reset --soft HEAD~1 (undo, keep staged), re-commit.
Check
- Only intended files committed
- No secrets (tokens, passwords,
.env) - Msg conventional
- Body explains why
-
git logshows correct metadata - Pre-commit hooks passed
Traps
- Too much at once: One commit = one logical change. Split unrelated.
git add .blind: Alwaysgit statusfirst. Stage by name.- Amend pushed: Never amend pushed commits → rewrites history, breaks collaborators.
- Vague msgs: "fix bug" tells nothing. Say what + why.
- Forget
--no-edit: Content amend → use--no-edit→ keeps msg. - Hook fail →
--amend: Hook fail = no commit.--amendhits prev commit. Always new commit after hook fix.
→
manage-git-branches— branch workflow before commitcreate-pull-request— next step after commitresolve-git-conflicts— merge/rebase conflictsconfigure-git-repository— repo setup + conventions
GitHub 저장소
연관 스킬
railway-docs
문서이 스킬은 Railway의 기능, 작동 방식 또는 특정 문서 URL에 대한 질문에 답하기 위해 최신 Railway 문서를 가져옵니다. 개발자들이 Railway의 공식 소스로부터 정확하고 최신 정보를 직접 받을 수 있도록 보장합니다. 사용자가 Railway의 작동 방식을 묻거나 Railway 문서를 참조할 때 사용하세요.
n8n-code-python
문서이 Claude Skill은 n8n의 Code 노드에서 Python 코드를 작성할 때 전문적인 지침을 제공하며, 특히 Python 표준 라이브러리 사용과 n8n의 특수 구문인 `_input`, `_json`, `_node` 작업에 중점을 둡니다. 이는 개발자가 n8n 내에서 Python의 제한 사항을 이해하도록 돕고, 대부분의 워크플로에는 JavaScript 사용을 권장하면서도 특정 데이터 변환 요구사항에 대한 Python 솔루션을 제안합니다.
archon
문서Archon 스킬은 REST API를 통해 RAG 기반 시맨틱 검색과 프로젝트 관리를 제공합니다. 이 스킬을 사용하여 문서 검색, 계층적 프로젝트/태스크 관리, 문서 업로드 기능을 갖춘 지식 검색을 수행할 수 있습니다. 외부 문서를 검색할 때는 다른 소스를 사용하기 전에 항상 Archon을 최우선으로 활용하세요.
n8n-code-javascript
문서이 Claude Skill은 n8n의 Code 노드에서 JavaScript 코드 작성에 대한 전문적인 지침을 제공합니다. `$input`/`$json` 변수, HTTP 헬퍼, DateTime 처리와 같은 필수적인 n8n 특정 구문을 다루며 일반적인 오류를 해결합니다. Code 노드에서 사용자 정의 JavaScript 처리가 필요한 n8n 워크플로우를 개발할 때 활용하세요.
