You will find links to "hello world" reference extensions on this page. K-Meleon has 3 main types of extensions:
Macros
are simple, human-readable extensions that any user can modify or even create in a text editor. You can open the macro folder from K-Meleon by selecting "Edit - Configuration - Macros" in the menu.
K-Meleon Extensions
are .7z archives that can be extracted directly into the K-Meleon root folder or installed with the K-Meleon Extension Manager. They contain macros, graphical resources, and other tools. To use the K-Meleon extension manager, you will have to download the extension first.
XUL-based extensions
are distributed as .xpi files. They use the same Cross-platform User-interface Language (XUL) that Mozilla Firefox originally used. Current versions of Firefox use Web Extensions which are not supported in K-Meleon. You can modify extensions written for Firefox and other applications that support XUL (Thunderbird, SeaMonkey, Pale Moon, Mypal, Roytam's New Moon, Basilisk, and Waterfox Classic) to run on K-Meleon. They can be installed via the "about:addons" pages, drag and drop to the browser window, and install links like the test link below:
Links
K-Meleon Documentation on writing extensions that covers XUL-based extensions, K-Meleon extensions, and macros.
GitHub Page for XUL-based "Hello World" extensions containing source code. Check the comments for explanations.
Hello World dual version of the XUL-based "Hello World" extension. It works even on the older K-Meleon 74 which stills supports Windows 2000.