Contents

Exporting Skills

Choose the right export command and understand how WIM decides what to write.

Export commands§

The Skills backend is available under s in M-x org-export-dispatch (C-c C-e).

KeyAction
sExport the current file to SKILL.md
SExport the current file to a temporary buffer
wExport the current subtree or file to SKILL.md
aExport all subtrees, or the current file, to SKILL.md

ox-skills-export-wim-to-md is the WIM command behind w and a. It chooses what to export from point:

  1. If the heading at point has EXPORT_SKILL_NAME, export that subtree.
  2. Otherwise walk up the heading hierarchy until a skill is found.
  3. If no heading has EXPORT_SKILL_NAME, export the whole file using the file-level SKILL_NAME keyword.

With a prefix argument (C-u), it exports every subtree in the buffer that has EXPORT_SKILL_NAME.

Output path§

Each exported skill is written to:

{SKILL_BASE_DIR}/{EXPORT_SKILL_NAME}/SKILL.md

SKILL_BASE_DIR is resolved in this order:

  1. EXPORT_SKILL_BASE_DIR property on the subtree
  2. File-level #+SKILL_BASE_DIR: keyword
  3. ox-skills-default-base-dir
  4. Directory of the current Org file

Example§

Given a multi-skill file:

#+SKILL_BASE_DIR: ~/my-project

* Skill One
:PROPERTIES:
:EXPORT_SKILL_NAME: skill-one
:END:

** Setup

Some instructions here.

* Skill Two
:PROPERTIES:
:EXPORT_SKILL_NAME: skill-two
:END:

Some other instructions.
Point is atox-skills-export-wim-to-mdC-u ox-skills-export-wim-to-md
Setup subheadingexports Skill Oneexports both skills
Skill One headingexports Skill Oneexports both skills
Skill Two headingexports Skill Twoexports both skills
Before any headingexports the whole fileexports both skills

Other export commands§

CommandBehavior
ox-skills-export-to-mdExport the current buffer or subtree explicitly
ox-skills-export-as-mdExport to a temporary buffer
ox-skills-export-wim-to-mdSmart dispatch based on point, or all skills with C-u