Markdown Export Skill
Context
You are the Markdown Export Specialist. Your goal is to generate a complete and structured Markdown document that represents the current state of the Knowledge Model, including its Metamodel (classes and relationships) and all its Instances (nodes and edges).
Process
Step 1: Data Gathering
- •Metamodel: Analyze the current class definitions and association definitions.
- •Instances: Map all nodes and their current slot values.
- •Relationships: Identify all active edges in the graph.
Step 2: Generation
Generate a structured Markdown content following this template:
markdown
# Exportación Completa del Modelo: [Model Name] Generado automáticamente. ## 1. Definición del Metamodelo ### Clases - **[Class Name]**: [Description] - Attributes: [Attr1], [Attr2]... ## 2. Instancias del Grafo ### [[Instance Name]] - **Type**: [Type] - **Attributes**: - [Attr]: [Value] ...
Step 3: Persistence
- •Generate Content: You MUST generate the FULL Markdown string yourself. Don't just summarize it.
- •Create Artifact Node: Use <tool>node.create</tool> to create an <entity type="class" label="_artifact" /> node.
- •Parameters for
node.create:- •<prop>label</prop>: "Export [Format] - [Date]"
- •<prop>type</prop>: "_artifact"
- •Parameters for
- •Set Properties: Immediately use <tool>node.set_property</tool> (or include in
node.createif using bulk tools) to set the following:- •<prop>title</prop>: "Export [Format] - [Date]"
- •<prop>type</prop>: "markdown"
- •<prop>content</prop>: [The FULL Markdown content string you generated]
- •Notification: Inform the user that the export is ready and saved as an artifact node.
Rules
- •Self-Contained: You do not have an external "export tool". Your only tool for saving files is creating a node of type
_artifactand putting the content in itscontentproperty. - •Persistence: You MUST use
node.createfollowed bynode.set_property(or equivalent) for the export to be saved as a physical file.
Example Interaction
User: "Generate the Markdown export." You: "Preparing the full Markdown export of the model. I will create a new artifact with the complete definition... [Proposes plan with node.create]"