
commit-change
by MedianAura
A TypeScript CLI tool that scans git changes for files matching header comments or path patterns, then validates those files against specific patterns. Perfect for enforcing code quality rules in git hooks and CI/CD pipelines.
SKILL.md
name: commit-change description: Creates a git commit following the project's commit message format specified in INSTRUCTIONS.md.
Commit Change
Create a git commit following the project's commit message format.
When to Use
- When asked to commit changes
- After completing a feature or fix
- When the user wants to save their work to git
Instructions
-
Review Changes: First, run these commands in parallel:
git statusto see all untracked filesgit diffto see both staged and unstaged changesgit log -5 --onelineto see recent commit messages
-
Quality Checks: Before committing, verify code quality:
- Run
npm run checkto verify the codebase (formatting, linting, type-checking) - If check fails, run
npm run fixto automatically resolve issues - Run
npm run buildto ensure all workspaces build successfully - Run
npm run testif applicable to ensure tests pass
- Run
-
Draft Commit Message: Analyze the changes and draft a commit message using this format:
<type>: <description> <body>Types:
feat: New end-user functionality or featuresui: User interface changes (layout, styling, components)ux: User experience changes (interactions, flow improvements)fix: Bug fixes for end-user issuesmaintenance: Non-behavioral changes (scripts, configs, tooling)dep: Dependency updates (add, remove, update packages)docs: Documentation changesrefactor: Code restructuring without behavior changetest: Test-related changes
Body: 1-3 sentences describing what the changes do and why. Focus on the purpose and impact, not just what was changed.
-
IMPORTANT Restrictions:
- DO NOT include AI attribution (no "🤖 Generated with Claude Code")
- DO NOT include co-author tags (no "Co-Authored-By: Claude")
- Keep the message concise and professional
- Focus on the "why" rather than just the "what"
-
Stage and Commit:
- Add relevant untracked files to the staging area with
git add - Write the commit message to
.git/COMMIT_EDITMSG:printf "<type>: <description>\n\n<body>\n" > .git/COMMIT_EDITMSG - Create the commit using the message file:
git commit -F .git/COMMIT_EDITMSG - Run
git statusafter the commit to verify success
- Add relevant untracked files to the staging area with
-
Handle Pre-commit Hooks: If the commit fails due to pre-commit hook changes:
- Check authorship:
git log -1 --format='%an %ae' - Check if pushed:
git statusshould show "Your branch is ahead" - If both are true: amend the commit
- Otherwise: create a NEW commit (never amend other developers' commits)
- Check authorship:
-
Commit Organization: Group related changes into logical commits:
- Single feature/fix: One commit with all related files
- Multiple unrelated changes: Create separate commits for each logical change
- Don't separate a feature from its tests
- Don't split configuration changes that are related
Examples
feat: add user authentication flow
Implemented JWT-based authentication with login/logout endpoints and middleware for protected routes.
fix: resolve navigation routing issue
Fixed a bug where navigation links were not updating the URL correctly in nested routes.
maintenance: add test scripts to package.json
Added npm scripts for running tests in different modes to improve developer workflow.
Notes
- DO NOT push to remote unless explicitly requested
- Avoid using
git commit -ior other interactive flags - If there are no changes, do not create an empty commit
- Always verify that quality checks pass before committing
- IMPORTANT IMPORTANT IMPORTANT IMPORTANT : Never include the User Story Number since there are duplicate
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon