Initial commit
This commit is contained in:
14
.claude-plugin/plugin.json
Normal file
14
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "git",
|
||||
"description": "Common repository operations for git",
|
||||
"version": "0.3.0",
|
||||
"author": {
|
||||
"name": "Aotokitsuruya"
|
||||
},
|
||||
"commands": [
|
||||
"./commands"
|
||||
],
|
||||
"hooks": [
|
||||
"./hooks"
|
||||
]
|
||||
}
|
||||
44
commands/commit.md
Normal file
44
commands/commit.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
allowed-tools: Read, TodoWrite, Bash(git status:*), Bash(git log:*), Bash(git diff:*)
|
||||
description: Create a git commit message based on current context
|
||||
---
|
||||
|
||||
# Rule
|
||||
|
||||
The `<execute>ARGUMENTS</execute>` will execute the main procedure.
|
||||
|
||||
# Role
|
||||
|
||||
You are a assistant to write git commit messages.
|
||||
|
||||
# Conventional Commits
|
||||
|
||||
By the default, follow Conventional Commits specification unless instructed otherwise.
|
||||
|
||||
- According the context determine the appropriate type, scope, and description for the commit message.
|
||||
- Ensure the scope is relevant to the changes made. e.g. monorepo subdirectory, specific feature, bug fix area.
|
||||
|
||||
# Co-Authored-By
|
||||
|
||||
When this command is executed without any prior conversation history, it means the changes is made solely by the user. In this case, do not include any "Co-Authored-By" lines in the commit message.
|
||||
|
||||
# Definition
|
||||
|
||||
<procedure name="main">
|
||||
<description>Create a git commit message based on current context</description>
|
||||
<condition if="has conversation history">
|
||||
<step>1. Analyze the recent conversation history to understand the changes made</step>
|
||||
</condition>
|
||||
<step>2. Use "git" command to get changed files and their statuses</step>
|
||||
<step>3. Based on the changes and conversation context, generate a concise and descriptive git commit message</step>
|
||||
<step>4. Use same style and tone as previous commit messages if available</step>
|
||||
<condition if="no conversation history">
|
||||
<step>6. Remove "Co-Authored-by" lines from the commit message if present</step>
|
||||
</condition>
|
||||
<step>5. Use Bash tool to make commit for the changes with the generated message</step>
|
||||
<return>Commit confirmation message</return>
|
||||
</procedure>
|
||||
|
||||
# Task
|
||||
|
||||
<execute name="main">$ARGUMENTS</execute>
|
||||
16
hooks/hooks.json
Normal file
16
hooks/hooks.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"description": "Automatic make git operation if condition met",
|
||||
"hooks": {
|
||||
"Stop": [
|
||||
{
|
||||
"matcher": "",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "${CLAUDE_PLUGIN_ROOT}/dist/commit.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
53
plugin.lock.json
Normal file
53
plugin.lock.json
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||
"pluginId": "gh:elct9620/claudekit:plugins/git",
|
||||
"normalized": {
|
||||
"repo": null,
|
||||
"ref": "refs/tags/v20251128.0",
|
||||
"commit": "1e96034590a18695826b53eb48b2f2ca5bb6cef5",
|
||||
"treeHash": "27457f223a84b0bca38d20b1a58e9d119c602d368e33ee9aa816cf8238bb96fd",
|
||||
"generatedAt": "2025-11-28T10:16:44.755669Z",
|
||||
"toolVersion": "publish_plugins.py@0.2.0"
|
||||
},
|
||||
"origin": {
|
||||
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||
"branch": "master",
|
||||
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||
},
|
||||
"manifest": {
|
||||
"name": "git",
|
||||
"description": "Common repository operations for git",
|
||||
"version": "0.3.0"
|
||||
},
|
||||
"content": {
|
||||
"files": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"sha256": "6f638774e3d9001e686422041cdc4a69a468227487a2f73d0399cd0d701e5c1a"
|
||||
},
|
||||
{
|
||||
"path": "hooks/hooks.json",
|
||||
"sha256": "6cb87d08b245550d97bb03484b4621834632978bd07b50eec975b0118e938d0b"
|
||||
},
|
||||
{
|
||||
"path": ".claude-plugin/plugin.json",
|
||||
"sha256": "7843554c98685c7a04212483232989d836a46565624363a085baef3a678fdfd8"
|
||||
},
|
||||
{
|
||||
"path": "commands/ignore.md",
|
||||
"sha256": "bcb9ac9132d27e5d17250f3ff785273f6f764950fb2544f3358fed739f7ac9fb"
|
||||
},
|
||||
{
|
||||
"path": "commands/commit.md",
|
||||
"sha256": "4f1fbafaba4071740a115c92fbe99522816421b4a5a06ae58f2e04f47cdac81f"
|
||||
}
|
||||
],
|
||||
"dirSha256": "27457f223a84b0bca38d20b1a58e9d119c602d368e33ee9aa816cf8238bb96fd"
|
||||
},
|
||||
"security": {
|
||||
"scannedAt": null,
|
||||
"scannerVersion": null,
|
||||
"flags": []
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user