본문으로 건너뛰기
Skillpedia
일반 코딩29k · #9551

commit-craft

하는 일

이 스킬은 여러 변경이 섞인 큰 작업을 작고 집중된 git 커밋 계획으로 나눕니다. 검토하기 쉽고, 되돌리기 쉽고, 이해하기 쉬운 커밋을 원하는 개발자에게 맞습니다.

사용하는 경우

  • ✓여러 변경이 섞여 있어서 논리적인 묶음으로 커밋하고 싶을 때.
  • ✓푸시하기 전에 스테이징된 변경에 비밀 정보나 .env 파일이 없는지 확인하고 싶을 때.
  • ✓변경에 대해 명확하고 잘 쓴 커밋 메시지가 필요할 때.

스킬 링크

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/commit-craft/skills/commit-craft/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/commit-craft/skills/commit-craft/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“저장소에 변경이 많이 섞여 있어요. 이를 깔끔한 커밋으로 나누고, 민감한 정보가 스테이징되지 않았는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 파일을 논리적인 커밋 단위로 묶고 순서를 제안한 뒤, 스테이징된 내용에 대해 비밀 정보 검사를 실행합니다. 커밋 메시지도 검사합니다. 각 묶음을 언제 스테이징하고 커밋할지는 여러분이 정합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Commit Craft

Portability: 3 stdlib Python scripts that call git read-only. No network. The scripts never stage, commit or push. You do, one group at a time, after the gate passes.

Agents leave large mixed diffs: a feature, a reformat, a dependency bump and a stray .env, all in one tree. Committed as one blob, that diff cannot be reviewed, reverted or bisected. This skill turns it into a series where each commit is one logical change, builds on its own, holds no secrets and says why.

Workflow

# 1 - Plan: which commits, in which order, staged how?
python scripts/commit_planner.py                 # working tree vs HEAD, untracked included
# 2 - For each group: stage exactly its files, then gate what is staged
git add -- <files of group N>                     # or git add -p for MIXED_FORMATTING files
python scripts/secret_gate.py                     # blocks before the commit exists
# 3 - Write the message, lint it, commit
python scripts/message_linter.py -m "<message>" --staged && git commit -m "<message>"
# 4 - Before push: the whole series, and proof every commit builds
python scripts/message_linter.py --range @{upstream}..HEAD
git rebase -x "<test command>" @{upstream}

Step 1 groups files: manifest with lockfile, pure moves, whitespace-only files, each module's changes with their tests, then docs and CI. It holds back .env, keys and tfstate (exit 4), flags files that mix formatting with real hunks, and flags a move whose callers' import edits sit in another group, since that commit would not build. It never picks feat vs fix: decide from what the change does.

Step 2 scans only the added lines of what is staged: provider-shaped tokens, high-entropy values assigned to key/secret/token/password, sensitive files and conflict markers. Output is redacted. A false positive is waived in .commit-craft-allow by fingerprint or path, with a reason.

Step 3 blocks vague subjects ("fix", "update"), subjects over 72 characters, no blank line after the subject, and a change of 40+ lines or 4+ files with no body. It enforces Conventional Commits only if the repo already uses them.

Step 4 also blocks fixup!/squash!/WIP commits and warns on duplicates and revert pairs. Install assets/hooks/ to run steps 2 to 4 on every commit and push.

Hard rules

  • Never git add -A or git add . on a mixed tree. Stage each group by name or by hunk.
  • A blocked gate means no commit. Remove the value and load it at runtime. Never --no-verify, never waive a real secret.
  • A pushed secret is rotated first. Deleting it in a new commit leaves it in history (references/secret_response.md).
  • Each commit builds. Tests ride with their change; moves carry their callers.
  • The body says why. The diff already says what.
  • Rewrite only unpushed history. Rebasing or amending shared commits is the user's call.

Scripts

Script Role Exit codes
scripts/commit_planner.py Groups, order, staging commands, MOVE/MIXED/SIZE flags 0 one commit · 2 split · 3 bad input · 4 secrets file held back
scripts/secret_gate.py Staged or range scan for credentials, sensitive files, conflict markers 0 · 2 warnings · 3 · 4 blocked
scripts/message_linter.py One message (-m, --message-file) or a series (--range) 0 · 2 warnings · 3 · 4 blocked

All support --help, --sample and --output json.

References and assets

자주 묻는 질문

커밋이나 푸시도 대신 하나요?

아니요. 스크립트는 git을 읽기만 하며 스테이징, 커밋, 푸시를 하지 않습니다. 그 단계는 직접 합니다.

무엇을 막나요?

스테이징된 비밀 정보와 .env 파일은 커밋이 만들어지기 전에 차단됩니다.

푸시 전에 전체 커밋 시리즈를 확인할 수 있나요?

네. 범위 안의 모든 메시지를 검사하고, 각 커밋에 테스트 명령도 실행할 수 있습니다.

상세 정보

작성자의 원본 설명

Use when committing a mix of changes, before a push, or when asked to split work into commits or write commit messages. Plans a reviewable series, blocks staged secrets and .env files, and lints messages with commit_planner.py, secret_gate.py and message_linter.py.

repo: alirezarezvani/claude-skills

인기도

GitHub 스타
29k
순위
#9551
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬