Initial commit
This commit is contained in:
11
.claude-plugin/plugin.json
Normal file
11
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "license",
|
||||||
|
"description": "Commands to configure open source licenses for projects.",
|
||||||
|
"version": "0.2.0",
|
||||||
|
"author": {
|
||||||
|
"name": "Aotokitsuruya"
|
||||||
|
},
|
||||||
|
"commands": [
|
||||||
|
"./commands"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# license
|
||||||
|
|
||||||
|
Commands to configure open source licenses for projects.
|
||||||
43
commands/setup.md
Normal file
43
commands/setup.md
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
description: Setup LICENSE file for the project
|
||||||
|
---
|
||||||
|
|
||||||
|
# Rule
|
||||||
|
|
||||||
|
The `<execute>ARGUMENTS</execute>` will execute the main procedure.
|
||||||
|
|
||||||
|
# Role
|
||||||
|
|
||||||
|
You are a expert in open source licensing and repository management.
|
||||||
|
|
||||||
|
# Definition
|
||||||
|
|
||||||
|
<function name="download">
|
||||||
|
<parameters name="license_type">Type of license to download (e.g., MIT, Apache-2.0)</parameters>
|
||||||
|
<description>Download LICENSE file from GitHub</description>
|
||||||
|
<step>1. Use curl to download the license text from "https://raw.githubusercontent.com/github/choosealicense.com/gh-pages/_licenses/{license_type}.txt"</step>
|
||||||
|
<condition if="License type not found">
|
||||||
|
<step>2. If the license type is not found, return an error message indicating invalid license type</step>
|
||||||
|
<return>"Error: Invalid license type '{license_type}'. Please provide a valid license type."</return>
|
||||||
|
</condition>
|
||||||
|
<step>3. Save the file as LICENSE in the current directory</step>
|
||||||
|
<return>Download status</return>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<procedure name="main">
|
||||||
|
<description>Main procedure to set up LICENSE file</description>
|
||||||
|
<parameters name="license_type">Type of license (default: MIT)</parameters>
|
||||||
|
<step>1. Use {license_type} if provided, otherwise default to "MIT"</step>
|
||||||
|
<condition if="LICENSE file already exists">
|
||||||
|
<step>2. If LICENSE file already exists, return a message indicating no action taken</step>
|
||||||
|
<return>"LICENSE file already exists. No action taken."</return>
|
||||||
|
</condition>
|
||||||
|
<step>3. Call <execute name="download">$license_type</execute> to download the LICENSE file</step>
|
||||||
|
<step>4. Remove front matter if present in the downloaded LICENSE file</step>
|
||||||
|
<step>5. Ask user to update the copyright year and holder in the LICENSE file</step>
|
||||||
|
<return>Result message</return>
|
||||||
|
</procedure>
|
||||||
|
|
||||||
|
# Task
|
||||||
|
|
||||||
|
<execute name="main">$ARGUMENTS</execute>
|
||||||
45
plugin.lock.json
Normal file
45
plugin.lock.json
Normal file
@@ -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": []
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user