Organize a GeekTime-style course resource package (资料包) directory into a single Markdown file for Obsidian. Uploads all local images to Aliyun via PicGo. Use when user wants to organize, consolidate, or convert a course 资料包 directory into a learning note, or mentions GeekTime/极客时间 course materials.
How this skill is triggered — by the user, by Claude, or both
Slash command
/organize-course-package:organize-course-packageThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Convert a `资料包` directory (md版本 / md版 folder + optional PDF 课件) into one structured `.md` file for Obsidian, with all images uploaded to Aliyun OSS.
Convert a 资料包 directory (md版本 / md版 folder + optional PDF 课件) into one structured .md file for Obsidian, with all images uploaded to Aliyun OSS.
oss2 installed: pip install oss2pymupdf installed: pip install pymupdf (for PDF extraction)source ~/.zprofile && python3 __SKILL_DIR__/scripts/organize.py \
"/path/to/NNxx资料包" \
"/path/to/SecondBrain/Courses"
The script outputs raw page-by-page PDF content under the ## 课件 XX:TITLE section.
After the script finishes, read the generated file and rewrite only the ## 课件 ... section with structured learning content. Keep everything after ## 动手实操 untouched.
⚠️ 超时防护:Cloudflare 超时为 120s。课件内容较长时,禁止一次性 Write 全部内容。必须分两步完成:先写骨架,再逐节填充。
读取原始 课件 section,规划 5-8 个主题分组,然后用 Edit 工具将原始 ## 课件 ... section 整体替换为只含 ### 标题 + <!-- FILL --> 占位符的骨架。每节不超过 3 行。
骨架示例:
## 课件 第X节-TITLE
### 主题一:XXX
<!-- FILL -->
---
### 主题二:XXX
<!-- FILL -->
---
### 本节作业
<!-- FILL -->
---
必须包含的固定末节:### 本节作业(对应 PDF 中的作业/任务页)。
骨架写完后,逐节用 Edit 将 <!-- FILL --> 替换为该节的完整结构化内容。每次只处理一个 ### 节,不要合并多节写入。
每节内容规则(同下方 Rewrite rules):按主题合并 slides → Mermaid 图 → Callouts → 表格 → --- 分隔符。
填充顺序:从第一节到最后一节,按骨架顺序依次 Edit,不可乱序或跳跃。
Rewrite rules for each section(适用于 Step 2b 每节的内容):
### subsections (not page-by-page)graph TD + subgraph per layergraph LRgraph LR side-by-side subgraphsgraph LR tree (root → branches → leaves) — ⚠️ 禁止用 mindmap:该类型需要 Mermaid v9.4+,Obsidian 内置版本可能不支持,会直接显示原始文本<br/> for line breaks, never \nfill:#4CAF50,stroke:#388E3C,color:#fff · core=fill:#2196F3,stroke:#1565C0,color:#fff · output=fill:#FF9800,stroke:#E65100,color:#fff> 📊 [description]SDD --> H 无效,必须连接内部节点:A --> H1\n,必须用 <br/>→ ← ↑ ↓)——Mermaid 解析器可能误判为流向语法,改用纯文字:->、to、then 等-->|"label"| 无效,必须写 -->|label|(Mermaid 解析器不识别 pipe 内的双引号,会导致整个图无法渲染)():Mermaid 解析器在某些版本下会将 ["text (sub)"] 中的圆括号误判为圆角矩形节点语法。改用方括号 []、中文括号 () 或直接去掉括号,如 ["OpenCode MCP Client"]_in/_out),避免物理上的环写入读取,不画反向边外部节点 --> subgraph内节点,优先将 subgraph 去掉,改为平铺节点 + style 着色区分层次[!NOTE][!INFO][!TIP][!QUOTE][!QUESTION]||(空白首格无空格),必须写 | | 或 | 维度 | 等有效内容**标题:** 与 |列头| 之间若无空行,Obsidian 不渲染为表格,直接显示原始管道符文本--- between each ### subsectionsubgraph has a matching end, no style references undefined nodes, no \n in labels, no Unicode arrows in labels, no cyclic edges inside subgraphs, no mindmap diagram type used, no quoted pipe labels (|"..."| → |...|), no ASCII parentheses () inside node labelsTell the user:
| Arg | Required | Description |
|---|---|---|
package_dir | yes | Absolute path to the 资料包 folder (e.g. 01资料包) |
output_dir | yes | Target directory for the output .md file |
--filename | no | Custom output filename (without .md); defaults to PDF cover title |
--use-claude | no | Call external Claude API to restructure PDF (requires API key; not needed for Claude Code) |
__SOURCE_DIR____OUTPUT_DIR__for pkg_dir in "/Users/fengyuhao/study_materials/ai/多Agent设计与工程化行动营"/*/; do
[[ "$pkg_dir" == *"资料包"* ]] || continue
source ~/.zprofile && python3 __SKILL_DIR__/scripts/organize.py \
"$pkg_dir" \
"__OUTPUT_DIR__"
done
| Situation | Behavior |
|---|---|
| Image file missing | Prints [WARN], keeps original markdown |
| md folder not found | Prints [ERROR], exits with code 1 |
| Output dir missing | Created automatically |
| PDF not found | Skipped silently, no 课件 section |
| Mermaid syntax issue | Auto-fixed if possible; WARNING printed for manual review |
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub skytechfyh/ai-marketplace --plugin organize-course-package