skills/commit/SKILL.md
This skill should be used when the user asks to "commit changes", "make a commit", "commit staged files", "create a commit with conventional commit format", or mentions committing code following conventional commit convention.
npx skillsauth add pitzcarraldo/skills commitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill automatically analyzes staged Git changes and creates commits following the Conventional Commits specification. It examines the changes, determines the appropriate commit type and scope, and generates a well-structured commit message without requiring user input.
| Type | Purpose | Example |
|------|---------|---------|
| feat | New feature | Adding user authentication |
| fix | Bug fix | Fixing null pointer exception |
| docs | Documentation | Updating README |
| style | Formatting changes | Code style, whitespace |
| refactor | Code restructuring | Extract function to module |
| perf | Performance | Optimize database queries |
| test | Testing | Add unit tests |
| build | Build system | Update dependencies |
| ci | CI/CD | Modify GitHub Actions |
| chore | Maintenance | Update tooling |
<type>(<scope>): <description>
[optional body explaining WHY the change was made]
[optional footer(s)]
Format Rules:
Author Policy:
Check if we're in a git repository:
git rev-parse --git-dir 2>&1
Expected output:
.git or path to git directoryError message format:
Error: Not in a git repository
Please initialize git with: git init
Run these commands in parallel to gather context:
git diff --cached --stat
git diff --cached
git log --oneline -5
Purpose:
--cached --stat: Summary of staged files--cached: Detailed line-by-line changeslog --oneline -5: Recent commit messages for style consistencyIf no staged changes:
No files are staged for commit.
Stage files with:
git add <file> # Stage specific file
git add . # Stage all changes
git add -p # Stage interactively
Determine commit type based on:
File patterns:
README.md, *.md in docs/ → docspackage.json, Gemfile → build.github/workflows/ → ci*_test.js, *_spec.rb → testChange patterns:
featfixrefactorperfstyleScope determination:
src/auth/ → auth)Description generation:
Basic commit (no body needed):
git commit -m "$(cat <<'EOF'
<type>(<scope>): <description>
EOF
)"
Complex commit (with body):
git commit -m "$(cat <<'EOF'
<type>(<scope>): <description>
Detailed explanation of WHY this change was made.
Wrap at 72 characters for readability.
Use multiple paragraphs if needed.
EOF
)"
When to include body:
Create the commit:
git commit -m "$(cat <<'EOF'
[generated message]
EOF
)"
Verify the commit:
git log -1 --pretty=format:"%h - %s%n%n%b"
Display to user:
✓ Commit created successfully
[short hash] - [commit subject]
[commit body if present]
All commit operations follow this consistent format:
Analyzing staged changes...
Files changed:
[file list from git diff --cached --stat]
Creating commit with message:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
<type>(<scope>): <description>
[body]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ Commit created: [hash]
Staged changes:
+ src/auth/passwordReset.ts (new file)
+ 45 lines
Generated commit:
feat(auth): add password reset functionality
Staged changes:
M src/api/userProfile.ts
- return user.profile
+ return user.profile || defaultProfile
Generated commit:
fix(api): handle null values in user profile endpoint
Previously the endpoint would crash when users had incomplete profiles.
Added fallback to default profile object to prevent null reference errors.
Staged changes:
M README.md
+ Installation section
+ 20 lines added
Generated commit:
docs: add installation instructions to readme
Staged changes:
M src/utils/validation.ts
M src/components/Form.tsx
+ src/utils/validators.ts (new file)
Generated commit:
refactor(utils): extract validation logic into separate module
Moved reusable validators to dedicated module for better code organization
and to enable reuse across multiple components.
Staged changes:
M src/components/Button.tsx
M src/components/Input.tsx
M src/styles/global.css
Generated commit:
style: apply consistent formatting to component files
| Tool | Purpose | Check Command |
|------|---------|---------------|
| Git | Version control | git --version |
| Git Config | User identity | git config user.name && git config user.email |
Error: Not a git repository
git init or navigate to a git repositoryError: No staged files
git add <file> or git add .Error: User identity unknown
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Error: Empty commit message
git diff --cachedError: Hook failed
--no-verify if appropriateFor breaking changes, add an exclamation mark after type/scope and include BREAKING CHANGE in footer.
If changes affect multiple scopes but are tightly related, use comma-separated scopes.
Include issue references in body or footer (e.g., Fixes #123 or Closes #456).
development
Review a tech spec document written in the team's Notion template format (Summary, Background, Goals, Non-Goals, Plan, Measuring Impact, Security/Privacy/Risks, Other Considerations, Milestones, Open Questions). Use when the user asks to "테크 스펙 리뷰", "tech spec 리뷰", "스펙 문서 리뷰", "이 스펙 봐줘", or provides a Notion/Google Docs/Markdown tech spec link or file and asks for feedback, critique, or readiness check before sharing with the team.
tools
Draft a daily standup from the current user's Slack, GitHub, Linear, and Google Calendar activity. Use when the user asks to create, prepare, or summarize a standup/status update from connected app activity; to collect a user's work for a date; or to verify whether Slack, GitHub, Linear, and Google Calendar connectors/MCP tools are available before drafting a standup.
development
List and resume previous coding agent sessions by loading their context into the current session. Use when the user wants to (1) see previous sessions for the current directory with summaries, (2) continue work from a previous session by loading its full conversation context, (3) recover work from an interrupted session, or (4) transfer context between sessions. Supports Claude Code and Codex sessions.
development
Pre-push CodeRabbit review-fix loop. Runs local CodeRabbit review, fixes valid issues, and repeats until clean so the branch passes CodeRabbit review on push with no additional comments. Use when the user says "review and fix", "review loop", or wants to ensure the branch is CodeRabbit-clean before pushing.