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,46 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds dist/<name>-v<version>.mcpb from skills/<name>/extension/
|
||||
# Steps: fetch-cli, mcpb validate, mcpb pack. Unsigned (no cert).
|
||||
# Usage: scripts/package-mcpb.sh <skill-name> [cli-path]
|
||||
set -euo pipefail
|
||||
source "$(dirname "$0")/lib.sh"
|
||||
|
||||
name="${1:-}"
|
||||
cli_path="${2:-}"
|
||||
if [[ -z "$name" ]]; then
|
||||
echo "Aufruf: scripts/package-mcpb.sh <skill-name> [cli-path]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dir="$SKILLS_DIR/$name"
|
||||
ext="$dir/extension"
|
||||
[[ -f "$ext/manifest.json" ]] || { echo "skills/$name/extension/ fehlt." >&2; exit 1; }
|
||||
|
||||
ver="$(skill_version "$dir")"
|
||||
[[ -n "$ver" ]] || { echo "CHANGELOG von $name hat keine Version." >&2; exit 1; }
|
||||
|
||||
if [[ -n "$cli_path" ]]; then
|
||||
bash "$(dirname "$0")/fetch-cli.sh" "$name" "$cli_path"
|
||||
else
|
||||
bash "$(dirname "$0")/fetch-cli.sh" "$name"
|
||||
fi
|
||||
|
||||
man_ver="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1],encoding="utf-8"))["version"])' "$ext/manifest.json")"
|
||||
if [[ "$man_ver" != "$ver" ]]; then
|
||||
echo "manifest.json version '$man_ver' != CHANGELOG '$ver'." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$DIST_DIR"
|
||||
out="$DIST_DIR/$name-v$ver.mcpb"
|
||||
rm -f "$out"
|
||||
|
||||
(
|
||||
cd "$ext"
|
||||
npx --yes @anthropic-ai/mcpb validate .
|
||||
npx --yes @anthropic-ai/mcpb pack . "$out"
|
||||
)
|
||||
|
||||
echo
|
||||
echo "dist/$name-v$ver.mcpb"
|
||||
unzip -l "$out"
|
||||
Reference in new issue
Block a user