claude-skills/scripts/convert.sh
Alireza Rezvani ebbf6b0872
Some checks failed
Sync Codex Skills Symlinks / sync (push) Has been cancelled
fix: v2.14.0 audit P0/P1 fixes (plugin updates, Codex, mirrors, script paths, two script bugs) (#1048)
* fix(plugins): bump all plugins to 2.14.1 and gate unbumped changes

Claude Code caches plugins by version. 70 of 104 plugins changed between
v2.12.0 and v2.14.0 without a bump, so claude plugin update reported
"already at the latest version" and existing installs never received the
v2.13/v2.14 fixes. Every plugin moves to 2.14.1 so stale caches refresh once.

check_plugin_versions.py (G11, blocking in ci-quality-gate) fails when a
plugin's payload, including symlinked vendor files, changes without a higher
version, and when marketplace.json and plugin.json disagree.
bump_plugin_versions.py sets both together.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(codex): stop installing all skills by default

With the full library (~380 skills) Codex drops every skill description from
its prompt budget, so it cannot pick skills. codex-install.sh now asks for
--category (comma-separated), --skill or an explicit --all, lists categories
when run without arguments, and warns when more than ~100 skills are
installed. The Windows installer and install docs follow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(gemini): link whole skill folders and drop duplicate mirror entries

Each .gemini/skills entry held only a SKILL.md symlink, so the relative
scripts/ and references/ a skill points to were missing. Entries are now
directory symlinks (Gemini CLI 0.65 discovers them). Dual-published copies
with identical SKILL.md are listed once, commands and agents that share a
skill's name are skipped, fixtures under assets/ and vendor/ re-exports are
excluded, discovery is sorted so reruns are stable, and stale generated
entries are pruned. gemini skills list: 20 conflicts -> 1 (handoff, fixed
next). GEMINI.md documents folder trust and fixes a dead example path.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(handoff): rename the productivity skill to session-handoff

engineering/handoff and productivity/handoff both shipped a skill named
handoff. Claude Code namespaces them, but Codex, Gemini CLI, Vibe and Hermes
key skills by name and silently kept one. The productivity skill is now
session-handoff (handoff-productivity:session-handoff); its folder, plugin
manifest, hook script paths, command paths, mirrors, harness manifest and
docs page follow. /cs-handoff, /cs-handoff-setup and ~/.config/handoff are
unchanged; the plugin README carries a migration note.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(convert): include plugins whose SKILL.md is at the plugin root

convert.sh searched at -mindepth 4, which skipped boost-asio-pro, deepread,
hivemind, loop-library, minimalist, strict-api and swedish-mentor for every
converted tool (opencode, Cursor, Windsurf, Kilo, Augment, Aider,
Antigravity). It now searches from depth 2 and skips assets/ fixtures.
opencode conversion: 375 -> 382 skills.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(codex): keep skill-tester's sample fixture from loading as a skill

Codex scans installed skill folders recursively and picked up
skill-tester/assets/sample-skill/SKILL.md as 'sample-text-processor'.
The installer renames SKILL.md files under assets/ in the installed copy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(plugins): address scripts via ${CLAUDE_PLUGIN_ROOT} in commands and agents

343 script invocations in 90 command/agent files across 36 plugins used
repo-relative or ../ paths. Plugin commands and agents run from the user's
project, so those paths only resolved inside a clone of this repo; in the
v2.14.0 evals the agent fell back to find / to locate scripts. Every one now
uses ${CLAUDE_PLUGIN_ROOT}/. Two cross-plugin calls (write-a-skill ->
karpathy-coder, c-level-agents cpo -> product-manager-toolkit) go through
vendor/ symlinks, per the repo's install-cache lesson.

check_paths.py (G1) now fails a plugin command or agent that invokes a
script without ${CLAUDE_PLUGIN_ROOT}; on the v2.14.0 tree it reports 279.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(month-end-close): treat opening-balance rows as balances and pair transpositions

On a bank and GL export that each begin with an 'Opening balance' row, the
matcher returned RECONCILED_WITH_ITEMS and told the user to book a 25,000.00
journal entry for the opening balance, and it reported a 7,980/7,890
transposition as two unrelated items. Opening rows are now balances: a
difference between them is reported as carried in from the prior period
(R5, blocks sign-off, never booked). Same-date digit transpositions pair into
one correcting entry. The GL file's 'memo' column is read as description.
The v2.14.0 eval fixture now proves 1,405.00 = 150 opening + 90
transposition + 1,200 outstanding check - 35 bank fee. Bundled copy synced.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(coding-agent-rollout): flag connection-URL passwords and production MCP servers

On a committed .claude/settings.json holding
env.DATABASE_URL=postgresql://admin:<password>@prod-db... and
enabledMcpjsonServers: ["postgres-prod"], the linter flagged neither: the
env check only matched token formats and KEY/TOKEN/SECRET names. S11 now
catches a password embedded in any connection URL (BLOCKER in shared files),
and new S13 warns when a shared file pre-approves an MCP server whose name
marks it as production. Bundled copy synced; --sample output unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* docs: changelog and lessons for the v2.14.0 audit fixes

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 09:50:05 +02:00

608 lines
16 KiB
Bash
Executable file

#!/usr/bin/env bash
# Usage:
# ./scripts/convert.sh [--tool <name>] [--out <dir>] [--help]
#
# Tools: antigravity, cursor, aider, kilocode, windsurf, opencode, augment, all
# Default: all
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
TOOL="all"
OUT_BASE="${REPO_ROOT}/integrations"
TODAY="$(date +%F)"
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m'
ok() {
echo -e "${GREEN}[OK]${NC} $*"
}
warn() {
echo -e "${YELLOW}[!!]${NC} $*"
}
err() {
echo -e "${RED}[ERR]${NC} $*" >&2
}
info() {
echo -e "${BLUE}[*]${NC} $*"
}
usage() {
cat <<'USAGE'
Usage:
./scripts/convert.sh [--tool <name>] [--out <dir>] [--help]
Tools:
antigravity, cursor, aider, kilocode, windsurf, opencode, augment, all
Defaults:
--tool all
--out <repo-root>/integrations
USAGE
}
is_valid_tool() {
case "$1" in
antigravity|cursor|aider|kilocode|windsurf|opencode|augment|all) return 0 ;;
*) return 1 ;;
esac
}
yaml_unquote() {
local value="$1"
value="${value#\"}"
value="${value%\"}"
value="${value#\'}"
value="${value%\'}"
printf '%s' "$value"
}
yaml_quote() {
local value="$1"
value="${value//\\/\\\\}"
value="${value//\"/\\\"}"
printf '"%s"' "$value"
}
init_count_vars() {
converted_antigravity=0
converted_cursor=0
converted_aider=0
converted_kilocode=0
converted_windsurf=0
converted_opencode=0
converted_augment=0
skipped_antigravity=0
skipped_cursor=0
skipped_aider=0
skipped_kilocode=0
skipped_windsurf=0
skipped_opencode=0
skipped_augment=0
}
inc_converted() {
local t="$1"
case "$t" in
antigravity) converted_antigravity=$((converted_antigravity + 1)) ;;
cursor) converted_cursor=$((converted_cursor + 1)) ;;
aider) converted_aider=$((converted_aider + 1)) ;;
kilocode) converted_kilocode=$((converted_kilocode + 1)) ;;
windsurf) converted_windsurf=$((converted_windsurf + 1)) ;;
opencode) converted_opencode=$((converted_opencode + 1)) ;;
augment) converted_augment=$((converted_augment + 1)) ;;
esac
}
inc_skipped() {
local t="$1"
case "$t" in
antigravity) skipped_antigravity=$((skipped_antigravity + 1)) ;;
cursor) skipped_cursor=$((skipped_cursor + 1)) ;;
aider) skipped_aider=$((skipped_aider + 1)) ;;
kilocode) skipped_kilocode=$((skipped_kilocode + 1)) ;;
windsurf) skipped_windsurf=$((skipped_windsurf + 1)) ;;
opencode) skipped_opencode=$((skipped_opencode + 1)) ;;
augment) skipped_augment=$((skipped_augment + 1)) ;;
esac
}
get_converted() {
local t="$1"
case "$t" in
antigravity) echo "$converted_antigravity" ;;
cursor) echo "$converted_cursor" ;;
aider) echo "$converted_aider" ;;
kilocode) echo "$converted_kilocode" ;;
windsurf) echo "$converted_windsurf" ;;
opencode) echo "$converted_opencode" ;;
augment) echo "$converted_augment" ;;
esac
}
get_skipped() {
local t="$1"
case "$t" in
antigravity) echo "$skipped_antigravity" ;;
cursor) echo "$skipped_cursor" ;;
aider) echo "$skipped_aider" ;;
kilocode) echo "$skipped_kilocode" ;;
windsurf) echo "$skipped_windsurf" ;;
opencode) echo "$skipped_opencode" ;;
augment) echo "$skipped_augment" ;;
esac
}
# Prints frontmatter fields as: name<TAB>description
extract_frontmatter() {
local file="$1"
awk '
BEGIN {
in_fm = 0
name = ""
desc = ""
in_desc_block = 0
}
function ltrim(s) {
sub(/^[[:space:]]+/, "", s)
return s
}
function rtrim(s) {
sub(/[[:space:]]+$/, "", s)
return s
}
function trim(s) {
return rtrim(ltrim(s))
}
function dequote(s, first, last) {
s = trim(s)
first = substr(s, 1, 1)
last = substr(s, length(s), 1)
if ((first == "\"" && last == "\"") || (first == "\047" && last == "\047")) {
s = substr(s, 2, length(s) - 2)
if (first == "\"") {
gsub(/\\\\/, "\\", s)
gsub(/\\"/, "\"", s)
} else {
gsub(/\047\047/, "\047", s)
}
}
return s
}
function append_desc(chunk) {
chunk = trim(chunk)
if (chunk == "") return
if (desc == "") {
desc = chunk
} else {
desc = desc " " chunk
}
}
NR == 1 {
if ($0 == "---") {
in_fm = 1
next
}
next
}
in_fm == 1 {
if ($0 == "---") {
in_fm = 0
next
}
if (in_desc_block == 1) {
if ($0 ~ /^[[:space:]]+/ || $0 == "") {
line = $0
sub(/^[[:space:]]+/, "", line)
append_desc(line)
next
}
in_desc_block = 0
}
if ($0 ~ /^name:[[:space:]]*/) {
line = $0
sub(/^name:[[:space:]]*/, "", line)
name = dequote(line)
next
}
if ($0 ~ /^description:[[:space:]]*/) {
line = $0
sub(/^description:[[:space:]]*/, "", line)
line = trim(line)
if (line ~ /^>[+-]?$/ || line ~ /^\|[+-]?$/) {
in_desc_block = 1
next
}
desc = dequote(line)
next
}
next
}
END {
printf "%s\t%s\n", trim(name), trim(desc)
}
' "$file"
}
extract_body() {
local file="$1"
awk '
BEGIN { in_fm = 0 }
NR == 1 {
if ($0 == "---") {
in_fm = 1
next
}
print
next
}
in_fm == 1 {
if ($0 == "---") {
in_fm = 0
next
}
next
}
{ print }
' "$file"
}
copy_supporting_dirs() {
local src_dir="$1"
local dst_dir="$2"
local d
for d in scripts references templates; do
if [[ -d "${src_dir}/${d}" ]]; then
cp -R "${src_dir}/${d}" "${dst_dir}/${d}"
fi
done
}
append_aider_skill() {
local name="$1"
local description="$2"
local body_file="$3"
{
echo "---"
echo
echo "## ${name}"
echo "> ${description}"
echo
cat "$body_file"
echo
} >> "${AIDER_FILE}"
}
tool_title() {
case "$1" in
antigravity) echo "Antigravity" ;;
cursor) echo "Cursor" ;;
aider) echo "Aider" ;;
kilocode) echo "Kilo Code" ;;
windsurf) echo "Windsurf" ;;
opencode) echo "OpenCode" ;;
augment) echo "Augment" ;;
esac
}
write_tool_readme() {
local tool="$1"
local count="$2"
local out_dir="${OUT_BASE}/${tool}"
local format_line=""
local manual_install=""
local script_install="./scripts/install.sh --tool ${tool}"
local verify_step=""
local update_step=""
case "$tool" in
antigravity)
format_line='Directory skill bundles: `SKILL.md` with Antigravity frontmatter (`risk`, `source`, `date_added`) plus copied `scripts/`, `references/`, `templates/` when present.'
manual_install='Copy each folder from `integrations/antigravity/<skill-name>/` to `~/.gemini/antigravity/skills/<skill-name>/`.'
verify_step='Run `find ~/.gemini/antigravity/skills -name "SKILL.md" | wc -l` and confirm the count, then check your Gemini/Antigravity skill list.'
update_step='Re-run `./scripts/convert.sh --tool antigravity` and then reinstall with `./scripts/install.sh --tool antigravity`.'
;;
cursor)
format_line='Flat Cursor rules: `rules/<skill-name>.mdc` with Cursor-compatible frontmatter (`description`, `globs`, `alwaysApply`).'
manual_install='Copy `integrations/cursor/rules/*.mdc` into your project `.cursor/rules/` directory.'
verify_step='Open Cursor rules panel or run `find .cursor/rules -name "*.mdc" | wc -l` in your project.'
update_step='Re-run `./scripts/convert.sh --tool cursor` and then reinstall with `./scripts/install.sh --tool cursor --target <project-dir>`.'
;;
aider)
format_line='Single conventions file: `CONVENTIONS.md` concatenating all skills with separators and per-skill sections.'
manual_install='Copy `integrations/aider/CONVENTIONS.md` into your project root.'
verify_step='Run `aider --read CONVENTIONS.md` and confirm sections load (search for `## <skill-name>` entries).'
update_step='Re-run `./scripts/convert.sh --tool aider` and reinstall with `./scripts/install.sh --tool aider --target <project-dir>`.'
;;
kilocode)
format_line='Flat markdown rules: `rules/<skill-name>.md` with a title/description header and no frontmatter.'
manual_install='Copy `integrations/kilocode/rules/*.md` into your project `.kilocode/rules/` directory.'
verify_step='Run `find .kilocode/rules -name "*.md" | wc -l` in your project and confirm expected count.'
update_step='Re-run `./scripts/convert.sh --tool kilocode` and reinstall with `./scripts/install.sh --tool kilocode --target <project-dir>`.'
;;
windsurf)
format_line='Directory skill bundles: `skills/<skill-name>/SKILL.md` using Windsurf-compatible SKILL frontmatter (`name`, `description`) plus copied support folders.'
manual_install='Copy each folder from `integrations/windsurf/skills/<skill-name>/` to `.windsurf/skills/<skill-name>/` in your project.'
verify_step='Run `find .windsurf/skills -name "SKILL.md" | wc -l` and verify skills are listed in Windsurf.'
update_step='Re-run `./scripts/convert.sh --tool windsurf` and reinstall with `./scripts/install.sh --tool windsurf --target <project-dir>`.'
;;
opencode)
format_line='Directory skill bundles: `skills/<skill-name>/SKILL.md` with `compatibility: opencode` plus copied support folders.'
manual_install='Copy each folder from `integrations/opencode/skills/<skill-name>/` to `.opencode/skills/<skill-name>/` in your project.'
verify_step='Run `find .opencode/skills -name "SKILL.md" | wc -l` and confirm OpenCode shows installed skills.'
update_step='Re-run `./scripts/convert.sh --tool opencode` and reinstall with `./scripts/install.sh --tool opencode --target <project-dir>`.'
;;
augment)
format_line='Directory skill bundles: `skills/<skill-name>/SKILL.md` with Augment-compatible SKILL frontmatter (`name`, `description`) plus copied support folders.'
manual_install='Copy each folder from `integrations/augment/skills/<skill-name>/` to `.augment/skills/<skill-name>/` in your project.'
verify_step='Run `find .augment/skills -name "SKILL.md" | wc -l` and verify skills are listed in Augment.'
update_step='Re-run `./scripts/convert.sh --tool augment` and reinstall with `./scripts/install.sh --tool augment --target <project-dir>`.'
;;
esac
{
printf '# %s Integration\n\n' "$(tool_title "$tool")"
printf '![%s](https://img.shields.io/badge/Integration-%s-0A66C2)\n\n' "$tool" "$tool"
printf 'This directory contains converted Claude Skills for **%s**.\n\n' "$(tool_title "$tool")"
printf '## Included Skills\n\n'
printf -- '- **%s** skills generated from this repository.\n\n' "$count"
printf '## Format\n\n'
printf '%s\n\n' "$format_line"
printf '## Install\n\n'
printf '### Manual\n\n'
printf '%s\n\n' "$manual_install"
printf '### Script\n\n'
printf '```bash\n'
printf 'git clone https://github.com/alirezarezvani/claude-skills.git\n'
printf 'cd claude-skills\n'
printf '%s\n' "$script_install"
printf '```\n\n'
printf '## Verify\n\n'
printf '%s\n\n' "$verify_step"
printf '## Update\n\n'
printf '%s\n\n' "$update_step"
printf '## Source Repository\n\n'
printf -- '- https://github.com/alirezarezvani/claude-skills\n'
} > "${out_dir}/README.md"
}
while [[ $# -gt 0 ]]; do
case "$1" in
--tool)
TOOL="${2:-}"
shift 2
;;
--out)
OUT_BASE="${2:-}"
shift 2
;;
--help|-h)
usage
exit 0
;;
*)
err "Unknown argument: $1"
usage
exit 1
;;
esac
done
if ! is_valid_tool "$TOOL"; then
err "Invalid --tool value: ${TOOL}"
usage
exit 1
fi
TOOLS="antigravity cursor aider kilocode windsurf opencode augment"
if [[ "$TOOL" != "all" ]]; then
TOOLS="$TOOL"
fi
SKILLS_TMP="$(mktemp)"
(
cd "$REPO_ROOT"
# mindepth 2 keeps plugins whose SKILL.md sits at the plugin root
# (loop-library/, engineering/hivemind/, productivity/swedish-mentor/ ...).
find . -mindepth 2 -maxdepth 6 -type f -name 'SKILL.md' \
-not -path '*/assets/*' \
-not -path './.git/*' \
-not -path './.claude/*' \
-not -path './.codex/*' \
-not -path './.codex-plugin/*' \
-not -path './.gemini/*' \
-not -path './.hermes/*' \
-not -path './.vibe/*' \
-not -path './integrations/*' \
-not -path './docs/*' \
| sort
) > "$SKILLS_TMP"
TOTAL_CANDIDATES="$(wc -l < "$SKILLS_TMP" | tr -d ' ')"
if [[ "$TOTAL_CANDIDATES" -eq 0 ]]; then
err "No skills found matching */*/SKILL.md"
rm -f "$SKILLS_TMP"
exit 1
fi
info "Found ${TOTAL_CANDIDATES} candidate skills"
for t in $TOOLS; do
rm -rf "${OUT_BASE}/${t}"
mkdir -p "${OUT_BASE}/${t}"
if [[ "$t" == "cursor" || "$t" == "kilocode" ]]; then
mkdir -p "${OUT_BASE}/${t}/rules"
fi
if [[ "$t" == "windsurf" || "$t" == "opencode" || "$t" == "augment" ]]; then
mkdir -p "${OUT_BASE}/${t}/skills"
fi
if [[ "$t" == "aider" ]]; then
AIDER_FILE="${OUT_BASE}/aider/CONVENTIONS.md"
{
echo "# Claude Skills — Aider Conventions"
echo "> Auto-generated from claude-skills. Do not edit manually."
echo "> Generated: ${TODAY}"
echo
} > "$AIDER_FILE"
fi
ok "Prepared output directory: ${OUT_BASE}/${t}"
done
init_count_vars
while IFS= read -r rel_path; do
src="${REPO_ROOT}/${rel_path#./}"
src_dir="$(dirname "$src")"
meta="$(extract_frontmatter "$src")"
name="${meta%%$'\t'*}"
description="${meta#*$'\t'}"
name="$(yaml_unquote "$name")"
description="$(yaml_unquote "$description")"
if [[ -z "$name" || -z "$description" ]]; then
for t in $TOOLS; do
inc_skipped "$t"
done
warn "Skipping invalid frontmatter: ${rel_path}"
continue
fi
body_tmp="$(mktemp)"
extract_body "$src" > "$body_tmp"
for t in $TOOLS; do
case "$t" in
antigravity)
out_dir="${OUT_BASE}/antigravity/${name}"
mkdir -p "$out_dir"
{
echo "---"
echo "name: $(yaml_quote "$name")"
echo "description: $(yaml_quote "$description")"
echo "risk: low"
echo "source: community"
echo "date_added: '${TODAY}'"
echo "---"
cat "$body_tmp"
} > "${out_dir}/SKILL.md"
copy_supporting_dirs "$src_dir" "$out_dir"
;;
cursor)
out_file="${OUT_BASE}/cursor/rules/${name}.mdc"
{
echo "---"
echo "description: $(yaml_quote "$description")"
echo "globs:"
echo "alwaysApply: false"
echo "---"
cat "$body_tmp"
} > "$out_file"
;;
aider)
append_aider_skill "$name" "$description" "$body_tmp"
;;
kilocode)
out_file="${OUT_BASE}/kilocode/rules/${name}.md"
{
echo "# ${name}"
echo "> ${description}"
echo
cat "$body_tmp"
} > "$out_file"
;;
windsurf)
out_dir="${OUT_BASE}/windsurf/skills/${name}"
mkdir -p "$out_dir"
{
echo "---"
echo "name: $(yaml_quote "$name")"
echo "description: $(yaml_quote "$description")"
echo "---"
cat "$body_tmp"
} > "${out_dir}/SKILL.md"
copy_supporting_dirs "$src_dir" "$out_dir"
;;
opencode)
out_dir="${OUT_BASE}/opencode/skills/${name}"
mkdir -p "$out_dir"
{
echo "---"
echo "name: $(yaml_quote "$name")"
echo "description: $(yaml_quote "$description")"
echo "compatibility: opencode"
echo "---"
cat "$body_tmp"
} > "${out_dir}/SKILL.md"
copy_supporting_dirs "$src_dir" "$out_dir"
;;
augment)
out_dir="${OUT_BASE}/augment/skills/${name}"
mkdir -p "$out_dir"
{
echo "---"
echo "name: $(yaml_quote "$name")"
echo "description: $(yaml_quote "$description")"
echo "---"
cat "$body_tmp"
} > "${out_dir}/SKILL.md"
copy_supporting_dirs "$src_dir" "$out_dir"
;;
*)
err "Unhandled tool: ${t}"
rm -f "$body_tmp" "$SKILLS_TMP"
exit 1
;;
esac
inc_converted "$t"
done
rm -f "$body_tmp"
ok "Converted ${name} (${rel_path})"
done < "$SKILLS_TMP"
rm -f "$SKILLS_TMP"
for t in $TOOLS; do
write_tool_readme "$t" "$(get_converted "$t")"
done
echo
info "Conversion summary"
for t in $TOOLS; do
echo " ${t}: $(get_converted "$t") converted, $(get_skipped "$t") skipped"
done
echo
ok "Done"