Initial commit: claude-skills with wordcraft-mcp and gridcraft-mcp 0.1.0.
This commit is contained in:
commit
cf01e22a1e
50 files changed
+2726
No files matched your search
@@ -0,0 +1,57 @@
|
||||
# Builds dist\<name>-v<version>.mcpb from skills\<name>\extension\
|
||||
# Steps: fetch-cli, mcpb validate, mcpb pack. Unsigned (no cert).
|
||||
# Usage: scripts\package-mcpb.ps1 -Name <skill-name> [-CliPath <path>]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)][string]$Name,
|
||||
[string]$CliPath
|
||||
)
|
||||
. (Join-Path $PSScriptRoot 'lib.ps1')
|
||||
|
||||
$dir = Join-Path $SkillsDir $Name
|
||||
$ext = Join-Path $dir 'extension'
|
||||
if (-not (Test-Path (Join-Path $ext 'manifest.json'))) {
|
||||
Write-Host "skills/$Name/extension/ fehlt."
|
||||
exit 1
|
||||
}
|
||||
|
||||
$ver = Get-SkillVersion $dir
|
||||
if (-not $ver) {
|
||||
Write-Host "CHANGELOG von $Name hat keine Version."
|
||||
exit 1
|
||||
}
|
||||
|
||||
$fetchArgs = @{ Name = $Name }
|
||||
if ($CliPath) { $fetchArgs.CliPath = $CliPath }
|
||||
& (Join-Path $PSScriptRoot 'fetch-cli.ps1') @fetchArgs
|
||||
if ($LASTEXITCODE -ne 0) { exit 1 }
|
||||
|
||||
$manPath = Join-Path $ext 'manifest.json'
|
||||
$man = Read-Text $manPath | ConvertFrom-Json
|
||||
if ($man.version -cne $ver) {
|
||||
Write-Host "manifest.json version '$($man.version)' != CHANGELOG '$ver'."
|
||||
exit 1
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $DistDir | Out-Null
|
||||
$out = Join-Path $DistDir "$Name-v$ver.mcpb"
|
||||
if (Test-Path $out) { Remove-Item $out -Force }
|
||||
|
||||
Push-Location $ext
|
||||
try {
|
||||
npx --yes @anthropic-ai/mcpb validate .
|
||||
if ($LASTEXITCODE -ne 0) { exit 1 }
|
||||
npx --yes @anthropic-ai/mcpb pack . $out
|
||||
if ($LASTEXITCODE -ne 0) { exit 1 }
|
||||
}
|
||||
finally { Pop-Location }
|
||||
|
||||
Write-Host ''
|
||||
Write-Host "dist/$Name-v$ver.mcpb"
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
$zip = [IO.Compression.ZipFile]::OpenRead($out)
|
||||
try {
|
||||
foreach ($e in $zip.Entries) {
|
||||
Write-Host ('{0,12} {1}' -f $e.Length, $e.FullName)
|
||||
}
|
||||
}
|
||||
finally { $zip.Dispose() }
|
||||
Reference in new issue
Block a user