mdita-write
Skill4 starsChanged 4 months agoApache-2.0View on GitHub
Write Markdown DITA topics and maps, then convert to DITA XML using DITA-OT with the org.lwdita plugin. Use when asked to create DITA documentation, write Markdown DITA topics, generate concept/task/reference content, create DITA maps, or convert Markdown to DITA XML.
- Pipes a download into a shell
In this repository53 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- action-commentsSkill
- article-extractorSkill
- docs-convert-gdoc-mdSkill
- docs-orchestratorSkill
- docs-review-content-qualitySkill
- docs-review-modular-docsSkill
- docs-review-securitySkill
- docs-review-styleSkill
- docs-review-technicalSkill
- docs-ticket-readinessSkill
- docs-workflow-code-analysisSkill
- docs-workflow-create-jiraSkill
- docs-workflow-create-merge-requestSkill
- docs-workflow-jira-readySkill
- docs-workflow-pipeline-diagnosticsSkill
- docs-workflow-planningSkill
- docs-workflow-pr-analysisSkill
- docs-workflow-quality-gateSkill
- docs-workflow-requirementsSkill
- docs-workflow-scope-req-auditSkill
- docs-workflow-security-reviewSkill
- docs-workflow-startSkill
- docs-workflow-style-reviewSkill
- docs-workflow-tech-reviewSkill
- docs-workflow-writingSkill
- git-pr-readerSkill
- ibm-sg-audience-and-mediumSkill
- ibm-sg-language-and-grammarSkill
- ibm-sg-legal-informationSkill
- ibm-sg-numbers-and-measurementSkill
- ibm-sg-punctuationSkill
- ibm-sg-referencesSkill
- ibm-sg-structure-and-formatSkill
- ibm-sg-technical-elementsSkill
- jira-readerSkill
- jira-writerSkill
- learn-codeSkill
- lint-with-valeSkill
- query-codeSkill
- redhat-docs-tocSkill
- rh-ssg-accessibilitySkill
- rh-ssg-formattingSkill
- rh-ssg-grammar-and-languageSkill
- rh-ssg-gui-and-linksSkill
- rh-ssg-legal-and-supportSkill
- rh-ssg-release-notesSkill
- rh-ssg-structureSkill
- rh-ssg-technical-examplesSkill
- rn-known-issuesSkill
- understand-pull-requestSkill
- validate-plugin-prereqsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Write Markdown DITA topics and maps, then convert them to DITA XML using DITA-OT with the org.lwdita plugin.
- Distinctive: line 42
Read these before writing Markdown DITA content:
- Distinctive: line 52
When asked to write Markdown DITA content:
- Distinctive: line 62
After writing Markdown DITA files, convert them to DITA XML using the conversion script:
≈ “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.
Files
Markdown DITA writing and conversion skill
Write Markdown DITA topics and maps, then convert them to DITA XML using DITA-OT with the org.lwdita plugin.
Prerequisites
Requires Java 17+, DITA-OT 4.x, and the org.lwdita plugin, version 6.0.0. Install the plugin from the v6.0.0 release:
dita install https://github.com/aireilly/org.lwdita/releases/download/v6.0.0/org.lwdita-6.0.0.zipTo verify the download before installing, check its SHA-256 against the expected value:
curl -sL https://github.com/aireilly/org.lwdita/releases/download/v6.0.0/org.lwdita-6.0.0.zip | sha256sum
# expected: bcec1d72dfc2597107a8a937c27a2ac5b32bb9833a2ef17813c22f7722b501dbThe conversion script checks for Java, DITA-OT, and the plugin, and reports what to install if anything is missing.
Synopsis
/mdita-write # Interactive: ask what to write
/mdita-write concept <description> # Write a concept topic
/mdita-write task <description> # Write a task topic
/mdita-write reference <description> # Write a reference topic
/mdita-write map <description> # Write a Markdown DITA map
/mdita-write convert <file> # Convert existing Markdown DITA to DITA XMLReference files
Read these before writing Markdown DITA content:
- Markdown DITA syntax reference: front matter, topic types, block elements, maps
- Concept topic example: nested topics, tables, definition lists, code blocks, admonitions
- Task topic example: prerequisites, context, steps with substeps and choices, verification, and next steps section headings
- Reference topic example: lookup tables, definition lists, code blocks, admonitions
- Map example: topic references, topic heads, ordered sequences, relationship tables
Usage workflow
When asked to write Markdown DITA content:
- Determine the topic type: concept (explains what), task (explains how), or reference (lookup info)
- Read the syntax reference and the matching example file for the correct structure
- Write the Markdown DITA file using the
.mdextension and set the topic type with an H1 class:# Title {.concept},{.task}, or{.reference} - Convert to DITA XML using the conversion script
- Fix issues and retry: the conversion script also runs
dita validateagainst each generated file, so a"status": "error"result can mean either a failed transform or DTD-invalid output (for example a task with two<result>elements, which theorg.lwditatransform will serialize without complaint since it doesn't reparse its own output against the DTD). Read the reported error, adjust the Markdown source, and reconvert. Loop until"status": "success"— that status is the only signal that the output is genuinely DTD-valid DITA, so do not report the task done before reaching it.
Conversion to DITA XML
After writing Markdown DITA files, convert them to DITA XML using the conversion script:
bash ${CLAUDE_SKILL_DIR}/scripts/mdita_convert.sh <input> [output_dir]Arguments:
input: path to a.mdor.mditamapfile (not a directory; use a map to convert multiple topics at once)output_dir: output directory (default:./dita-output). The script clears prior.ditaand.ditamapfiles here before converting
The script outputs JSON with the conversion results, always including a status field:
{"status": "success", "dita_version": "DITA-OT version 4.3.1", "input": "guide.mditamap", "output_dir": "./dita-output", "file_count": 2, "files": ["dita-output/topic.dita", "dita-output/guide.ditamap"]}On failure (missing prerequisites, invalid input, or a conversion error), the script exits non-zero and emits {"status": "error", "error": "..."} or, once prerequisites are met, {"status": "error", "dita_version": "...", "input": "...", "output_dir": "...", "stderr": "..."}.
The script also validates every generated .dita/.ditamap file against its DTD with dita validate. If that fails — the transform can produce structurally invalid output (for example two <result> elements in a task) without itself failing — the script reports {"status": "error", "dita_version": "...", "input": "...", "output_dir": "...", "error": "Generated DITA is not valid against its DTD...\n<file>:\n<dita validate output>"}. Treat this the same as a conversion failure: fix the Markdown source and reconvert.
Example invocations
- "Write a Markdown DITA concept topic about container orchestration"
- "Create a Markdown DITA task for installing a command-line tool"
- "Write a Markdown DITA reference topic for CLI command options"
- "Create a Markdown DITA map for a product guide"
- "Convert this Markdown file to DITA XML"
- "Write a task topic with prerequisites and verification steps"
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
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.

