Algo Net Centrality logo

Algo Net Centrality

Organization
asgard-ai-platform
algo-net-centrality

Calculate network centrality metrics to identify important nodes in graphs. Use this skill when the user needs to find key influencers, critical infrastructure nodes, or central actors in a network — even if they say 'who is most important in this network', 'key nodes', or 'network influence measurement'.

Overview

Publisherasgard-ai-platform
Repositoryskills
Skill namealgo-net-centrality
Stars
236
Forks
29
Bundled files
3
LicenseMIT
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.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by asgard-ai-platform on GitHub. Read the source before you install it.

Installation

Install the Algo Net Centrality 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.
  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/asgard-ai-platform/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/algo-net-centrality .claude/skills/algo-net-centrality
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Algo Net Centrality 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 Algo Net Centrality 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 Algo Net Centrality 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.

Network Centrality Metrics

Overview

Centrality measures quantify node importance in a network. Four classical metrics: degree (connections), betweenness (bridge role), closeness (proximity), eigenvector (connection quality). Each captures a different aspect of importance. Complexity ranges from O(V+E) for degree to O(V×E) for betweenness.

When to Use

Trigger conditions:

  • Identifying key influencers or critical nodes in social/organizational networks
  • Analyzing network vulnerabilities (which node failure causes most damage)
  • Comparing node importance across different dimensions

When NOT to use:

  • For group/community detection (use community detection algorithms)
  • For information spread modeling (use epidemic models)

Algorithm

IRON LAW: Different Centrality Metrics Answer DIFFERENT Questions
- Degree: Who has the most connections? (popularity)
- Betweenness: Who bridges communities? (brokerage)
- Closeness: Who can reach everyone fastest? (efficiency)
- Eigenvector: Who is connected to important people? (prestige)
Using the WRONG metric answers the WRONG question. Choose based on
what "important" means in your context.

Phase 1: Input Validation

Build network graph from edge list or adjacency matrix. Determine: directed vs undirected, weighted vs unweighted, connected vs disconnected. Gate: Graph is well-formed, largest connected component identified.

Phase 2: Core Algorithm

  1. Degree centrality: C_D(v) = deg(v) / (N-1). O(V+E).
  2. Betweenness centrality: C_B(v) = Σ(σ_st(v) / σ_st) for all s,t pairs. Fraction of shortest paths through v. O(V×E).
  3. Closeness centrality: C_C(v) = (N-1) / Σd(v,u). Inverse of average shortest path. O(V×(V+E)).
  4. Eigenvector centrality: Score proportional to sum of neighbors' scores. Power iteration until convergence. O(k×E).

Phase 3: Verification

Check: centrality values normalized [0,1]. Top nodes by each metric may differ — this is expected and informative. Sanity check top-5 against domain knowledge. Gate: All metrics computed, top nodes make intuitive sense.

Phase 4: Output

Return centrality scores with multi-metric comparison.

Output Format

json
{
  "centralities": [{"node": "Alice", "degree": 0.85, "betweenness": 0.42, "closeness": 0.71, "eigenvector": 0.90}],
  "metadata": {"nodes": 500, "edges": 2000, "directed": false, "connected_components": 1}
}

Examples

Sample I/O

Input: 5-node undirected graph (bridge topology): edges = {(A,B), (A,C), (B,C), (C,D), (D,E)}

    A --- B
     \  /
      C
      |
      D --- E

Expected centralities (normalized by N-1 = 4):

NodeDegreeBetweennessClosenessEigenvector
A0.50 (2/4)0.0000.571 (4/7)0.452
B0.50 (2/4)0.0000.571 (4/7)0.452
C0.75 (3/4)0.6670.800 (4/5)0.628
D0.50 (2/4)0.5000.667 (4/6)0.386
E0.25 (1/4)0.0000.500 (4/8)0.201

Verify: C is the bridge — highest in ALL four metrics. E is the periphery — lowest in all metrics. A and B are symmetric (identical scores). D has nonzero betweenness (bridges C to E) but lower degree than C.

Edge Cases

InputExpectedWhy
Star graphCenter has max all centralitiesHub dominates in all metrics
Disconnected graphCloseness undefined for disconnected pairsUse harmonic centrality instead
Directed graphIn-degree ≠ out-degree centralityPopularity (in) vs activity (out)

Gotchas

  • Disconnected graphs: Closeness centrality is undefined when nodes can't reach each other. Use harmonic centrality: C_H(v) = Σ(1/d(v,u)) as an alternative.
  • Scale dependence: Raw centrality values depend on network size. Use normalized versions for cross-network comparison.
  • Betweenness is expensive: O(V×E) makes it impractical for very large networks (millions of nodes). Use approximation algorithms (random sampling of shortest paths).
  • Dynamic networks: Centrality in a snapshot may not reflect influence over time. Temporal centrality metrics exist but are more complex.
  • Correlation between metrics: In many real networks, centrality metrics are correlated. But the DIFFERENCES are often the most informative (high degree but low betweenness = local hub, not broker).

References

  • For centrality metric comparison framework, see references/metric-comparison.md
  • For approximate betweenness algorithms, see references/approximate-betweenness.md

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Algo Net Centrality AI skill do?

Calculate network centrality metrics to identify important nodes in graphs. Use this skill when the user needs to find key influencers, critical infrastructure nodes, or central actors in a network — even if they say 'who is most important in this network', 'key nodes', or 'network influence measurement'.

Why use Algo Net Centrality on TypingMind?

Because you install it once and use it with any model. Algo Net Centrality 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 Algo Net Centrality in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/asgard-ai-platform/skills/tree/main/algo-net-centrality. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Algo Net Centrality?

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 Algo Net Centrality?

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

Is the Algo Net Centrality AI skill free?

Yes. It is published on GitHub by asgard-ai-platform under the MIT 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 👇