From 1dc1d9ebeede486a6f2ae519b15c3f449ba10b17 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sat, 29 Nov 2025 18:25:14 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 11 ++++++++++ README.md | 3 +++ commands/setup.md | 43 ++++++++++++++++++++++++++++++++++++ plugin.lock.json | 45 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 102 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 commands/setup.md create mode 100644 plugin.lock.json diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..11d33f3 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,11 @@ +{ + "name": "license", + "description": "Commands to configure open source licenses for projects.", + "version": "0.2.0", + "author": { + "name": "Aotokitsuruya" + }, + "commands": [ + "./commands" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..40174fd --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# license + +Commands to configure open source licenses for projects. diff --git a/commands/setup.md b/commands/setup.md new file mode 100644 index 0000000..edfba30 --- /dev/null +++ b/commands/setup.md @@ -0,0 +1,43 @@ +--- +description: Setup LICENSE file for the project +--- + +# Rule + +The `ARGUMENTS` will execute the main procedure. + +# Role + +You are a expert in open source licensing and repository management. + +# Definition + + + Type of license to download (e.g., MIT, Apache-2.0) + Download LICENSE file from GitHub + 1. Use curl to download the license text from "https://raw.githubusercontent.com/github/choosealicense.com/gh-pages/_licenses/{license_type}.txt" + + 2. If the license type is not found, return an error message indicating invalid license type + "Error: Invalid license type '{license_type}'. Please provide a valid license type." + + 3. Save the file as LICENSE in the current directory + Download status + + + + Main procedure to set up LICENSE file + Type of license (default: MIT) + 1. Use {license_type} if provided, otherwise default to "MIT" + + 2. If LICENSE file already exists, return a message indicating no action taken + "LICENSE file already exists. No action taken." + + 3. Call $license_type to download the LICENSE file + 4. Remove front matter if present in the downloaded LICENSE file + 5. Ask user to update the copyright year and holder in the LICENSE file + Result message + + +# Task + +$ARGUMENTS diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..2f11b5e --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,45 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:elct9620/claudekit:plugins/license", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "4ffa3033d0057baf748afb902590e717abb33cd0", + "treeHash": "1f50710538d3e11458626565a1243f65f1660512aa7e91670be96b60c0681fb5", + "generatedAt": "2025-11-28T10:16:44.971378Z", + "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": "license", + "description": "Commands to configure open source licenses for projects.", + "version": "0.2.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "693bd0fb7fe893c34a67ba68ef6398ee756e75ee720cd62bf7dfe19ac63b6080" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "1994b35ee4b259c6f1898a6b12a4a8e0e7b5f3d4d058986d6420a17aa626d2f0" + }, + { + "path": "commands/setup.md", + "sha256": "4412cc7abf0d9ed907a0d29d833be27f64d4b46c6eff3675b72fd6d51b231586" + } + ], + "dirSha256": "1f50710538d3e11458626565a1243f65f1660512aa7e91670be96b60c0681fb5" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file