leek/agent-skills

commit

Commit the work done in this session, skipping files a parallel session also touched.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/leek/agent-skills --skill commit

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Commit

Commit only what you changed in this session. Other sessions may be working in the same repo at the same time; that is expected, and none of their work is yours to commit.

Process

  1. List your files. From this conversation, write down every file you created, edited, or

deleted. If you touched nothing, say so and stop.

  1. Check the tree. Run git status --porcelain. Anything not on your list belongs to someone

else, ignore it completely.

  1. Drop the overlaps. For each of your files, git diff -- <path> (git diff --cached too if

it is already staged). If it contains changes you did not make, leave that file out, the other session will commit it. If a file mixes your hunks with foreign hunks, stage only yours: git add -p -- <path> needs an interactive terminal, so where the shell has none (Claude Code's Bash, most agent harnesses), write your hunks to a patch (git diff -- <path> > "$TMPDIR/mine.patch", then delete the foreign hunks from it) and git apply --cached "$TMPDIR/mine.patch". Never include a foreign hunk because it is small. Note which files you skipped.

  1. Commit by path, without touching the index. Use

git commit --only -m "<subject>" -- <path> <path> … (options before the --). --only commits exactly the named paths and ignores whatever another session has already staged, so a foreign git add can never ride along. Never git add -A, git add ., or commit -a. For a partially staged file from step 3, git commit -m "<subject>" -- <path> after staging your hunks instead. New files are the exception: --only silently skips untracked paths, so git add -- <new-path> each file you created first, then include it in the same --only list. Check git status --porcelain afterwards; a ?? line for one of your files means it was skipped.

  1. Subject. Conventional Commits: type(scope): summary: imperative mood, lowercase,

no trailing period, under 72 chars. Types: feat, fix, refactor, docs, test, chore, perf, build, ci. Scope optional. Add a short body only when why is not obvious from the diff. No attribution or co-author trailers.

  1. Report. One line: the commit subject, the short SHA, and any files you deliberately left out

and why. Do not push unless asked.

Guardrails

  • Commit to the current branch, whatever it is. Never switch, create, or suggest a branch,

not even when the current branch is main/master. No git checkout, git switch, git branch.

  • One session's work, one commit. Do not amend, rebase, or touch existing history.
  • If the changes are genuinely two unrelated things, make two commits, still your files only.
  • Never git stash, git checkout --, or git reset: a parallel session's uncommitted work is

unrecoverable if you discard it.

  • Need a pre-change baseline of a file? Copy it aside and git show HEAD:<path> > <path>, run

what you need, then restore the copy. A scoped stash plus immediate pop is still a stash.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills