From courseskills
Use when publishing AI-generated course lesson mp4 files into the aistudy101 website course-assets tree, especially from lesson*/ directories into static/course-assets/<course-id>/lesson*/video.
How this skill is triggered — by the user, by Claude, or both
Slash command
/courseskills:movecourseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Move or publish generated lesson videos from a course-generation workspace into the aistudy101 website assets tree. Resolve and validate the requested course id against the website course ID registry first, then `course-sources.yaml`, map `lessonN/*.mp4` to the matching website lesson folder, and use English filenames.
Move or publish generated lesson videos from a course-generation workspace into the aistudy101 website assets tree. Resolve and validate the requested course id against the website course ID registry first, then course-sources.yaml, map lessonN/*.mp4 to the matching website lesson folder, and use English filenames.
Default behavior is a safe publish copy. Delete the generated originals only when the user explicitly asks for a true move.
When this workflow adjusts or registers course metadata, default the course status to 已发布 after the course is ready, unless the user gives a different status or special instruction.
Use this skill when:
.../course-outline/.../<course>/lesson1, lesson2, etc..mp4 that should land under /home/likefallwind/code/aistudy101-website/static/course-assets/<course-id>/lessonN/video/.Do not use this skill for slide rendering, narration generation, or video assembly. Use codex2course or pdf2video first.
| Input | Default / source |
|---|---|
| Source course directory | Current working directory, unless user gives a path |
| Course id | Ask the user if not provided; examples: ai-enlightenment, python-intro |
| Destination root | /home/likefallwind/code/aistudy101-website/static/course-assets |
| Course registry | /home/likefallwind/code/aistudy101-website/course-sources.yaml |
| Course ID registry | /home/likefallwind/code/aistudy101-website/docs/course-id-registry.md |
| Website repo root | /home/likefallwind/code/aistudy101-website |
| Optional local asset config | /home/likefallwind/code/aistudy101-website/course-assets.local.yaml |
If the course id is not listed in course-sources.yaml, distinguish these cases:
docs/course-id-registry.md. Reuse that ID when present, even if the course is still marked 预留.README.md, git remote, and ai-study-101-curriculum-system-v0.3.md. Choose a conservative lowercase kebab-case id only when it is obvious, then update docs/course-id-registry.md; otherwise ask.course-sources.yaml before copying videos. Prefer the source repo remote URL when available, and include fallback metadata matching the curriculum placement.course-assets.local.yaml so npm run sync can republish them from the local source directory.--allow-unknown-course only when the user explicitly wants raw static assets without registering the course.lessonN..mp4; report missing or duplicate videos before copying anything.docs/course-id-registry.md when the user gave a Chinese title, then validate it against the ID registry or course-sources.yaml.<dest-root>/<course-id>/lessonN/video/.lessonN-intro.mp4.npm run sync so src/data/course-content.json, src/data/courses.json, and src/data/curriculum-map.json reference the published videos.已发布 by default. Follow the user's explicit status instead if they provide one, such as 待审核 or AI初稿.npm run build when the change should be ready for review or deployment.When the user says a source course "corresponds to" a curriculum item, treat the task as both course registration and video publishing.
src/data/curriculum-map.json.course-sources.yaml entry with:
id: the stable ID from docs/course-id-registry.md; add a registry row first if the curriculum item is new.type: giteerepo: the source repo URL from git -C <source> remote -v when present.fallback: title, stage, education phase, track, status, hours, and theme lines. Use status: 已发布 by default after the course has been adjusted, unless the user explicitly specifies another status.course-assets.local.yaml for the local source fallback.npm run sync, confirm the course appears in:
src/data/courses.jsonsrc/data/course-content.jsonsrc/data/curriculum-map.jsonFor local-only videos, add:
courses:
python-advanced:
source_dir: /home/likefallwind/code/course-outline/stage3/01-python-advanced
video_globs:
- "lesson*/*.mp4"
video_publish_name: "{lesson_id}-intro{suffix}"
course-assets.local.yaml is git-ignored; mention it in the final status, but do not expect it to show up in git diff.
Prefer the bundled script because it preflights all lessons before writing:
python ~/.agents/skills/movecourse/scripts/movecourse.py --course ai-enlightenment --dry-run
python ~/.agents/skills/movecourse/scripts/movecourse.py --course-title "Python 编程进阶" --dry-run
python ~/.agents/skills/movecourse/scripts/movecourse.py --course ai-enlightenment
Useful options:
| Option | Use |
|---|---|
--source PATH | Source course directory; defaults to pwd |
--course ID | Required course id under course-assets |
--course-title TITLE | Resolve a Chinese curriculum title through docs/course-id-registry.md |
--dry-run | Print planned operations without writing |
--overwrite | Replace existing destination mp4 files |
--move | Delete source mp4 after verified copy; use only when user explicitly asked |
--allow-unknown-course | Continue when course id is absent from both course-sources.yaml and the ID registry |
--filename-template '{lesson}-intro.mp4' | English output pattern |
After copying, verify the website data:
npm run sync
rg -n "python-advanced|Python 编程进阶" src/data/courses.json src/data/course-content.json src/data/curriculum-map.json
npm run build
If npm run sync reports a Gitee clone/auth failure but then says it used course-assets.local.yaml, that is acceptable for local publishing. The final sync summary should have error: 0.
If the script is unavailable, validate course id and mp4 counts first, then:
COURSE_ID="ai-enlightenment"
SRC="$PWD"
DST="/home/likefallwind/code/aistudy101-website/static/course-assets/$COURSE_ID"
for lesson_dir in "$SRC"/lesson*; do
lesson="$(basename "$lesson_dir")"
video_dir="$DST/$lesson/video"
mkdir -p "$video_dir"
cp -p "$lesson_dir"/*.mp4 "$video_dir/$lesson-intro.mp4"
done
lessonN-intro.mp4 is acceptable and matches existing courses.ai-enlightenment is a course id; the Chinese title AI 启蒙体验 should be resolved through docs/course-id-registry.md, not guessed from a folder name.course-sources.yaml and run npm run sync.course-assets.local.yaml to know where local videos come from.course-assets.local.yaml and ends with error: 0, report the warning but continue verification.--overwrite when destination files already exist.npx claudepluginhub likefallwind/courseskills --plugin courseskillsCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.