Agent skill

git-commit-assistant

Assists with careful Git commits in any repository. Activates when committing changes, checking .gitignore, or generating commit messages. Ensures proper file exclusion (credentials, MCP configs, personal settings), identifies untracked files, and generates Conventional Commits messages with Japanese explanations.

Stars 1
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/fubira/claude-code-settings/tree/main/skills/git-commit-assistant

SKILL.md

Git Commit Assistant Skill

Safe, high-quality Git commits. Sensitive file exclusion, .gitignore management, Conventional Commits message generation.

Activation Triggers

  • "commit", ".gitignore", push-related requests

Workflow

Phase 1: Repository Analysis

  1. git status --porcelain + git branch --show-current to check state
  2. Read .gitignore, suggest missing required patterns

Phase 2: File Classification

AUTO_EXCLUDE (never commit):

  • Secrets: *.key, *.pem, *credentials*, *secret*, *password*, .env*
  • MCP config: .claude.json, .mcp.json*
  • Personal settings: settings.json, settings.local.json, IDE configs
  • Build artifacts: node_modules/, dist/, build/, vendor/, *.log, *.cache
  • OS: .DS_Store, Thumbs.db

AUTO_COMMIT (generally safe):

  • Source code (src/**, internal/**, lib/**), tests, docs (*.md)
  • Shared config (.gitignore, package.json, tsconfig.json, go.mod, .github/workflows/*)
  • Skills/Knowledge (~/.claude/skills/**, ~/.claude/knowledge/**)

CONFIRM (user decision): Files > 1MB, new directories, executables, unclassified config files

Phase 3: Commit Message Generation

  1. Analyze changes from git diff --cached and git status
  2. Generate Conventional Commits message:
    <type>(<scope>): <subject>  ← English, max 50 chars, imperative
    
    - <description (Japanese OK)>
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    
    • 3-5 bullets explaining what/why/impact. No file lists
  3. Present to user for confirmation

Phase 4: Commit & Push

  1. Stage with git add / git rm
  2. Commit using heredoc, verify success
  3. Push only after user confirmation

Sensitive Content Scan

Scan diff before commit:

  • API keys: [A-Za-z0-9_-]{20,}
  • Passwords: password.*=.*
  • URLs with credentials: ://.*:.*@

Warn and abort commit on detection.

Error Handling

Error Action
Merge conflict Prompt resolution, show conflict files
Detached HEAD Suggest git switch -c <branch>
Nothing to commit Report clearly

Supporting Files

  • rules/gitignore-patterns.md: .gitignore pattern library
  • rules/file-classification.md: Detailed file classification rules
  • templates/commit-message.md: Message template and examples

Expand your agent's capabilities with these related and highly-rated skills.

fubira/claude-code-settings

refactoring-assistant

Assists with code refactoring by detecting code smells, suggesting improvements, and providing refactoring patterns. Activates when writing/editing code, explicitly requested refactoring, or when code quality issues are detected. Maintains awareness of core principles while providing detailed patterns and examples.

1 0
Explore
fubira/claude-code-settings

code-reviewer

Assists with code review by analyzing code changes for quality, best practices, security, and potential issues. Activates after implementing code features, bug fixes, or refactorings. Provides structured feedback with critical issues, suggestions, and positive highlights.

1 0
Explore
fubira/claude-code-settings

context-compactor

Analyzes and compacts context-affecting documents (project memory, CLAUDE.md, skill files) to reduce token usage and compaction frequency. Manual trigger only. Always requires user approval before making changes.

1 0
Explore
fubira/claude-code-settings

test-executor

Executes tests, analyzes test results, checks test coverage, and provides comprehensive testing status overview. Primarily for Go projects. Activates after implementing/modifying code to verify correctness, or when explicitly requested to assess test suite health.

1 0
Explore
fubira/claude-code-settings

knowledge-manager

Manages a structured knowledge base of patterns, troubleshooting guides, best practices, and workflows. Activates when discovering reusable insights, solving technical problems, or establishing new standards. Records knowledge in categorized files for future reference without bloating global CLAUDE.md.

1 0
Explore
fubira/claude-code-settings

release-assistant

Automates and ensures reliable release workflows with automatic version bump based on commit history, mandatory lint/build/test execution before release, and safe tag creation and push.

1 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results