Skip to main content

commit

Create focused git commits with Conventional Commits messages. Use for every git commit you create, whether the user asks for one or you commit as part of a task, and when the user asks for a commit message.

소스 정보

저장소
arklanq/agent-skills
최근 소스 활동
2026년 10월 15일 11:21
감지된 SKILL.md 언어
영어
스타
1
포크
0

commit: Create a focused Git commit

Collects repository context, selects only changes belonging to the requested work, and writes a Conventional Commits message before creating a commit.

How to use

Confirm the working repository, inspect intended files and staged diff, separate unrelated changes, then commit only the selected paths or hunks and report the resulting hash.

Limitations

For a message-only request it returns a proposed message without staging or committing. It avoids broad git add commands and preserves unrelated work.

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
commit
description
Create focused git commits with Conventional Commits messages. Use for every git commit you create, whether the user asks for one or you commit as part of a task, and when the user asks for a commit message.
# Git Commit If the user asks only for a commit message, inspect the relevant context and return the proposed message without staging changes or creating a commit. ## Step 1: Gather Context When working in a repository, run the skill's context-gathering script: ```bash <skill-location-dir>/scripts/collect-context.sh ``` The script outputs the current working directory first. Verify you are in the correct repository before proceeding. For a message-only request based on a supplied diff or description, use that material directly; repository access is not required. ## Step 2: Select the Commit Scope Commit only changes that belong to the user's requested work. Preserve unrelated staged or unstaged changes. - Group changes thematically, with a separate commit for each coherent change. - Inspect the intended unstaged changes and new files before staging them; the context script only shows the full diff for changes already staged. - Stage explicit paths only when all changes in those files belong to the commit. If a file mixes intended and unrelated changes, stage only the intended hunks. - Never use `git add .`, `git add -A`, or another broad staging command. - If staged changes mix unrelated work, split them before committing when this can be done safely; otherwise ask the user which changes belong in the commit. - Review the staged diff immediately before committing. ## Step 3: Write the Commit Message Use Conventional Commits by default. Follow project-specific message conventions when they differ from the defaults below. **Subject** (always): - Use Conventional Commits: `<type>[optional scope][!]: <description>`. - Prefer `feat`, `fix`, `docs`, `refactor`, `test`, `perf`, `build`, `ci`, `chore`, `style`, or `revert`; choose the type that describes the change. - Use imperative mood: "add foo", not "added foo" / "adds foo". - Keep the subject at most 72 characters, with no trailing period. - Add a scope only when it makes the subject more precise. - Mark breaking changes with `!` and explain them in a `BREAKING CHANGE:` footer. Use a subject alone by default. Add a body when context, rationale, or breaking changes need explanation, or when the user requests a detailed message. - Separate the subject and body with a blank line. - Explain why the change is needed without repeating the diff. - Use bullets when they make multiple related points easier to scan. ## Step 4: Create the Commit ```bash git commit -m "message" git commit -m "title" -m "- bullet 1 - bullet 2" ``` ## Step 5: Verify and Report Inspect the created commit and the remaining staged and unstaged changes. Confirm that the commit contains only the intended changes and unrelated work is preserved. Return the commit hash and subject for each commit created. ## Rules - Never add AI-attribution signatures, footers, or suffixes to commit messages. Factual mentions of AI tools that are relevant to the changes are allowed. - If a pre-commit hook modifies in-scope files, inspect and stage only those hook changes, then retry once. - If a hook fails, diagnose and fix a straightforward in-scope problem. Ask the user only when the fix is ambiguous, substantial, or outside the requested work.
GitHub에서 보기