commit 1d65a41208a82fddd3c0ac63d38b291d2f7d3bb5 Author: Zhongwei Li Date: Sun Nov 30 08:48:50 2025 +0800 Initial commit diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..d8e7db6 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,13 @@ +{ + "name": "auto-formatter", + "description": "Automatic code formatting hook that runs after file edits", + "version": "1.0.0", + "author": { + "name": "Example Developer", + "email": "developer@example.com", + "url": "https://example.com" + }, + "hooks": [ + "./hooks" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..5afab84 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# auto-formatter + +Automatic code formatting hook that runs after file edits diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..b97d4f1 --- /dev/null +++ b/hooks/hooks.json @@ -0,0 +1,37 @@ +{ + "hooks": { + "PostToolUse": [ + { + "matcher": "Write|Edit", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/scripts/format-file.sh" + } + ] + } + ], + "PreToolUse": [ + { + "matcher": "Bash(rm:*)", + "hooks": [ + { + "type": "notification", + "message": "⚠️ Warning: About to delete files. Make sure you have backups if needed." + } + ] + } + ], + "SessionStart": [ + { + "matcher": ".*", + "hooks": [ + { + "type": "notification", + "message": "✨ Auto-formatter plugin loaded. Files will be formatted automatically after edits." + } + ] + } + ] + } +} diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..0b7750d --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,45 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:rafaelcalleja/claude-market-place:plugins/auto-formatter", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "d0c594b74db472920111ed6dfd0fff1e6bbb6a37", + "treeHash": "638581f638db31572676b1d74ee0755ac41d53c6ea04b4420992e3464f4c1e6b", + "generatedAt": "2025-11-28T10:27:43.712017Z", + "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": "auto-formatter", + "description": "Automatic code formatting hook that runs after file edits", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "f07045a9d8fbe2d50f0695673a9cfa5e1c1eb18a00586a282cf275f627d731b2" + }, + { + "path": "hooks/hooks.json", + "sha256": "d44e300712b4de5c3c06f25771dfd031e243cad5c2b16b5f20eb14e28b28ad97" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "1ea5d4db201dc1b12a661c2782ecb81627a0857637d9c7f78a01ef501123a534" + } + ], + "dirSha256": "638581f638db31572676b1d74ee0755ac41d53c6ea04b4420992e3464f4c1e6b" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file