Logo von Counterfactual Analysis

Counterfactual Analysis

Community
MattArtzAnthro
counterfactual-analysis

Test a hypothetical edit against the loaded Gephi graph without changing the real workspace. Use for what-if questions such as removing hubs, adding ties, deleting ties, or comparing structural resilience.

Übersicht

HerausgeberMattArtzAnthro
Repositorygephi-ai
Skill-Namecounterfactual-analysis
Sterne
26
Forks
6
Mitgelieferte Dateien
Nur Anweisungen
LizenzApache-2.0
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 MattArtzAnthro auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Counterfactual Analysis 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. Dabei liest die App 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/MattArtzAnthro/gephi-ai/tree/main/plugins/gephi-network-analysis/skills/counterfactual-analysis
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Ü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 unterstützt, 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/MattArtzAnthro/gephi-ai.git /tmp/gephi-ai
mkdir -p .claude/skills
cp -r /tmp/gephi-ai/plugins/gephi-network-analysis/skills/counterfactual-analysis .claude/skills/counterfactual-analysis
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Counterfactual Analysis 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 Counterfactual Analysis 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 Counterfactual Analysis 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-Schlüsseln.

  • 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.

Counterfactual test

Answer the user's what-if question by running it as a real measurement against the graph currently loaded in Gephi, using gephi_whatif. It duplicates the current workspace, applies the edit to the copy, compares the structural profile before and after, then deletes the copy. The real graph is never touched, so this is safe to run repeatedly.

Follow the gephi skill's rules throughout; this workflow repeats only the ones it is most likely to break. Read ../gephi/references/claim-verification.md for removal tests and their comparison node.

Rules this workflow must keep

  • Asking. When a step says to ask, ask once. If the person cannot answer, is away, or asked for a finished product, use the default named in that step and remove or overwrite nothing. At the end, give one short line for each choice that changed the result, under "Choices I made"; leave the section out when every step used its obvious default. If there is no input to work on, stop and say what is needed.
  • Session start. Start with gephi_health_check. Then check which workspace is open (gephi_list_workspaces) and whether a filter is active (filter_active in replies): a filter from an earlier conversation stays on, and exports and checks then see only what it shows.
  • Ranking. To rank nodes on a metric, call gephi_query_nodes with sort_by set to the metric, columns set to the few columns you need, and limit about 10: nodes are ordered before paging, so the first page is the top of the whole graph. Without columns, every attribute of every node comes back and a long listing can overflow.

Steps

  1. Session start: gephi_health_check. If it fails, tell the user to start Gephi and stop. Call gephi_list_workspaces; if filter_active is true, say the test runs on the visible nodes only.

  2. Get the question. If the request does not specify an edit, ask what edit they want to test (one sentence is enough: "what if we removed the top hub?", "what if these two accounts stopped talking?"). Default: remove the single highest-degree node.

  3. Resolve the edit. Turn the plain-language question into gephi_whatif's edit list ({"op": "remove_node", "id": ...}, remove_nodes, add_edge, remove_edge). If the person names nodes by label rather than id ("the top hub", "Alice"), resolve the id first: gephi_query_nodes with column and value or contains for a name, or with the ranking rule for "top hub" (gephi_compute_degree first if the degree column is missing). If the name matches more than one node, ask which one. Default: the match with the highest degree, named in the report.

  4. Run gephi_whatif with the resolved edits. Only pass include_slow: true (which also compares average path length and diameter) if the graph is roughly under 3,000 nodes, the same cost gate as gephi_profile_graph.

  5. Report the difference, not a verdict. gephi_whatif returns measurements, and the framing matters:

    • Lead with the numbers that changed and by how much (components, giant-component share, density, modularity, isolates, path length if computed).
    • This is a hypothesis test, not a conclusion. Say what the change does and does not support, and note the caution that applies to any single sample: a counterfactual on a small or skewed graph, or a single removed node standing in for a whole category, can mislead.
    • Offer a rival reading where one exists (for example, "components jumped because this specific hub is also a cut vertex, not because hubs in general hold the network together. Should I test a second one to check?").
    • Add "Choices I made" only for choices that changed the result.
  6. Remind them nothing changed. The scratch copy is already deleted and they are back on their real graph. If they want to make the edit for real, point them at the direct tool (gephi_remove_node, gephi_add_edge, and so on), which gephi_snapshot and gephi_undo protect.

Häufig gestellte Fragen

Was macht der KI-Skill Counterfactual Analysis?

Test a hypothetical edit against the loaded Gephi graph without changing the real workspace. Use for what-if questions such as removing hubs, adding ties, deleting ties, or comparing structural resilience.

Warum Counterfactual Analysis in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Counterfactual Analysis 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 Counterfactual Analysis in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/MattArtzAnthro/gephi-ai/tree/main/plugins/gephi-network-analysis/skills/counterfactual-analysis 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 Counterfactual Analysis nutzen?

Jedes Modell, das Sie mit 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 Counterfactual Analysis verwenden?

So viele Sie möchten. In TypingMind können Sie Counterfactual Analysis mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Counterfactual Analysis kostenlos?

Ja. Der Skill wird von MattArtzAnthro auf GitHub unter der Lizenz Apache-2.0 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: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. 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 kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

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