move claude-marketplace to ai-proj-helper

This commit is contained in:
2026-03-12 21:42:30 +08:00
parent d7b6835e1d
commit 43585b8504
188 changed files with 39510 additions and 0 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/"