Logo di Diagent

Diagent

Community
daniellee-ux
diagent

Generate or decode Diagent diagram URLs via the `diagent` CLI. TRIGGER on: (1) any request to visualize, draw, chart, diagram, sketch, graph, map, or plot — flowcharts, state machines, sequence diagrams, architecture, pipelines, CI/CD, workflows, decision trees, dependency graphs, class hierarchies, data flow, control flow, request flow, user journeys, ERDs, org charts, swimlanes, mind maps, or any structural/process visualization; (2) any pasted `diagent.dev/d/...` or `diagent.dev/?code=...` URL — decode it to read the underlying Mermaid.

Panoramica

Autoredaniellee-ux
Repositorydiagent-cli
Nome della skilldiagent
Stelle
40
Fork
3
File inclusi
6
LicenzaAGPL-3.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 6 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da daniellee-ux su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Diagent in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/daniellee-ux/diagent-cli/tree/main
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/daniellee-ux/diagent-cli.git \
  .claude/skills/diagent
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Diagent in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Diagent non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Diagent non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Diagent CLI

The npx -y @diagent/cli command produces editable Diagent diagram URLs. Use it whenever a diagram would clarify what you're explaining or modifying. Prefer it over pasting raw Mermaid code fences — the user can tweak the diagram visually in their browser and hand the result back as a URL.

When to invoke this skill

Use npx -y @diagent/cli when the user asks to:

  • Visualize, draw, chart, diagram, sketch, plot, or graph anything
  • Explain control flow, data flow, request flow, or state transitions
  • Show architecture, deploy pipelines, dependency graphs, or class hierarchies
  • Map a workflow, decision tree, or sequence of operations
  • Document a user journey, happy path, or error path

Keywords that should trigger this skill: flowchart, diagram, state machine, sequence, architecture, pipeline, workflow, decision tree, visualize, draw, chart, graph, map, sketch, flow.

Also trigger if the user pastes a https://diagent.dev/d/... or https://diagent.dev/?code=... URL — they want you to decode it and read the underlying Mermaid.

Encode — share a diagram with the user

Pipe Mermaid source into npx -y @diagent/cli encode:

bash
echo 'flowchart TD
    A[User request] --> B{Authenticated?}
    B -->|No| C[Return 401]
    B -->|Yes| D[Check rate limit]
    D --> E{Under quota?}
    E -->|No| F[Return 429]
    E -->|Yes| G[Handle request]' | npx -y @diagent/cli encode --open

Output is a short URL like https://diagent.dev/d/kwtsgx5o24.

Always show both the Mermaid source AND the URL. Present the Mermaid in a mermaid code fence first, then the link on its own line below. This way the diagram source is visible in the conversation/document even without clicking the link. Example output format:

```mermaid
flowchart TD
    A[User request] --> B{Authenticated?}
    B -->|No| C[Return 401]
    B -->|Yes| D[Handle request]
```

[Open in Diagent](https://diagent.dev/d/kwtsgx5o24)

The user can open the link, edit visually (add/move/rename/re-shape nodes, re-layout, add subgraphs), and their edits auto-save to the same URL 2 seconds after they stop editing.

You can re-read the same URL later to see what they changed — no paste-back required. The recommended flow is:

  1. You npx -y @diagent/cli encode → share URL A in chat.
  2. User opens A, edits visually. Edits auto-save to A.
  3. When the user says "I'm done" or "take a look", you run npx -y @diagent/cli decode A again (the same URL) — you'll get the latest edited Mermaid.

If the user says they pasted a new URL, always prefer that newer URL, but the mutable-URL flow means they usually won't need to.

For larger diagrams, write to a file first:

bash
cat > /tmp/flow.mmd <<'EOF'
flowchart LR
    subgraph frontend
        A[React app] --> B[tRPC client]
    end
    subgraph backend
        C[tRPC server] --> D[Postgres]
        C --> E[Redis]
    end
    B --> C
EOF
npx -y @diagent/cli encode /tmp/flow.mmd --open

Decode — read the user's edits

npx -y @diagent/cli decode handles both short URLs and inline URLs transparently:

bash
# Short URL (default Copy Link format)
npx -y @diagent/cli decode "https://diagent.dev/d/kwtsgx5o24"

# Inline URL (older or --inline output)
npx -y @diagent/cli decode "https://diagent.dev/?code=GYGw9g7gxg..."

# From stdin — avoids shell-quoting pain
echo "$URL" | npx -y @diagent/cli decode -

Output is the Mermaid source, ready to paste back into code or commentary.

Authoring tips

  • Use short node IDs (A, B, C, or auth, db, api). Mermaid requires IDs, and they keep URLs compact. Put the descriptive text in the quoted label: A["User clicks login"], not UserClicksLogin.
  • Do NOT trim the diagram to fit URL length. The backend supports up to ~64KB of Mermaid source and always returns a short URL of constant size. If a diagram is worth showing in full, show it in full.
  • GUI-editable types: nearly every Mermaid type Diagent supports opens in a no-syntax-required visual editor, and all edits auto-save to the same URL:
    • Flowcharts and state diagrams (stateDiagram-v2) open as an interactive canvas — drag, rename, connect, group/composite.
    • Sequence, class, ER, requirement, gantt, journey, timeline, pie, mindmap, git graph, C4, and block open as a structured form editor (tables, ordered lists, and outlines) with a live preview; edits serialize back to Mermaid.
    • Only quadrantChart still renders read-only ("Edit Code"). Because edits round-trip to Mermaid text on the same short URL, you can re-decode any of these later to read what the user changed.
  • All flowchart syntax is supported: subgraphs, edge labels, styles, six node shapes (rectangle, rounded, diamond, circle, stadium, parallelogram), directions TD/LR/BT/RL.
  • State diagrams support [*] start/end, composite states (state X { ... }), <<choice>>/<<fork>>/<<join>>, transition labels, per-composite direction, and notes. (Concurrent -- regions render but fall back to read-only.)
  • Prefer flowchart over graph — flowchart is the modern syntax.
  • Escape special characters in labels by wrapping in quotes: A["user@example.com"], not A[user@example.com].

Exit codes

CodeMeaning
0Success
1Runtime error (empty input, invalid URL, backend failure, decode failure)
2Usage error (unknown subcommand, missing argument)

Environment

  • DIAGENT_BASE_URL — override backend URL (default: https://diagent.dev/). Useful for pointing at http://localhost:5173/ when Diagent is running in local dev.

Install

The skill uses npx -y @diagent/cli which auto-downloads the CLI on first run. No manual install is needed. To install globally for faster repeated invocations:

bash
npm install -g @diagent/cli

Run npx -y @diagent/cli install-skill to enable the skill in every Claude Code project.

Full help

Run npx -y @diagent/cli --help, npx -y @diagent/cli encode --help, or npx -y @diagent/cli decode --help for exhaustive documentation.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Diagent?

Generate or decode Diagent diagram URLs via the `diagent` CLI. TRIGGER on: (1) any request to visualize, draw, chart, diagram, sketch, graph, map, or plot — flowcharts, state machines, sequence diagrams, architecture, pipelines, CI/CD, workflows, decision trees, dependency graphs, class hierarchies, data flow, control flow, request flow, user journeys, ERDs, org charts, swimlanes, mind maps, or any structural/process visualization; (2) any pasted `diagent.dev/d/...` or `diagent.dev/?code=...` URL — decode it to read the underlying Mermaid.

Perché usare Diagent su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Diagent è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Diagent in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/daniellee-ux/diagent-cli/tree/main. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Diagent?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Diagent?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Diagent: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Diagent è gratuita?

Sì. È pubblicata su GitHub da daniellee-ux con licenza AGPL-3.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇