From 2cb8de5f12375c7ce2d83dd597240c7166dc6a31 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sun, 30 Nov 2025 08:52:41 +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..b79ccca --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "python-formatter-ruff", + "description": "Automatically format Python files with Ruff after Write/Edit/MultiEdit operations", + "version": "1.0.0", + "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..33a0018 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# python-formatter-ruff + +Automatically format Python files with Ruff after Write/Edit/MultiEdit operations diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..efa27db --- /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-python.sh" + } + ] + } + ] + } +} diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..54e89b0 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,45 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:robbyt/claude-skills:plugins/python-formatter-ruff", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "db5386c9564cc3fda0bd2ca634542b80e5e0b92f", + "treeHash": "d1de91acaac9c6768a349833a91875672881dac041380010a9c4a5c3afff1f7b", + "generatedAt": "2025-11-28T10:28:01.097093Z", + "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": "python-formatter-ruff", + "description": "Automatically format Python files with Ruff after Write/Edit/MultiEdit operations", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "74a13153098c490583f22074738a7fd01ed0e7bab0d600169cc7526e10d34e5e" + }, + { + "path": "hooks/hooks.json", + "sha256": "c4b75231d258d39432e78d9b7dd233dcbd1dcb047aa6b1a5e72757f74f510cdd" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "7a9b15af505607d8f935f2493a7ec1125cad0d3e5321d7e755c4193bb450acd8" + } + ], + "dirSha256": "d1de91acaac9c6768a349833a91875672881dac041380010a9c4a5c3afff1f7b" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file