$npx -y skills add yha9806/academic-writing-toolkit --skill exportConvert thesis chapters and reading notes from Markdown to Word (.docx) and package for submission. Use when preparing materials for supervisors or examiners.
| 1 | # /export — Document Export Skill |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Convert thesis chapters and reading notes from Markdown to Word (.docx) format and package them into a ZIP archive for submission to supervisors or examiners. This skill is user-invoked only and will not be triggered automatically. |
| 6 | |
| 7 | ## Trigger Words |
| 8 | |
| 9 | This skill activates on: `/export`. It is never invoked automatically by the model. |
| 10 | |
| 11 | ## Parameters |
| 12 | |
| 13 | - `$ARGUMENTS[0]` -- **scope**: `chapters` | `notes` | `all` (default: `all`) |
| 14 | - `$ARGUMENTS[1]` -- **language filter**: `en-only` | `all` (default: `all`) |
| 15 | |
| 16 | Examples: |
| 17 | - `/export chapters en-only` -- export only chapter files, skip files with significant CJK content |
| 18 | - `/export notes all` -- export only reading notes, include all languages |
| 19 | - `/export` -- export everything, all languages |
| 20 | |
| 21 | ## Workflow |
| 22 | |
| 23 | 1. **Check dependencies.** Verify that `pypandoc` is installed AND a working `pandoc` binary is on PATH (the script smoke-probes via `pypandoc.get_pandoc_version()`). If pypandoc/pandoc are unavailable, fall back to `python-docx` + `markdown`. Report which conversion method is being used. |
| 24 | |
| 25 | **Run from the project root.** |
| 26 | |
| 27 | 2. **Run the conversion script.** |
| 28 | ``` |
| 29 | python .claude/skills/export/scripts/convert_to_docx.py \ |
| 30 | --base-dir {project_root} \ |
| 31 | --output-dir {project_root}/final_output \ |
| 32 | --scope {scope} \ |
| 33 | --lang-filter {lang_filter} |
| 34 | ``` |
| 35 | |
| 36 | 3. **Report results.** |
| 37 | ``` |
| 38 | ## Export Complete |
| 39 | |
| 40 | | Item | Value | |
| 41 | |------|-------| |
| 42 | | Files converted | {N} | |
| 43 | | Files skipped (language filter) | {N} | |
| 44 | | Output directory | {path} | |
| 45 | | ZIP archive | {path} | |
| 46 | | Total size | {size} | |
| 47 | |
| 48 | Conversion method: {pandoc | python-docx fallback} |
| 49 | ``` |
| 50 | |
| 51 | ## Constraints |
| 52 | |
| 53 | 1. **User-invoked only.** This skill has `disable-model-invocation: true` and must not run unless the user explicitly calls `/export`. |
| 54 | 2. **No hardcoded paths.** All paths are derived from arguments or project root. |
| 55 | 3. **No emoji** in output. |
| 56 | 4. **Preserve formatting** as much as possible during conversion -- headings, tables, block quotes, inline code. |