From e1ea5bc92639a7dd06ab7fb32de27614ea7e83c0 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sun, 30 Nov 2025 08:52:33 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 12 ++++++++++ README.md | 3 +++ hooks/hooks.json | 15 +++++++++++++ plugin.lock.json | 45 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.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..9a6f8b0 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "go-formatter", + "description": "Automatically format Go files with gofmt after Write/Edit/MultiEdit operations", + "version": "1.0.1", + "author": { + "name": "robbyt", + "email": "robbyt@robbyt.net" + }, + "hooks": [ + "./hooks" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..5f02c1a --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# go-formatter + +Automatically format Go files with gofmt after Write/Edit/MultiEdit operations diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..4583a53 --- /dev/null +++ b/hooks/hooks.json @@ -0,0 +1,15 @@ +{ + "hooks": { + "PostToolUse": [ + { + "matcher": "Write|Edit|MultiEdit", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/scripts/format-go.sh" + } + ] + } + ] + } +} diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..2a04f2f --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,45 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:robbyt/claude-skills:plugins/go-formatter", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "43cc011bbe0d51fbfcc507f3acd2308dc50907c8", + "treeHash": "d08f7f17cf9da12b32c6bdef17bde814a3c9bd4a06875750c9bc20df7b7c8f18", + "generatedAt": "2025-11-28T10:28:00.699552Z", + "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": "go-formatter", + "description": "Automatically format Go files with gofmt after Write/Edit/MultiEdit operations", + "version": "1.0.1" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "c6a9febda724f26805a18eb7df313ddc639ed3ddf64edeee27382dba3ef0c944" + }, + { + "path": "hooks/hooks.json", + "sha256": "f8a54b5287a119eec4e620c305a0df54c9fca12582f6223307e8e7891778f680" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "db2563209832ba9db24971a9965dde470d6c21de274d2904f0feebf0b40a1fdd" + } + ], + "dirSha256": "d08f7f17cf9da12b32c6bdef17bde814a3c9bd4a06875750c9bc20df7b7c8f18" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file