agentleFS
jyjeannejyjeanne/dita-skills/generate-dita-topic/SKILL.md

generate-dita-topic

Skill2 starsChanged 6 months agoMITView on GitHub

Generates a valid DITA 1.3 XML topic template for a given topic type. Use this skill when you need a correctly structured starting point for concept, task, reference, troubleshooting, glossentry, or base topic authoring. Output includes the correct DOCTYPE declaration, required elements, and commonly used optional elements pre-scaffolded.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All required elements for the topic type

    line 27

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Overview

Generates a DITA 1.3 XML topic template from a topic type, title, and ID.

Usage

# Generate a concept
python scripts/generate_dita_topic.py concept "My Concept Title" my-concept-id

# Generate a task (writes to stdout)
python scripts/generate_dita_topic.py task "Install the Software" install-software

# Supported types: topic | concept | task | reference | troubleshooting | glossentry

Output

Well-formed XML printed to stdout, including:

  • Correct <?xml?> declaration and <!DOCTYPE> with DITA 1.3 public identifier
  • All required elements for the topic type
  • Commonly used optional elements pre-scaffolded (e.g., <prereq>, <result> for tasks)
  • Placeholder text {{FILL}} marking elements that need content

Examples

See assets/ for pre-rendered template examples for each type.

Common edge cases

  • id must be a valid XML ID (starts with letter or _, no spaces); the script normalises spaces to hyphens
  • glossentry does not use a conventional body element — output is <glossterm> + <glossdef>
  • Task template includes <prereq>, <context>, <result>, <postreq> as optional scaffolding — remove unused ones before validation

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.