SolidCraft-MCP 0.2.0: unklare Befehle in den Skill aufnehmen, damit der naechste Lauf Nut, Durchmesser, Drehrichtung und die Boolean-Warnung nicht erneut raten muss.

Uebersicht und Download-Links zeigen dieselbe Version.
This commit is contained in:
Dominic Gundel committed 2026-10-20 01:22:23 +02:00
1 parent f3e49b5d37
commit d374ee7fff
10 files changed
+184 -59

No files matched your search

+49 -15
View File
@@ -1,5 +1,5 @@
# Erzeugt die Skill-Tabelle in README.md zwischen <!-- skills:start --> und <!-- skills:end -->
# neu. Mit -Check wird nur geprueft, ob die Tabelle aktuell ist (Exit-Code 1, wenn nicht).
# Erzeugt die Skill-Uebersicht in README.md zwischen <!-- skills:start --> und <!-- skills:end -->
# neu. Mit -Check wird nur geprueft, ob sie aktuell ist (Exit-Code 1, wenn nicht).
# Aufruf: scripts\update-index.ps1 [-Check]
param([switch]$Check)
. (Join-Path $PSScriptRoot 'lib.ps1')
@@ -16,6 +16,19 @@ if ($start -lt 0 -or $end -lt $start) {
exit 1
}
function ConvertTo-MdText([string]$s) {
if ([string]::IsNullOrEmpty($s)) { return '' }
$map = [ordered]@{
'\' = '\\'
'*' = '\*'
'_' = '\_'
'`' = '\`'
'[' = '\['
}
foreach ($k in @($map.Keys)) { $s = $s.Replace($k, $map[$k]) }
return $s
}
$ServerKeys = @{
'wordcraft-mcp' = 'wordcraft'
'gridcraft-mcp' = 'gridcraft'
@@ -31,10 +44,9 @@ function Get-McpServerKey([string]$SkillName) {
return $SkillName
}
$table = @(
'| Skill | Kurzbeschreibung | Version | Doku | Download | Erweiterung (.mcpb) | Cursor-Plugin | Cursor 1-Klick |',
'|---|---|---|---|---|---|---|---|'
)
# Mittelpunkt als Zeichencode: Windows PowerShell 5.1 liest .ps1 ohne BOM als ANSI.
$dot = [char]0x00B7
$table = @()
foreach ($n in (Get-SkillNames)) {
$dir = Join-Path $SkillsDir $n
$desc = ''
@@ -46,17 +58,30 @@ foreach ($n in (Get-SkillNames)) {
if ($d) { $desc = $d }
}
}
$desc = $desc.Replace('|', '\|')
$lead = $desc.Trim()
$note = ''
$cut = $lead.IndexOf(' Verwenden')
if ($cut -gt 0) {
$note = $lead.Substring($cut + 1).Trim()
$lead = $lead.Substring(0, $cut).Trim()
}
if ($lead.Length -gt 0 -and [char]::IsLower($lead[0])) {
$lead = $lead.Substring(0, 1).ToUpperInvariant() + $lead.Substring(1)
}
$ver = Get-SkillVersion $dir
$tagEnc = [Uri]::EscapeDataString("$n/v$ver")
$zipLink = "[{0}-v{1}.zip]({2}/releases/download/{3}/{0}-v{1}.zip)" -f $n, $ver, $RepoWeb, $tagEnc
$mcpb = ''
$cursorZip = ''
$deeplink = ''
$base = "$RepoWeb/releases/download/$tagEnc"
$zipName = "$n-v$ver.zip"
$links = @(
"[Doku](skills/$n/README.md)",
"[Skill-ZIP]($base/$zipName `"$zipName`")"
)
$extPath = Join-Path $dir 'extension\manifest.json'
if (Test-Path $extPath) {
$mcpb = "[{0}-v{1}.mcpb]({2}/releases/download/{3}/{0}-v{1}.mcpb)" -f $n, $ver, $RepoWeb, $tagEnc
$cursorZip = "[{0}-cursor-v{1}.zip]({2}/releases/download/{3}/{0}-cursor-v{1}.zip)" -f $n, $ver, $RepoWeb, $tagEnc
$mcpbName = "$n-v$ver.mcpb"
$cursorName = "$n-cursor-v$ver.zip"
$links += "[Erweiterung]($base/$mcpbName `"$mcpbName`")"
$links += "[Cursor-Plugin]($base/$cursorName `"$cursorName`")"
$man = (Read-Text $extPath) | ConvertFrom-Json
$serverKey = Get-McpServerKey $n
$cmd = [string]$man.server.mcp_config.command
@@ -70,9 +95,18 @@ foreach ($n in (Get-SkillNames)) {
}
$transport = @{ command = $cmd; args = @($argsList) }
$link = New-CursorDeeplink -ServerName $serverKey -Config $transport
$deeplink = "[Add to Cursor]($link)"
$links += "[Add to Cursor]($link)"
}
$table += ('| [{0}](skills/{0}/) | {1} | {2} | [README](skills/{0}/README.md) | {3} | {4} | {5} | {6} |' -f $n, $desc, $ver, $zipLink, $mcpb, $cursorZip, $deeplink)
if ($table.Count -gt 0) { $table += ''; $table += '---'; $table += '' }
$table += "### [$n](skills/$n/) $dot ``v$ver``"
$table += ''
$table += '> ' + (ConvertTo-MdText $lead)
$table += ''
if ($note) {
$table += '*' + (ConvertTo-MdText $note) + '*'
$table += ''
}
$table += ($links -join " $dot ")
}
$newLines = @()
+41 -16
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Erzeugt die Skill-Tabelle in README.md zwischen <!-- skills:start --> und <!-- skills:end -->
# neu. Mit --check wird nur geprüft, ob die Tabelle aktuell ist (Exit-Code 1, wenn nicht).
# Erzeugt die Skill-Übersicht in README.md zwischen <!-- skills:start --> und <!-- skills:end -->
# neu. Mit --check wird nur geprüft, ob sie aktuell ist (Exit-Code 1, wenn nicht).
# Aufruf: scripts/update-index.sh [--check]
set -euo pipefail
source "$(dirname "$0")/lib.sh"
@@ -18,24 +18,16 @@ fi
table="$(mktemp)"
trap 'rm -f "$table"' EXIT
{
echo '| Skill | Kurzbeschreibung | Version | Doku | Download | Erweiterung (.mcpb) | Cursor-Plugin | Cursor 1-Klick |'
echo '|---|---|---|---|---|---|---|---|'
first=1
while IFS= read -r name; do
[[ -z "$name" ]] && continue
desc=""
ver="$(skill_version "$SKILLS_DIR/$name")"
desc=""
if fm="$(frontmatter "$SKILLS_DIR/$name/SKILL.md" 2>/dev/null)"; then
desc="$(fm_value "$fm" description || true)"
fi
desc="${desc//|/\\|}"
tag_enc="$(python3 -c 'import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1], safe=""))' "$name/v$ver")"
zip_link="[${name}-v${ver}.zip](${REPO_WEB}/releases/download/${tag_enc}/${name}-v${ver}.zip)"
mcpb=""
cursor_zip=""
deeplink=""
if [[ -f "$SKILLS_DIR/$name/extension/manifest.json" ]]; then
mcpb="[${name}-v${ver}.mcpb](${REPO_WEB}/releases/download/${tag_enc}/${name}-v${ver}.mcpb)"
cursor_zip="[${name}-cursor-v${ver}.zip](${REPO_WEB}/releases/download/${tag_enc}/${name}-cursor-v${ver}.zip)"
deeplink="$(python3 - "$SKILLS_DIR/$name/extension/manifest.json" "$name" <<'PY'
import json, base64, sys, urllib.parse, re
man = json.load(open(sys.argv[1], encoding="utf-8"))
@@ -61,13 +53,46 @@ if len(cmd) >= 3 and cmd[1] == ":" and "\\" in cmd:
cmd = cmd.replace("\\", "/")
transport = {"command": cmd, "args": args}
b64 = base64.urlsafe_b64encode(json.dumps(transport, separators=(",", ":")).encode()).decode().rstrip("=")
link = f"cursor://anysphere.cursor-deeplink/mcp/install?name={urllib.parse.quote(sk)}&config={b64}"
print(f"[Add to Cursor]({link})")
print(f"cursor://anysphere.cursor-deeplink/mcp/install?name={urllib.parse.quote(sk)}&config={b64}")
PY
)"
fi
printf '| [%s](skills/%s/) | %s | %s | [README](skills/%s/README.md) | %s | %s | %s | %s |\n' \
"$name" "$name" "$desc" "$ver" "$name" "$zip_link" "$mcpb" "$cursor_zip" "$deeplink"
if [[ $first -eq 0 ]]; then
printf '\n---\n\n'
fi
first=0
python3 -c 'import sys, urllib.parse
name, ver, desc, repo, link = sys.argv[1:]
def md(s):
out = []
trans = {"\\": "\\\\", "*": "\\*", "_": "\\_", "`": "\\`", "[": "\\["}
for ch in s:
out.append(trans.get(ch, ch))
return "".join(out)
lead, note = desc.strip(), ""
cut = lead.find(" Verwenden")
if cut > 0:
note = lead[cut + 1:].strip()
lead = lead[:cut].strip()
if lead[:1].islower():
lead = lead[0].upper() + lead[1:]
tag = urllib.parse.quote(f"{name}/v{ver}", safe="")
base = f"{repo}/releases/download/{tag}"
parts = [
f"[Doku](skills/{name}/README.md)",
f"[Skill-ZIP]({base}/{name}-v{ver}.zip \"{name}-v{ver}.zip\")",
]
if link:
parts.append(f"[Erweiterung]({base}/{name}-v{ver}.mcpb \"{name}-v{ver}.mcpb\")")
parts.append(f"[Cursor-Plugin]({base}/{name}-cursor-v{ver}.zip \"{name}-cursor-v{ver}.zip\")")
parts.append(f"[Add to Cursor]({link})")
lines = [f"### [{name}](skills/{name}/) · `v{ver}`", "", "> " + md(lead), ""]
if note:
lines += ["*" + md(note) + "*", ""]
lines.append(" · ".join(parts))
sys.stdout.write("\n".join(lines))
' "$name" "$ver" "$desc" "$REPO_WEB" "$deeplink"
printf '\n'
done < <(skill_names)
} > "$table"