将本地 MDF(MarkdownFlow)课程文件同步到 AI-Shifu 平台的 Agent Skill。
支持章→节嵌套结构,通过 REST API 自动创建课程、章节和课节,并写入 MDF 授课提示词。
- 📦 将 MDF 课程目录转为 AI-Shifu 导入 JSON
- 🏗️ 支持章→节嵌套结构(不只是平铺)
- 🔄 支持更新已有课程(复用 shifu_bid)
- 🧹 自动清理旧 outline
my-course/
├── structure.json # 章节结构定义
└── lessons/
├── lesson-01.md # MDF 授课提示词
├── lesson-02.md
└── ...
{
"title": "课程标题",
"description": "课程描述",
"chapters": [
{
"title": "第一章:xxx",
"lessons": [
{"title": "第1节标题", "file": "lesson-01.md"},
{"title": "第2节标题", "file": "lesson-02.md"}
]
}
]
}# 新建课程
python3 scripts/shifu-structured-import.py \
--base-url https://app.ai-shifu.cn \
--token <your_jwt_token> \
--structure my-course/structure.json \
--lessons-dir my-course/lessons/
# 更新已有课程
python3 scripts/shifu-structured-import.py \
--base-url https://app.ai-shifu.cn \
--token <your_jwt_token> \
--structure my-course/structure.json \
--lessons-dir my-course/lessons/ \
--shifu-bid <existing_shifu_bid># 先生成导入 JSON
python3 scripts/mdf-to-shifu-json.py \
--course-dir my-course \
--output my-course/shifu-import.json \
--title "课程标题"
# 再通过 API 导入
python3 scripts/shifu-api-import.py \
--base-url https://app.ai-shifu.cn \
--token <token> \
--json-file my-course/shifu-import.json| 脚本 | 用途 |
|---|---|
shifu-structured-import.py |
推荐 — 按章→节结构导入 |
shifu-api-import.py |
平铺导入(所有 lesson 同级) |
mdf-to-shifu-json.py |
将课程目录转为 AI-Shifu CLI 导入 JSON |
- Python 3.8+
requests(pip install requests)
- mdf-teaching-script-generator — 生成 MDF 授课提示词
- mdf-teaching-optimizer — 优化 MDF 提示词
- mdf-material-adapter — 课程素材清洗
MIT