1# SkillForge for DokuWiki 2 3**SkillForge** is a powerful DokuWiki plugin that exports entire namespaces as AI-ready Markdown packages. 4 5It creates a downloadable ZIP package with a `SKILL.md` entry file, converted Markdown pages, an `index.md` file, a machine-readable `skill.json` manifest and optional media files. 6 7The package is designed to work well with Anthropic-style `SKILL.md` workflows while remaining useful as a plain Markdown knowledge package for GitHub, Obsidian, MkDocs, AIWiki and similar tools. 8 9## Features 10 11- Select a DokuWiki namespace from a dropdown in the admin interface 12- Use a configured source page, default `start.txt`, as `SKILL.md` 13- Convert DokuWiki `.txt` pages to Markdown `.md` 14- Generate YAML frontmatter for exported pages 15- Generate `index.md` 16- Generate `skill.json` 17- Include media files from the matching media namespace 18- Create ZIP files without requiring PHP `ZipArchive` 19- Download through a dedicated DokuWiki action to avoid admin-page redirects 20- Show formatted metadata and a ZIP download button on skill source pages 21 22## Example output 23 24```text 25skilltest-skill/ 26├── SKILL.md 27├── index.md 28├── skill.json 29├── examples.md 30├── checklist.md 31└── media/ 32``` 33 34## Installation 35 36Copy the `skillforge` folder into your DokuWiki plugin directory: 37 38```text 39lib/plugins/skillforge 40``` 41 42Then open DokuWiki admin: 43 44```text 45Admin → SkillForge 46``` 47 48## Configuration 49 50SkillForge settings are available through DokuWiki's configuration manager. All settings have sensible defaults and work out of the box. 51 52| Setting | Default | Description | 53|---|---:|---| 54| `default_skill_source` | `start.txt` | Page inside the selected namespace used to generate `SKILL.md` | 55| `output_skill_filename` | `SKILL.md` | Name of the generated skill entry file | 56| `recursive` | `on` | Include subnamespaces | 57| `include_media` | `on` | Include files from the matching media namespace | 58| `generate_index` | `on` | Generate `index.md` | 59| `zip_filename_pattern` | `{namespace}-skill-{date}.zip` | ZIP filename pattern | 60| `show_rendered_metadata` | `on` | Show formatted YAML metadata where `<frontmatter>` or `<skillmeta>` is used | 61| `show_page_download_button` | `on` | Show an admin-only ZIP download button beside rendered skill metadata | 62| `download_button_label` | `Download SKILL.md (.zip)` | Text for the page download button | 63 64## Metadata 65 66Add metadata to the configured source page, usually `start.txt`: 67 68```text 69<frontmatter> 70name: ai-prompting 71description: Helps an AI assistant work with prompting knowledge. 72version: 1.0.0 73author: Henrik Yllemo 74tags: 75 - ai 76 - prompting 77 - dokuwiki 78</frontmatter> 79``` 80 81`<skillmeta>` is also supported for backward compatibility. 82 83The metadata is written as YAML frontmatter at the top of `SKILL.md`. 84In DokuWiki page rendering, the metadata block is shown as a formatted metadata panel instead of raw YAML. This can be disabled with `show_rendered_metadata`. 85 86When `show_page_download_button` is enabled, admins also get a **Download skill ZIP** button on pages containing a metadata block. The button creates a fresh export for that page's namespace and uses the current page as the `SKILL.md` source. 87The button text can be changed with `download_button_label`. It supports `{name}`, `{title}`, `{description}` and `{output}`, so a label like `Download {name} (.zip)` can use YAML frontmatter values. 88 89## Export flow 90 911. Open `Admin → SkillForge`. 922. Select a namespace. 933. Choose whether to include subnamespaces and media. 944. Click **Forge Package**. 955. Download the generated ZIP file. 96 97## ZIP support 98 99SkillForge includes a small internal ZIP writer using the ZIP STORE method. It does not require PHP `ZipArchive` and does not depend on `inc/pclzip.lib.php`. 100 101This is useful for lightweight DokuWiki installations such as DokuWiki-on-a-Stick with MicroApache. 102 103## Markdown conversion 104 105The current converter handles common DokuWiki syntax: 106 107- Headings 108- Internal links 109- External links 110- Images/media references 111- Code/file blocks 112- Bold and italic text 113- Frontmatter blocks 114 115Advanced DokuWiki syntax can be added incrementally. 116 117## Files generated 118 119| File | Purpose | 120|---|---| 121| `SKILL.md` | Main AI skill instruction file | 122| `index.md` | Human-readable file index | 123| `skill.json` | Machine-readable package manifest | 124| `*.md` | Converted namespace pages | 125| `media/` | Optional exported media files | 126 127## Development notes 128 129This release focuses on a practical, dependency-light export workflow. The next natural improvements are stronger link rewriting, richer media handling, validation and optional export profiles. 130 131## License 132 133MIT 134