agentleFS
anneheartrecordanneheartrecord/charles-skill/skills/lakebook-converter/SKILL.md

convert-lakebook

Skill3 starsChanged 3 months agoMITView on GitHub

Convert Yuque .lakebook exports to Markdown files. Use when the user has a .lakebook file and wants to extract all documents as individual .md files. Supports batch conversion with an auto-generated index file.

  • Installs packages

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When the user provides a .lakebook file path, run the conversion script:

    line 35
  2. Very specific:

    If the user just says /convert-lakebook with no arguments:

    line 48
  3. Very specific:

    Ask the user for the .lakebook file path

    line 50
  4. Very specific:

    Ask where they want the output (suggest ~/Desktop/lakebook-converter/output/)

    line 51
  5. Distinctive:

    If dependencies are missing, prompt the user to install them

    line 86
  6. Distinctive:

    If the file doesn't exist, report the error clearly

    line 87
  7. Distinctive:

    If some documents fail to convert, report them but continue with the rest

    line 88
  8. Distinctive:

    After conversion, suggest the user can:

    line 92
  9. Very specific:

    Use /extract-memory <output_dir> to analyze their writing style

    line 93
  10. Distinctive:

    Read specific documents with the Read tool

    line 94
  11. Distinctive:

    Search across documents with Grep

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

convert-lakebook

Convert Yuque .lakebook export files to clean Markdown documents.

What This Skill Does

  1. Extracts the .lakebook tar archive
  2. Parses $meta.json for document metadata (titles, ordering, dates)
  3. Converts each document's HTML body to clean Markdown using html2text
  4. Outputs individual .md files named by document title
  5. Generates an _index.md with a table of all documents

Prerequisites

pip install beautifulsoup4 html2text

Usage

When the user provides a .lakebook file path, run the conversion script:

python3 ~/Desktop/lakebook-converter/convert.py "<lakebook_file_path>" --output "<output_dir>"

Parameters

  • <lakebook_file_path>: Path to the .lakebook file (required)
  • <output_dir>: Output directory for Markdown files (optional, defaults to ~/Desktop/lakebook-converter/output/)

Default Behavior

If the user just says /convert-lakebook with no arguments:

  1. Ask the user for the .lakebook file path
  2. Ask where they want the output (suggest ~/Desktop/lakebook-converter/output/)
  3. Run the conversion
  4. Report results: how many docs converted, where they are, and show the index

Example Invocations

/convert-lakebook ~/Desktop/export.lakebook
/convert-lakebook ~/Downloads/my-notes.lakebook --output ~/Documents/notes/

Output Format

Each document becomes a Markdown file:

# Document Title

[converted content...]

An _index.md file is generated with:

# Document Index

Total: N documents

| # | Title | Words | Created |
|---|-------|-------|---------|
| 1 | [Title](filename.md) | 1234 | 2024-01-01 |

Error Handling

  • If dependencies are missing, prompt the user to install them
  • If the file doesn't exist, report the error clearly
  • If some documents fail to convert, report them but continue with the rest

Post-Conversion Tips

After conversion, suggest the user can:

  1. Use /extract-memory <output_dir> to analyze their writing style
  2. Read specific documents with the Read tool
  3. Search across documents with Grep

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.