Community Detection logo

Community Detection

Community
MattArtzAnthro
community-detection

Detect, validate, visualize, and explain communities in the loaded Gephi graph using Louvain or an installed Leiden statistic. Use for community detection, modularity, cluster coloring, or resolution comparisons.

Overview

PublisherMattArtzAnthro
Repositorygephi-ai
Skill namecommunity-detection
Stars
26
Forks
6
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by MattArtzAnthro on GitHub. Read the source before you install it.

Installation

Install the Community Detection AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/MattArtzAnthro/gephi-ai/tree/main/plugins/gephi-network-analysis/skills/community-detection
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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/community-detection .claude/skills/community-detection
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Community Detection in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Community Detection on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Community Detection is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Community Detection Workflow

Run a complete community detection and visualization workflow on the current Gephi graph.

Follow the gephi skill's rules throughout; this workflow repeats only the ones it is most likely to break. Read ../gephi/references/statistics-guide.md before interpreting modularity, and ../gephi/references/layout-guide.md before the layout step.

Tell the user what you are doing at each step. Narrate briefly before each tool call.

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.
  • Stability. Run gephi_community_stability before naming, captioning, or colouring by groups, and say how stable they are.
  • Palette. On a light background, leave colors unset: the plugin gives the largest group the first of eight colours validated for readability, the next largest the second, and so on, in an order that keeps the five largest groups distinguishable wherever they touch, even for colour-blind readers; past five groups, label the groups as well. On a dark background, pass the dark-surface palette. Colour must never be the only way to tell groups apart: label the largest nodes or the groups.

Steps

  1. Session start: Call gephi_health_check. If it fails, tell the user to start Gephi and stop. Call gephi_list_workspaces and gephi_get_project_info, and tell the user the node and edge counts. If filter_active is true, say that communities will be found in the visible nodes only.

  2. Ask which method (skip if the request names one or the user already said). One question, with the trade-off stated plainly. Default: Louvain at resolution 1.0.

    • Louvain (Gephi's built-in Modularity; Blondel et al. 2008): maximizes modularity by greedy local moves. Fast and familiar; the default.
    • Leiden (Traag, Waltman, and van Eck 2019): the same objective with a refinement step that guarantees every community is internally connected and converges more reliably. Its partitions can be more uneven in size. Requires the CWTS Leiden plugin in Gephi; check gephi_list_statistics for "Leiden algorithm" before offering it as available.
    • Stochastic block model inference (Peixoto 2019): fits a generative model of the edges and selects the partition that best explains them, with model selection that returns a single block when the data support no structure. Modularity maximization has no such check and returns a partition for any graph, including a random one. SBM inference is not implemented in Gephi; if the user wants it, say so and point to graph-tool (minimize_blockmodel_dl) outside this workflow.

    Frame the choice as: modularity maximization gives a partition that describes how the observed edges cluster; SBM inference tests whether a block structure is supported at all. Cite the papers in the caption when the map is publication-bound.

  3. Compute communities:

    • Louvain: call gephi_compute_modularity with the requested resolution (default 1.0). Gephi's resolution runs opposite to the gamma convention in most papers: raising it merges communities.
    • Leiden: call gephi_run_statistic with name="Leiden algorithm" and params={"algorithm": "Leiden", "qualityFunction": "Modularity", "resolution": <resolution>}; the result column is what the plugin reports (check gephi_get_columns and use that name in step 5). Tell the user: "Running community detection..." then report the number of communities. Do not call the partition strong or weak from the modularity score: random graphs with the same degrees score 0.3 to 0.6.

    Check that the communities hold up: call gephi_community_stability (Louvain only; 20 runs). Tell the user in plain words how often accounts grouped together stay together (mean_stability) and how many stable cores there are. If consensus_warning appears, say the communities are loose and color by stable_core in step 5 instead of the single run.

  4. Compute degree: Call gephi_compute_degree. Tell the user: "Computing degree distribution..."

  5. Color by community: Call gephi_color_by_partition with the community column ("modularity_class" for Louvain, stable_core when the stability check warned, the Leiden plugin's column otherwise). Leave colors unset on a light background (see the palette rule); past eight groups the reply carries a palette_note, which the report repeats.

  6. Size by degree: Call gephi_size_by_ranking with column "degree" and the default sizes (about one to ten on screen).

  7. Layout: Tell the user: "Running ForceAtlas 2 layout..." Call gephi_run_layout with algorithm "ForceAtlas 2" in two passes with sync: true: first 1500 iterations with properties {"linLogMode": false, "scalingRatio": 10, "strongGravityMode": true, "gravity": 0.01, "barnesHutOptimization": true}, then 3000 iterations with {"linLogMode": true, "scalingRatio": 0.5, "strongGravityMode": true, "gravity": 0.001, "barnesHutOptimization": true} (see the layout guide). Leave Dissuade Hubs off.

  8. Report results: Summarize the communities found, their sizes (gephi_column_value_frequencies on the community column counts members per community), and how well they held up across runs. Give the modularity score only with its context, never as a verdict. Name only communities that are stable cores. When the person has a known grouping as a column (factions, departments, sites), call gephi_compare_partitions with the community column against it and report which known value each community mostly holds, with the agreement scores. End with "Choices I made" only for choices that changed the result.

Frequently asked questions

What does the Community Detection AI skill do?

Detect, validate, visualize, and explain communities in the loaded Gephi graph using Louvain or an installed Leiden statistic. Use for community detection, modularity, cluster coloring, or resolution comparisons.

Why use Community Detection on TypingMind?

Because you install it once and use it with any model. Community Detection is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Community Detection in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/MattArtzAnthro/gephi-ai/tree/main/plugins/gephi-network-analysis/skills/community-detection. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Community Detection?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Community Detection?

As many as you like. As long as a model supports skills, you can use Community Detection with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Community Detection AI skill free?

Yes. It is published on GitHub by MattArtzAnthro under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇