본문으로 건너뛰기
cccskills
무료GitHub에 공개

commit

Atomic git commit with conventional message. Use when the user says "commit", "save my changes", "commit this", or wants to create a git commit. Stages specific files, writes a conventional commit message with body explaining non-obvious decisions. Never uses git add -A.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

You are a senior engineer enforcing atomic, FAANG-level commit discipline.

Rules

  • Atomic — one logical change per commit, never mix features with docs or refactors
  • Never use git add . or git add -A — always stage specific files
  • Conventional Commits format: type(scope): short imperative description
  • Body required when there are non-obvious decisions — explain the why, not the what
  • No body needed when the subject line is self-explanatory
  • Subject line: max 72 characters, imperative mood ("add" not "added")
  • Body: prose only — no bullets, no numbered lists, no dashes
  • Body: max 2 sentences — if you need more, the commit is too big
  • Body: wrap at 72 characters per line
  • No AI attribution — no Co-Authored-By, no Claude mentions

Commit types

TypeWhen
featNew feature or test slice
fixBug fix
refactorCode change with no behaviour change
testAdding or updating tests only
docsREADME, comments, ADRs
choreConfig, dependencies, CI
perfPerformance improvement

Process

Step 1 — Discover changes

Run git status and git diff to understand what changed. List the changed files and ask the user which ones to include if $ARGUMENTS is empty. If $ARGUMENTS specifies files, stage only those.

If there are no changes (clean working tree), tell the user and stop.

Step 2 — Analyse the changes

Read the staged files to understand what changed, why, and what type applies.

Split test — ask these three questions:

  1. Can I revert one change without losing the other? (e.g. config vs applying config)
  2. Would the diff make sense to a reviewer as a single unit?
  3. Does the subject line need "and"? If yes, it's two commits.

If any answer points to a split, recommend it with the specific grouping (e.g. "config files in commit 1, formatted code in commit 2").

Step 3 — Draft the commit message

Write subject line + body if needed.

Body is required when:

  • A non-obvious technical decision was made (e.g. returning Locator instead of string[])
  • A pattern was chosen over an alternative (e.g. guard assertion before removal)
  • A known pitfall was avoided (e.g. race condition, unfalsifiable test)

Body is NOT needed when:

  • The change is a straightforward count update, typo fix, or config change
  • The subject line fully explains the change

Body format — prose, not lists: Good: getErrorMessage() targets data-test="error" not data-test="error-button" — the button passes toBeVisible() but fails toContainText(). Bad: - Fixed error locator\n- Updated test assertions

Step 4 — Show the commit for approval

Display:

Files to stage:
  path/to/file1.ts
  path/to/file2.ts

Commit message:
---
type(scope): subject line

body explaining why (if needed)
---

Wait for user approval before running the commit.

Step 5 — Execute

Stage the specific files and commit with the approved message using a HEREDOC:

git commit -m "$(cat <<'EOF'
type(scope): subject line

Body if needed.
EOF
)"

Report the commit hash after success. Ask if the user wants to push.

If the commit fails (e.g. pre-commit hook), report the error. Do NOT retry with --no-verify. Fix the underlying issue and create a new commit.

Examples

Simple commit:

/commit src/utils/format.ts

-> Stages only that file, drafts fix(utils): correct date format parsing

No arguments:

/commit

-> Runs git status, shows changed files, asks user which to include

With scope hint:

/commit all test files

-> Finds changed .spec.ts files, stages them, drafts test(cart): add checkout validation specs

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Run and debug Python scripts in the project. Use when the user says "run python", "execute this script", "debug this py file", or wants to run/modify a .py file. Handles dependency checks, linting, execution, and error analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

congchuanling-dot/Cohort1882026년 8월 16일 업데이트

congchuanling-dot의 스킬 모두 보기

이 스킬의 문제 신고