Sources: extracted from two upstream archives (skill-repo, skills-main),
merged with the following policy:
- 15 broken symlinks (pointing to /Users/jameslee/.cc-switch/skills or
../../.agents/skills on a foreign machine) discarded
- 3 real name collisions with identical content (ai-pair, ifind-http-api,
zhipu-websearch) kept as one copy
- Functional overlaps deduped keeping the strongest variant:
- docx family: kept docx (official, full toolchain) + docx-cn
(GB/T 9704 Chinese official-document constants),
dropped docx_writer (no scripts, name collided with docx)
- humanizer family: kept humanizer-zh (6 zh reference docs),
dropped humanizer (en, redundant for CN workflow)
- Skills that only ran in a foreign environment removed:
ablemind-ops, app-publish, hlb-design-system, openclaw-adj-skill,
claude-driver
- alphapai excluded from this public repo because its SKILL.md hard-coded
live credentials
Result: 25 skills, 572 files, ~7.5 MB.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
37 lines
1.0 KiB
Bash
Executable File
37 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
# 测试 parse_template.py - 解析模板占位符
|
|
set -e
|
|
|
|
PYTHON=$(which python3 || which python)
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
PROJ_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
SCRIPT="$SCRIPT_DIR/../scripts/parse_template.py"
|
|
|
|
echo "=== 测试 parse_template.py ==="
|
|
echo "模板: $PROJ_DIR/aim/aim03.pptx"
|
|
|
|
OUTPUT=$($PYTHON "$SCRIPT" "$PROJ_DIR/aim/aim03.pptx" 2>/dev/null)
|
|
|
|
# 验证输出是合法 JSON
|
|
echo "$OUTPUT" | $PYTHON -m json.tool > /dev/null 2>&1
|
|
if [ $? -ne 0 ]; then
|
|
echo "FAIL: 输出不是合法 JSON"
|
|
exit 1
|
|
fi
|
|
|
|
# 验证包含 pages 键
|
|
echo "$OUTPUT" | $PYTHON -c "import sys, json; d=json.load(sys.stdin); assert 'pages' in d, 'missing pages key'" 2>/dev/null
|
|
if [ $? -ne 0 ]; then
|
|
echo "FAIL: 输出缺少 pages 键"
|
|
exit 1
|
|
fi
|
|
|
|
echo "PASS: parse_template.py 输出正确"
|
|
echo "$OUTPUT" | python -c "
|
|
import sys, json
|
|
d = json.load(sys.stdin)
|
|
print(f' 页数: {len(d[\"pages\"])}')
|
|
print(f' 文本占位符: {d.get(\"all_text\", [])}')
|
|
print(f' 图表占位符: {d.get(\"all_chart\", [])}')
|
|
" 2>/dev/null
|