Logo von Workflows

Workflows

Organisation
rejot-dev
workflows

Orchestrate durable multi-step work with defineWorkflow and operate workflow instances. Use when a current task needs retries, sleeps, waiting for an external event, or the user asks to inspect, signal, or retry a workflow instance.

Übersicht

Herausgeberrejot-dev
Repositoryfragno
Skill-Nameworkflows
Sterne
62
Forks
6
Mitgelieferte Dateien
Nur Anweisungen
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von rejot-dev auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Workflows in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/rejot-dev/fragno/tree/main/apps/backoffice/content/static/skills/workflows
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rejot-dev/fragno.git /tmp/fragno
mkdir -p .claude/skills
cp -r /tmp/fragno/apps/backoffice/content/static/skills/workflows .claude/skills/workflows
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Workflows in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Workflows automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Workflows nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Workflows

Use defineWorkflow for work that must survive retries, time, or an external continuation.

Authoring a workflow

  1. Preflight. Apply the system guidance's closed-world preflight before calling defineWorkflow. The workflow authoring declarations are already present in the system reference; read the provider declarations selected by that gate.

    Complete when the closed-world preflight passes. When it cannot pass, complete this branch by reporting the blocking requirement.

  2. Author. Define the workflow directly at the top level. Inline definitions automatically start; retain the returned instanceId. Save a workflow file only when the user asks for persistent automation behavior; use the Building Automations skill for that branch.

    js
    defineWorkflow({ name: "approval-workflow" }, async (event, step) => {
      const request = await step.do("prepare-request", async () => {
        return { requestId: crypto.randomUUID() };
      });
    
      const approval = await step.waitForEvent("approval", {
        type: "approval",
        timeout: "15 minutes",
      });
    
      return { request, approval: approval.payload };
    });

    Put side effects, provider calls, and expensive work inside step.do. Keep pure deterministic calculations outside steps. Use stable, descriptive step names because history and retries address those names. Use step.sleep or step.sleepUntil for time and step.waitForEvent for external continuation.

    Complete when every non-deterministic operation has a durable step and every continuation has an exact event type.

  3. Observe. Copy the returned instanceId; code-mode calls do not share in-memory variables. Read the run with workflow.getInstance({ instanceId }). Inspect output for a completed run, confirm the authored event type for a waiting run, and read workflow.getHistory({ instanceId }) when diagnosing an errored run. If instance details are temporarily unavailable, call workflow.listInstances({}) once as a status fallback and report the backend failure beside the observed summary.

    Complete when the instance is complete with observed output, intentionally waiting with its exact continuation, or errored with the failed step and error identified.

Prompting an agent

When a workflow needs model work, use step.agent.prompt(name, input). One workflow instance owns one continuing agent session, so later prompts include the earlier prompt, tool-call, and tool-result history. Give every prompt a stable name.

Workflow agents inherit no tools from the authoring Pi session. Define each capability locally with defineTool and pass the complete tool set to that prompt. Prefer a tool result when the workflow needs structured data:

js
const classify = defineTool({
  name: "classify",
  description: "Return the harmfulness classification.",
  parameters: {
    type: "object",
    additionalProperties: false,
    required: ["classification", "confidence", "reason"],
    properties: {
      classification: { enum: ["harmful", "not harmful", "uncertain"] },
      confidence: { enum: ["low", "medium", "high"] },
      reason: { type: "string", maxLength: 1000 },
    },
  },
  execute: async (_toolCallId, result) => result,
});

const response = await step.agent.prompt("classify-text", {
  text: `Classify this text:\n\n${text}`,
  tools: [classify],
});
const classificationResults = response.toolResults.filter(
  ({ toolName }) => toolName === "classify",
);
if (classificationResults.length !== 1) {
  throw new Error("Expected exactly one classify tool result.");
}
const classification = classificationResults[0].result;

Tool execution is part of the prompt step and can repeat when an attempt fails before commit. Keep tools pure and replay-safe. Put external effects in separate step.do calls with stable idempotency keys. Before branching, confirm that the expected tool ran. When execute returns the validated tool arguments, use the result properties directly instead of repeating the JSON Schema validation.

Operating an existing workflow

Read "/static/codemode/providers/workflow.d.ts" for exact inputs:

  • workflow.createInstance({ path, instanceId, payload }) starts a saved .workflow.js file. Supply a stable instanceId and copy it for later calls. Inline defineWorkflow runs do not need this call.
  • workflow.listInstances({ status, pageSize, cursor }) lists codemode workflow instances.
  • workflow.getInstance({ instanceId }) reads status, output, error, and source path.
  • workflow.getHistory({ instanceId }) exposes steps, events, and emissions for diagnosis.
  • workflow.sendEvent({ instanceId, type, payload }) resumes a waiting instance.
  • workflow.retryFailedStep({ instanceId, delayMs }) retries the latest failed top-level step.

For a waiting instance, send the exact event type expected by step.waitForEvent. Failed-step retry requires the latest top-level step to be the only failed top-level step. Retrying a do step reruns all of its nested steps, including completed steps, so their effects and mutations must be repeatable. Retrying a failed event wait starts a fresh timeout window and considers pending events before the new deadline.

Häufig gestellte Fragen

Was macht der KI-Skill Workflows?

Orchestrate durable multi-step work with defineWorkflow and operate workflow instances. Use when a current task needs retries, sleeps, waiting for an external event, or the user asks to inspect, signal, or retry a workflow instance.

Warum Workflows in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Workflows besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Workflows in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/rejot-dev/fragno/tree/main/apps/backoffice/content/static/skills/workflows ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Workflows nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Workflows verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Workflows damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Workflows kostenlos?

Ja. Der Skill wird von rejot-dev auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇