Yuque Lakebook Export
Overview
Convert Yuque knowledge bases, Yuque documents, or .lakebook files into local Markdown folders prepared for Obsidian. The workflow supports single or batch exports and cleanup for common migration issues such as missing images, cropped image mismatches, broken internal links, wrong folder hierarchy, and Markdown table rendering problems.
When to Use
Use this skill when the user asks for:
- Exporting one or more Yuque
.lakebook files
- Converting a Yuque knowledge base into Markdown
- Migrating Yuque content into Obsidian
- Fixing Yuque export issues around images, cropped images, internal links, hierarchy, or tables
Do not use
Do not use this skill for:
- Generic Markdown editing that does not involve Yuque or
.lakebook
- Website scraping tasks
- Export tasks that already come from a non-Yuque format
Instructions
- Prefer non-interactive execution so the agent can run deterministically.
- Before any non-interactive export, the agent must confirm the output root directory with the user. Do not choose an output directory on the user's behalf.
- If the user has not provided an output directory, ask a concise question and wait for the user's answer before running the export command.
- Prefer
uv consistently. Do not create temporary .venv or similar task-local environments in the working directory.
- Before running any
uv command, first check whether uv is available in the environment.
- If
uv is not installed or not available in PATH, the agent must ask the user for confirmation before installing uv. Do not install it silently.
- Before running
uv sync or uv run python scripts/cli.py ..., the agent must first switch into the installed skill tool directory, meaning the directory that contains this SKILL.md, pyproject.toml, uv.lock, and scripts/. Do not run these commands directly from the .lakebook source directory, the output directory, or the user's current workspace root.
- Use this entrypoint for agent execution:
uv run python scripts/cli.py
- Sync dependencies before first use:
uv sync
- Recommended command order:
cd /path/to/installed-skill-root
uv sync
uv run python scripts/cli.py ...
- Standard single-file execution:
uv run python scripts/cli.py -l "/path/to/your_file.lakebook" -o "/target/root"
- Standard batch execution:
uv run python scripts/cli.py -l "/path/to/your_file_1.lakebook" "/path/to/your_file_2.lakebook" -o "/target/root"
- Although
scripts/cli.py still supports interactive terminal selection for manual human use, agents must not rely on interactive mode because they cannot reliably capture terminal interaction state. Always pass explicit -l and -o arguments.
- Do not manually create temporary virtual environments in the current working directory, the user's download directory, or any task directory; dependencies should be managed by
uv from the skill tool directory.
- Some Yuque exports include
<!doctype lake> at the start of the document body; older implementations could render this as a stray lake## prefix in Markdown. The current skill implementation already handles this case.
- After export, verify:
.md files exist
- sibling
.assets folders exist
- internal links are relative Markdown paths
- images render in Obsidian
- exported documents do not start with an erroneous
lake## prefix
- If export fails, inspect the batch log written next to the input
.lakebook files.
For detailed behavior, troubleshooting, and output rules, read references/usage.md.
1---2name: yuque-lakebook-export3description: Use when exporting Yuque or .lakebook content to local Markdown for Obsidian migration or cleanup.4license: MIT5---6
7# Yuque Lakebook Export
8
9## Overview
10
11Convert Yuque knowledge bases, Yuque documents, or `.lakebook` files into local Markdown folders prepared for Obsidian. The workflow supports single or batch exports and cleanup for common migration issues such as missing images, cropped image mismatches, broken internal links, wrong folder hierarchy, and Markdown table rendering problems.
12
13## When to Use
14
15Use this skill when the user asks for:
16
17- Exporting one or more Yuque `.lakebook` files
18- Converting a Yuque knowledge base into Markdown
19- Migrating Yuque content into Obsidian
20- Fixing Yuque export issues around images, cropped images, internal links, hierarchy, or tables
21
22## Do not use
23
24Do not use this skill for:
25
26- Generic Markdown editing that does not involve Yuque or `.lakebook`
27- Website scraping tasks
28- Export tasks that already come from a non-Yuque format
29
30## Instructions
31
321. Prefer non-interactive execution so the agent can run deterministically.
332. Before any non-interactive export, the agent must confirm the output root directory with the user. Do not choose an output directory on the user's behalf.
343. If the user has not provided an output directory, ask a concise question and wait for the user's answer before running the export command.
354. Prefer `uv` consistently. Do not create temporary `.venv` or similar task-local environments in the working directory.
365. Before running any `uv` command, first check whether `uv` is available in the environment.
376. If `uv` is not installed or not available in `PATH`, the agent must ask the user for confirmation before installing `uv`. Do not install it silently.
387. Before running `uv sync` or `uv run python scripts/cli.py ...`, the agent must first switch into the installed skill tool directory, meaning the directory that contains this `SKILL.md`, `pyproject.toml`, `uv.lock`, and `scripts/`. Do not run these commands directly from the `.lakebook` source directory, the output directory, or the user's current workspace root.
398. Use this entrypoint for agent execution:
40
41```bash
42uv run python scripts/cli.py
43```
44
459. Sync dependencies before first use:
46
47```bash
48uv sync
49```
50
5110. Recommended command order:
52
53```bash
54cd /path/to/installed-skill-root
55uv sync
56uv run python scripts/cli.py ...
57```
58
5911. Standard single-file execution:
60
61```bash
62uv run python scripts/cli.py -l "/path/to/your_file.lakebook" -o "/target/root"
63```
64
6512. Standard batch execution:
66
67```bash
68uv run python scripts/cli.py -l "/path/to/your_file_1.lakebook" "/path/to/your_file_2.lakebook" -o "/target/root"
69```
70
7113. Although `scripts/cli.py` still supports interactive terminal selection for manual human use, agents must not rely on interactive mode because they cannot reliably capture terminal interaction state. Always pass explicit `-l` and `-o` arguments.
7214. Do not manually create temporary virtual environments in the current working directory, the user's download directory, or any task directory; dependencies should be managed by `uv` from the skill tool directory.
7315. Some Yuque exports include `<!doctype lake>` at the start of the document body; older implementations could render this as a stray `lake##` prefix in Markdown. The current skill implementation already handles this case.
7416. After export, verify:
75- `.md` files exist
76- sibling `.assets` folders exist
77- internal links are relative Markdown paths
78- images render in Obsidian
79- exported documents do not start with an erroneous `lake##` prefix
80
8117. If export fails, inspect the batch log written next to the input `.lakebook` files.
82
83For detailed behavior, troubleshooting, and output rules, read `references/usage.md`.