Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/scaffold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import {
mkdir,
readdir,
readFile,
readlink,
rename,
rm,
symlink,
writeFile,
} from "node:fs/promises";
import { join } from "node:path";
Expand All @@ -32,7 +34,10 @@ export async function copyDir(src: string, dest: string): Promise<void> {
const srcPath = join(src, entry.name);
const destPath = join(dest, entry.name);

if (entry.isDirectory()) {
if (entry.isSymbolicLink()) {
const target = await readlink(srcPath);
await symlink(target, destPath);
} else if (entry.isDirectory()) {
await copyDir(srcPath, destPath);
} else {
await cp(srcPath, destPath);
Expand Down Expand Up @@ -70,7 +75,9 @@ export async function processDirectory(
for (const entry of entries) {
const fullPath = join(dir, entry.name);

if (entry.isDirectory()) {
if (entry.isSymbolicLink()) {
// Symlinks are preserved as-is (target already copied)
} else if (entry.isDirectory()) {
if (entry.name === SKILL_NAME_PLACEHOLDER) {
const newPath = join(dir, values.Skill_Name);
await rename(fullPath, newPath);
Expand Down
10 changes: 5 additions & 5 deletions template/.claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"name": "{Brand_Name}-skills",
"name": "{Brand_Name}-agent-skills",
"description": "{Brand_Name} agent skills",
"owner": {
"name": "{Creator_Name}",
"email": "{Creator_Email}"
},
"metadata": {
"version": "1.0.0",
"description": "Claude Code marketplace of skills by {Brand_Name}"
"description": "Claude Code marketplace of agent skills by {Brand_Name}"
},
"plugins": [
{
"name": "{Skill_Name}-skill",
"description": "{Skill_Description}",
"name": "{Brand_Name}-agent-skills",
"description": "{Brand_Name} agent skills",
"version": "1.0.0",
"author": {
"name": "{Creator_Name}",
"email": "{Creator_Email}"
},
"source": "./skills/{Skill_Name}",
"source": "./",
"homepage": "{Skill_Homepage}",
"repository": "https://github.com/{Skill_Repository}",
"license": "{Skill_License}",
Expand Down
11 changes: 11 additions & 0 deletions template/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "{Brand_Name}-agent-skills",
"description": "{Brand_Name} agent skills",
"version": "1.0.0",
"author": { "name": "{Creator_Name}", "email": "{Creator_Email}" },
"homepage": "{Skill_Homepage}",
"repository": "https://github.com/{Skill_Repository}",
"license": "{Skill_License}",
"keywords": "{Skill_Keywords}",
"skills": "./skills/"
}
118 changes: 118 additions & 0 deletions template/.claude-plugin/plugin.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "claude-plugin.schema.json",
"title": "Claude Code Plugin",
"description": "Schema for Claude Code plugin.json metadata",
"type": "object",
"required": ["name"],
"properties": {
"$schema": {
"type": "string",
"description": "JSON Schema reference"
},
"name": {
"type": "string",
"pattern": "^[a-z][a-z0-9.-]*$",
"description": "Unique plugin identifier. Lowercase, kebab-case (alphanumerics, hyphens, and periods)"
},
"description": {
"type": "string",
"description": "Brief explanation of plugin purpose"
},
"version": {
"type": "string",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"description": "Semantic version (e.g., 1.0.0, 0.1.0-beta)"
},
"author": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Author name"
},
"email": {
"type": "string",
"description": "Author email"
},
"url": {
"type": "string",
"description": "Author URL"
}
},
"required": ["name"]
},
"homepage": {
"type": "string",
"description": "Documentation URL"
},
"repository": {
"type": "string",
"description": "Source code repository URL"
},
"license": {
"type": "string",
"description": "SPDX license identifier (e.g., MIT, Apache-2.0)"
},
"keywords": {
"type": "array",
"items": {
"type": "string"
},
"description": "Discovery tags for search"
},
"commands": {
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
],
"description": "Additional command files or directories"
},
"agents": {
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
],
"description": "Additional agent files or directories"
},
"skills": {
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
],
"description": "Additional skill directories"
},
"hooks": {
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } },
{ "type": "object" }
],
"description": "Hook config paths or inline configuration"
},
"mcpServers": {
"oneOf": [
{ "type": "string" },
{ "type": "array" },
{ "type": "object" }
],
"description": "MCP config paths or inline configuration"
},
"lspServers": {
"oneOf": [
{ "type": "string" },
{ "type": "array" },
{ "type": "object" }
],
"description": "LSP server config paths or inline configuration"
},
"outputStyles": {
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
],
"description": "Additional output style files or directories"
}
},
"additionalProperties": false
}
11 changes: 11 additions & 0 deletions template/.cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "{Brand_Name}-agent-skills",
"description": "{Brand_Name} agent skills",
"version": "1.0.0",
"author": { "name": "{Creator_Name}", "email": "{Creator_Email}" },
"homepage": "{Skill_Homepage}",
"repository": "https://github.com/{Skill_Repository}",
"license": "{Skill_License}",
"keywords": "{Skill_Keywords}",
"skills": "./skills/"
}
106 changes: 106 additions & 0 deletions template/.cursor-plugin/plugin.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "cursor-plugin.schema.json",
"title": "Cursor Plugin",
"description": "Schema for Cursor plugin.json metadata",
"type": "object",
"required": ["name"],
"properties": {
"$schema": {
"type": "string",
"description": "JSON Schema reference"
},
"name": {
"type": "string",
"pattern": "^[a-z][a-z0-9.-]*$",
"description": "Plugin identifier. Lowercase, kebab-case (alphanumerics, hyphens, and periods)"
},
"description": {
"type": "string",
"description": "Brief overview of plugin functionality"
},
"version": {
"type": "string",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"description": "Semantic version (e.g., 1.0.0)"
},
"author": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Creator name"
},
"email": {
"type": "string",
"description": "Creator email"
}
},
"required": ["name"]
},
"homepage": {
"type": "string",
"description": "Web address for plugin documentation"
},
"repository": {
"type": "string",
"description": "Web address for plugin source code"
},
"license": {
"type": "string",
"description": "License type identifier (e.g., MIT)"
},
"keywords": {
"type": "array",
"items": {
"type": "string"
},
"description": "Search tags for discoverability"
},
"logo": {
"type": "string",
"description": "Relative file path or absolute URL to logo asset"
},
"rules": {
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
],
"description": "Path(s) to rule files or folders"
},
"agents": {
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
],
"description": "Path(s) to agent files or folders"
},
"skills": {
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
],
"description": "Path(s) to skill directories"
},
"commands": {
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
],
"description": "Path(s) to command files or folders"
},
"hooks": {
"oneOf": [{ "type": "string" }, { "type": "object" }],
"description": "Path to hooks configuration or inline configuration"
},
"mcpServers": {
"oneOf": [
{ "type": "string" },
{ "type": "object" },
{ "type": "array" }
],
"description": "Path to MCP config, inline config, or array of either"
}
},
"additionalProperties": false
}
Loading