♻️ refactor(skills): rename repo skills source dir

move the repository skills source from `codex/skills` to `skills`.

update vendor/install_skills paths, thirdparty sync pipeline, docs, and regression tests, including deployment-route e2e coverage.
This commit is contained in:
csh
2026-05-19 09:09:54 +08:00
parent f049dfbe10
commit 2c5050de09
100 changed files with 241 additions and 36 deletions
+10 -10
View File
@@ -36,7 +36,7 @@ for entry in data["sources"]:
PY
}
render_codex_skill() {
render_skill() {
local snapshot_root="$1"
local output_dir="$2"
local platform_config_rel="$3"
@@ -101,8 +101,8 @@ PY
tracked_skill_exists() {
local name="$1"
# conflict only if a first-party SKILL.md exists directly under codex/skills/<name>/
[ -f "codex/skills/$name/SKILL.md" ]
# conflict only if a first-party SKILL.md exists directly under skills/<name>/
[ -f "skills/$name/SKILL.md" ]
}
@@ -122,7 +122,7 @@ trap cleanup EXIT
git checkout -B "$TARGET_BRANCH" "origin/$TARGET_BRANCH"
mkdir -p "codex/skills/thirdparty/.sources"
mkdir -p "skills/thirdparty/.sources"
sources_file="$tmp_dir/sources.tsv"
if ! emit_sources_tsv > "$sources_file"; then
@@ -136,7 +136,7 @@ while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_su
if [ -f "$source_list" ]; then
while IFS= read -r name; do
[ -n "$name" ] || continue
rm -rf "codex/skills/$name"
rm -rf "skills/$name"
done < "$source_list"
fi
done < "$sources_file"
@@ -169,13 +169,13 @@ while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_su
exit 1
fi
rm -rf "codex/skills/thirdparty/$name"
cp -R "$dir" "codex/skills/thirdparty/$name"
rm -rf "skills/thirdparty/$name"
cp -R "$dir" "skills/thirdparty/$name"
names+=("$name")
owners["$name"]="$source_id"
done
;;
render_codex_skill)
render_skill)
name="$output_name"
if [ -n "${owners[$name]:-}" ] && [ "${owners[$name]}" != "$source_id" ]; then
echo "ERROR: duplicate third-party skill name: $name" >&2
@@ -186,7 +186,7 @@ while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_su
exit 1
fi
render_codex_skill "$snapshot_root" "codex/skills/thirdparty/$name" "$platform_config" "$template_root" "$data_dir" "$scripts_dir"
render_skill "$snapshot_root" "skills/thirdparty/$name" "$platform_config" "$template_root" "$data_dir" "$scripts_dir"
names+=("$name")
owners["$name"]="$source_id"
;;
@@ -199,7 +199,7 @@ while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_su
printf "%s\n" "${names[@]}" | sort > "$source_list"
done < "$sources_file"
git add codex/skills
git add skills
if git diff --cached --quiet; then
echo "No third-party skills to sync."
+4 -4
View File
@@ -6,7 +6,7 @@
"upstream_ref": "main",
"snapshot_dir": "superpowers",
"sync_mode": "copy_skill_dirs",
"source_list": "codex/skills/thirdparty/.sources/superpowers.list",
"source_list": "skills/thirdparty/.sources/superpowers.list",
"skills_subdir": "skills",
"remove_paths": ["skills/ui-ux-pro-max"]
},
@@ -15,8 +15,8 @@
"upstream_repo": "https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git",
"upstream_ref": "main",
"snapshot_dir": "ui-ux-pro-max",
"sync_mode": "render_codex_skill",
"source_list": "codex/skills/thirdparty/.sources/ui-ux-pro-max.list",
"sync_mode": "render_skill",
"source_list": "skills/thirdparty/.sources/ui-ux-pro-max.list",
"output_name": "ui-ux-pro-max",
"platform_config": "src/ui-ux-pro-max/templates/platforms/codex.json",
"template_root": "src/ui-ux-pro-max/templates",
@@ -29,7 +29,7 @@
"upstream_ref": "main",
"snapshot_dir": "andrej-karpathy-skills",
"sync_mode": "copy_skill_dirs",
"source_list": "codex/skills/thirdparty/.sources/andrej-karpathy-skills.list",
"source_list": "skills/thirdparty/.sources/andrej-karpathy-skills.list",
"skills_subdir": "skills"
}
]