refactor: 通用技能按类别拆分为独立目录

skills/ → skills-dev(9), skills-req(10), skills-ops(4),
skills-integration(8), skills-biz(4), skills-workflow(7)

generate-marketplace.py 改为自动扫描所有 skills-* 目录。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-14 11:31:58 +10:30
parent ea266e9cce
commit 712063071c
170 changed files with 341 additions and 346 deletions

View File

@@ -0,0 +1,58 @@
#!/bin/bash
# init-registry.sh - 初始化技能注册表
# 用法: ./init-registry.sh
set -e
SKILLS_DIR="$HOME/.claude/skills"
REGISTRY_FILE="$SKILLS_DIR/registry.yaml"
REPOS_DIR="$SKILLS_DIR/repos"
# 颜色定义
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
echo "初始化 Skills Registry..."
echo "----------------------------------------"
# 创建 repos 目录
if [ ! -d "$REPOS_DIR" ]; then
mkdir -p "$REPOS_DIR"
echo -e "${GREEN}✓ 创建 repos 目录${NC}"
else
echo -e "${YELLOW}⚠ repos 目录已存在${NC}"
fi
# 创建 registry.yaml
if [ ! -f "$REGISTRY_FILE" ]; then
cat > "$REGISTRY_FILE" << 'EOF'
# Skills Registry - 技能注册表
# 由 skill-manager 自动管理,请勿手动编辑
version: 1
updated_at: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
# 全局配置
config:
auto_update_check: true # 启动时检查更新
update_check_interval: 86400 # 检查间隔默认24小时
default_branch: main # 默认分支
# 已安装技能
skills: {}
EOF
# 替换日期
sed -i '' "s/\$(date -u +\"%Y-%m-%dT%H:%M:%SZ\")/$(date -u +"%Y-%m-%dT%H:%M:%SZ")/" "$REGISTRY_FILE"
echo -e "${GREEN}✓ 创建 registry.yaml${NC}"
else
echo -e "${YELLOW}⚠ registry.yaml 已存在${NC}"
fi
echo "----------------------------------------"
echo -e "${GREEN}✓ 初始化完成${NC}"
echo ""
echo "目录结构:"
echo " $SKILLS_DIR/"
echo " ├── registry.yaml"
echo " └── repos/"