From 0d6226e0d80cd717ae74dc79acd6de226d41e987 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sat, 29 Nov 2025 18:20:25 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 19 + README.md | 3 + agents/commit-assistant.md | 1038 +++++++++++++++++ .../atomic-commit/.scripts/commit-planner.py | 342 ++++++ .../.scripts/dependency-checker.sh | 328 ++++++ .../atomic-commit/.scripts/file-grouper.sh | 395 +++++++ .../atomic-commit/.scripts/split-analyzer.py | 283 +++++ commands/atomic-commit/analyze-splitting.md | 138 +++ commands/atomic-commit/create-sequence.md | 352 ++++++ commands/atomic-commit/group-files.md | 209 ++++ commands/atomic-commit/interactive-split.md | 455 ++++++++ commands/atomic-commit/skill.md | 99 ++ commands/atomic-commit/suggest-commits.md | 272 +++++ .../.scripts/atomicity-checker.py | 186 +++ .../.scripts/git-diff-analyzer.sh | 103 ++ .../.scripts/scope-identifier.sh | 131 +++ .../commit-analysis/.scripts/type-detector.py | 246 ++++ commands/commit-analysis/analyze-changes.md | 196 ++++ commands/commit-analysis/assess-atomicity.md | 363 ++++++ commands/commit-analysis/detect-type.md | 341 ++++++ commands/commit-analysis/file-stats.md | 327 ++++++ commands/commit-analysis/identify-scope.md | 231 ++++ commands/commit-analysis/skill.md | 65 ++ .../.scripts/amend-safety.sh | 259 ++++ .../.scripts/commit-reviewer.py | 345 ++++++ .../.scripts/pre-commit-check.sh | 322 +++++ .../.scripts/revert-helper.sh | 259 ++++ .../commit-best-practices/USAGE_EXAMPLES.md | 255 ++++ .../commit-best-practices/amend-guidance.md | 373 ++++++ .../commit-best-practices/check-pre-commit.md | 214 ++++ .../commit-best-practices/revert-guidance.md | 419 +++++++ .../commit-best-practices/review-commit.md | 347 ++++++ commands/commit-best-practices/skill.md | 78 ++ .../commit-best-practices/workflow-tips.md | 607 ++++++++++ .../.scripts/changes-detector.sh | 70 ++ .../.scripts/conflict-detector.py | 173 +++ .../.scripts/repo-checker.sh | 54 + .../.scripts/state-analyzer.sh | 183 +++ .../commit-error-handling/diagnose-issues.md | 466 ++++++++ .../commit-error-handling/handle-conflicts.md | 310 +++++ .../handle-detached-head.md | 366 ++++++ .../handle-no-changes.md | 220 ++++ .../commit-error-handling/handle-no-repo.md | 161 +++ commands/commit-error-handling/skill.md | 96 ++ commands/commit-review.md | 686 +++++++++++ commands/commit-split.md | 835 +++++++++++++ commands/commit.md | 655 +++++++++++ .../.scripts/convention-recommender.py | 408 +++++++ .../.scripts/pattern-detector.py | 421 +++++++ .../.scripts/scope-extractor.sh | 230 ++++ .../.scripts/style-analyzer.sh | 232 ++++ commands/history-analysis/analyze-style.md | 245 ++++ commands/history-analysis/detect-patterns.md | 302 +++++ commands/history-analysis/extract-scopes.md | 378 ++++++ commands/history-analysis/learn-project.md | 586 ++++++++++ commands/history-analysis/skill.md | 118 ++ .../history-analysis/suggest-conventions.md | 431 +++++++ .../.scripts/body-composer.sh | 304 +++++ .../.scripts/footer-builder.py | 292 +++++ .../.scripts/message-validator.sh | 335 ++++++ .../.scripts/subject-generator.py | 354 ++++++ commands/message-generation/add-footer.md | 371 ++++++ .../message-generation/complete-message.md | 592 ++++++++++ .../message-generation/generate-subject.md | 246 ++++ commands/message-generation/skill.md | 93 ++ .../message-generation/validate-message.md | 494 ++++++++ commands/message-generation/write-body.md | 309 +++++ hooks/hooks.json | 13 + plugin.lock.json | 305 +++++ 69 files changed, 20934 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 agents/commit-assistant.md create mode 100755 commands/atomic-commit/.scripts/commit-planner.py create mode 100755 commands/atomic-commit/.scripts/dependency-checker.sh create mode 100755 commands/atomic-commit/.scripts/file-grouper.sh create mode 100755 commands/atomic-commit/.scripts/split-analyzer.py create mode 100644 commands/atomic-commit/analyze-splitting.md create mode 100644 commands/atomic-commit/create-sequence.md create mode 100644 commands/atomic-commit/group-files.md create mode 100644 commands/atomic-commit/interactive-split.md create mode 100644 commands/atomic-commit/skill.md create mode 100644 commands/atomic-commit/suggest-commits.md create mode 100755 commands/commit-analysis/.scripts/atomicity-checker.py create mode 100755 commands/commit-analysis/.scripts/git-diff-analyzer.sh create mode 100755 commands/commit-analysis/.scripts/scope-identifier.sh create mode 100755 commands/commit-analysis/.scripts/type-detector.py create mode 100644 commands/commit-analysis/analyze-changes.md create mode 100644 commands/commit-analysis/assess-atomicity.md create mode 100644 commands/commit-analysis/detect-type.md create mode 100644 commands/commit-analysis/file-stats.md create mode 100644 commands/commit-analysis/identify-scope.md create mode 100644 commands/commit-analysis/skill.md create mode 100755 commands/commit-best-practices/.scripts/amend-safety.sh create mode 100755 commands/commit-best-practices/.scripts/commit-reviewer.py create mode 100755 commands/commit-best-practices/.scripts/pre-commit-check.sh create mode 100755 commands/commit-best-practices/.scripts/revert-helper.sh create mode 100644 commands/commit-best-practices/USAGE_EXAMPLES.md create mode 100644 commands/commit-best-practices/amend-guidance.md create mode 100644 commands/commit-best-practices/check-pre-commit.md create mode 100644 commands/commit-best-practices/revert-guidance.md create mode 100644 commands/commit-best-practices/review-commit.md create mode 100644 commands/commit-best-practices/skill.md create mode 100644 commands/commit-best-practices/workflow-tips.md create mode 100755 commands/commit-error-handling/.scripts/changes-detector.sh create mode 100755 commands/commit-error-handling/.scripts/conflict-detector.py create mode 100755 commands/commit-error-handling/.scripts/repo-checker.sh create mode 100755 commands/commit-error-handling/.scripts/state-analyzer.sh create mode 100644 commands/commit-error-handling/diagnose-issues.md create mode 100644 commands/commit-error-handling/handle-conflicts.md create mode 100644 commands/commit-error-handling/handle-detached-head.md create mode 100644 commands/commit-error-handling/handle-no-changes.md create mode 100644 commands/commit-error-handling/handle-no-repo.md create mode 100644 commands/commit-error-handling/skill.md create mode 100644 commands/commit-review.md create mode 100644 commands/commit-split.md create mode 100644 commands/commit.md create mode 100755 commands/history-analysis/.scripts/convention-recommender.py create mode 100755 commands/history-analysis/.scripts/pattern-detector.py create mode 100755 commands/history-analysis/.scripts/scope-extractor.sh create mode 100755 commands/history-analysis/.scripts/style-analyzer.sh create mode 100644 commands/history-analysis/analyze-style.md create mode 100644 commands/history-analysis/detect-patterns.md create mode 100644 commands/history-analysis/extract-scopes.md create mode 100644 commands/history-analysis/learn-project.md create mode 100644 commands/history-analysis/skill.md create mode 100644 commands/history-analysis/suggest-conventions.md create mode 100755 commands/message-generation/.scripts/body-composer.sh create mode 100755 commands/message-generation/.scripts/footer-builder.py create mode 100755 commands/message-generation/.scripts/message-validator.sh create mode 100755 commands/message-generation/.scripts/subject-generator.py create mode 100644 commands/message-generation/add-footer.md create mode 100644 commands/message-generation/complete-message.md create mode 100644 commands/message-generation/generate-subject.md create mode 100644 commands/message-generation/skill.md create mode 100644 commands/message-generation/validate-message.md create mode 100644 commands/message-generation/write-body.md create mode 100644 hooks/hooks.json create mode 100644 plugin.lock.json diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..7eb5c0d --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,19 @@ +{ + "name": "git-commit-assistant", + "description": "Intelligent git commit helper with semantic commit message generation, change analysis, and atomic commit guidance using conventional commits format", + "version": "1.0.0", + "author": { + "name": "Daniel Hofheinz", + "email": "daniel@danielhofheinz.com", + "url": "https://github.com/dhofheinz/open-plugins" + }, + "agents": [ + "./agents" + ], + "commands": [ + "./commands" + ], + "hooks": [ + "./hooks" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..970e3cb --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# git-commit-assistant + +Intelligent git commit helper with semantic commit message generation, change analysis, and atomic commit guidance using conventional commits format diff --git a/agents/commit-assistant.md b/agents/commit-assistant.md new file mode 100644 index 0000000..2ecc10d --- /dev/null +++ b/agents/commit-assistant.md @@ -0,0 +1,1038 @@ +--- +name: commit-assistant +description: Expert git commit specialist for semantic commit message generation, change analysis, and atomic commit guidance. Proactively helps when creating commits, analyzing changes, or discussing git workflows. Use immediately when user mentions commits, git messages, or code changes to commit. +capabilities: [commit-message-generation, change-analysis, semantic-commit-formatting, atomic-commit-guidance, conventional-commits-enforcement, git-best-practices] +tools: Bash, Read, Grep, Glob +model: inherit +--- + +# Git Commit Assistant - Expert in Commit Best Practices + +You are an expert in git commit best practices, conventional commits, and semantic versioning. Your role is to help developers create clear, meaningful, and well-structured commits that improve code maintainability and project history. + +## Core Expertise + +### Conventional Commits Standard + +You are an authority on the Conventional Commits specification (conventionalcommits.org). You know: + +**Format:** +``` +(): + + + +