Create well-structured git commits with meaningful messages that maintain a clean, traceable project history.
/plugin marketplace add marcel-Ngan/ai-dev-team/plugin install marcel-ngan-ai-dev-team@marcel-Ngan/ai-dev-teamThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Create well-structured git commits with meaningful messages that maintain a clean, traceable project history.
git CLI commandsgh CLI (GitHub CLI){
"owner": "{{github.owner}}",
"repo": "{{github.repo}}",
"defaultBranch": "{{github.defaultBranch}}"
}
<type>(<scope>): <subject>
<body>
<footer>
| Type | Description | Example |
|---|---|---|
feat | New feature | feat(auth): add password reset |
fix | Bug fix | fix(api): handle null response |
docs | Documentation | docs: update API readme |
style | Formatting | style: fix indentation |
refactor | Code restructure | refactor(db): simplify queries |
test | Adding tests | test: add auth unit tests |
chore | Maintenance | chore: update dependencies |
perf | Performance | perf(query): add index |
ci | CI/CD changes | ci: add lint workflow |
build | Build system | build: upgrade webpack |
revert | Revert commit | revert: feat(auth)... |
feat(auth): authentication module
feat(api/users): users API endpoint
fix(ui/button): button component
docs(readme): README file
## Good Commit Messages
✅ feat(auth): add JWT token refresh endpoint
✅ fix(cart): prevent negative quantities in cart
✅ docs(api): document rate limiting behavior
✅ refactor(user-service): extract validation logic
## Bad Commit Messages
❌ fixed stuff
❌ WIP
❌ updates
❌ feat: changes to the authentication system including login logout and password reset functionality
# Check status
git status
# Stage specific files
git add path/to/file.ts
# Stage all changes
git add .
# Stage interactively
git add -p
# Commit with message
git commit -m "feat(scope): add feature"
# Commit with body
git commit -m "feat(scope): add feature" -m "Detailed description of the changes."
# Amend last commit (unpushed only)
git commit --amend -m "feat(scope): corrected message"
# Amend without changing message
git commit --amend --no-edit
# View commit log
git log --oneline -10
# View with graph
git log --oneline --graph --all
# View specific file history
git log --oneline -- path/to/file.ts
# View commit details
git show <commit-hash>
# View diff between commits
git diff <commit1> <commit2>
# Undo last commit (keep changes staged)
git reset --soft HEAD~1
# Undo last commit (keep changes unstaged)
git reset HEAD~1
# Undo last commit (discard changes) - DANGEROUS
git reset --hard HEAD~1
# Revert a pushed commit (creates new commit)
git revert <commit-hash>
# Cherry-pick commit from another branch
git cherry-pick <commit-hash>
feat({{scope}}): {{brief description}}
- Add {{functionality}}
- Implement {{behavior}}
- Update {{related component}}
Closes #{{issueNumber}}
fix({{scope}}): {{brief description}}
**Problem:**
{{description of the bug}}
**Solution:**
{{how it was fixed}}
Fixes #{{issueNumber}}
feat({{scope}})!: {{brief description}}
BREAKING CHANGE: {{description of breaking change}}
**Migration:**
{{steps to migrate}}
Closes #{{issueNumber}}
| Principle | Description |
|---|---|
| Single Purpose | One logical change per commit |
| Complete | Commit should not break the build |
| Self-Contained | Can be understood in isolation |
| Testable | Changes can be verified |
## Feature: User Authentication
Instead of one large commit:
❌ "feat: add user authentication"
Break into atomic commits:
✅ "feat(auth): add user model and migration"
✅ "feat(auth): implement password hashing utility"
✅ "feat(auth): add login endpoint"
✅ "feat(auth): add logout endpoint"
✅ "test(auth): add authentication unit tests"
✅ "docs(auth): document auth API endpoints"
# Reference in commit message
git commit -m "feat(auth): add login endpoint
Implements MDDEV-123"
# Reference with action
git commit -m "fix(cart): handle empty cart
Fixes MDDEV-456"
# Multiple references
git commit -m "refactor(api): consolidate endpoints
Related to MDDEV-100, MDDEV-101"
# Transition issue
git commit -m "MDDEV-123 #done feat(auth): complete login"
# Log time
git commit -m "MDDEV-123 #time 2h feat(auth): implement login"
# Add comment
git commit -m "MDDEV-123 #comment Code complete, ready for review"
#!/bin/sh
# .git/hooks/pre-commit
# Run linter
npm run lint
# Run tests
npm test
# Check commit message format
# (use commitlint for this)
// commitlint.config.js
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-enum': [2, 'always', ['auth', 'api', 'ui', 'db', 'ci']],
'subject-case': [2, 'always', 'lower-case'],
'body-max-line-length': [2, 'always', 100],
},
};
✅ Write in imperative mood ("Add feature" not "Added feature")
✅ Keep subject line under 50 characters
✅ Wrap body at 72 characters
✅ Explain what and why, not how
✅ Reference relevant issues/tickets
✅ Make commits atomic and focused
✅ Test before committing
❌ Commit broken code
❌ Mix unrelated changes
❌ Write vague messages ("fix bug", "update")
❌ Include generated files (build output, node_modules)
❌ Commit secrets or credentials
❌ Use --force without understanding impact
❌ Amend published commits
| Agent | Commit Management Use |
|---|---|
| Senior Developer | Reviews commit history, enforces standards |
| Junior Developer | Creates feature commits |
| DevOps Engineer | CI/CD commit triggers |
| QA Engineer | References commits in bug reports |
| Error | Cause | Resolution |
|---|---|---|
| Pre-commit hook failed | Lint/test errors | Fix issues, try again |
| Nothing to commit | No staged changes | git add files first |
| Detached HEAD | Not on a branch | git checkout <branch> |
| Merge conflict | Concurrent changes | Resolve conflicts, commit |
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.