centrality

centrality is a command for coding agents from MattArtzAnthro/gephi-ai. It costs 10 tokens per session (526 once invoked), scanned A, original, Apache-2.0.

A Gephi analysis command that measures different kinds of importance in a network. Gephi is an application for exploring networks of connected items, called nodes.

In plain words
What is it for?
Use it to find highly connected hubs, bridges between groups, influential nodes, and nodes that rank highly across multiple measures.
Why use it?
It replaces a general impression of who matters most with several defined measurements.

Command

Part of the gephi-network-analysis plugin — 1 skill, 11 commands, 4 agents, 1 hook, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mattartzanthro/gephi-ai/centrality
Clone the repo
git clone --depth 1 https://github.com/MattArtzAnthro/gephi-ai

Or install gephi-network-analysis, the plugin that ships this one along with the rest of its 1 skill, 11 commands, 4 agents, 1 hook, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for centrality

README.md
[![agentmods](https://agentmods.dev/badge/commands/mattartzanthro/gephi-ai/centrality.svg)](https://agentmods.dev/commands/mattartzanthro/gephi-ai/centrality)
Your own site
<a href="https://agentmods.dev/commands/mattartzanthro/gephi-ai/centrality"><img src="https://agentmods.dev/badge/commands/mattartzanthro/gephi-ai/centrality.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 526 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00010 $0.00526
Opus 5 $0.00005 $0.00263
Sonnet 5 $0.00002 $0.00105
Haiku 4.5 $0.00001 $0.00053

Measured 5d ago against content hash f04f5ef28535, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

centrality scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/claude-code/commands/centrality.md · 43 lines

What it actually says

Centrality Analysis Workflow

Run comprehensive centrality analysis to identify the most important and influential nodes in the graph.

Tell the user what you're doing at each step — narrate briefly before each tool call.

Steps

  1. Health check: Call gephi_health_check. If it fails, tell the user to start Gephi and stop.

  2. Graph info: Call gephi_get_project_info to get node/edge counts and graph type.

  3. Compute all centrality metrics:

    • Call gephi_compute_degree for degree distribution
    • Call gephi_compute_betweenness for betweenness centrality, closeness, and eccentricity
    • Call gephi_compute_pagerank for PageRank importance
    • Call gephi_compute_eigenvector for eigenvector centrality
  4. Query top nodes: Call gephi_query_nodes with limit 100 to retrieve node data. Sort and identify:

    • Top 10 by degree (hubs)
    • Top 10 by betweenness centrality (bridges)
    • Top 10 by PageRank (importance)
    • Nodes that appear in multiple top-10 lists (key actors)
  5. Visualize by betweenness: Call gephi_color_by_ranking with:

    • column: "betweenesscentrality"
    • Light blue to dark red gradient: r_min: 200, g_min: 220, b_min: 255, r_max: 180, g_max: 0, b_max: 0
  6. Size by PageRank: Call gephi_size_by_ranking with column "pageranks", min_size: 3, max_size: 30.

  7. Layout: Tell the user: "Running ForceAtlas 2 layout..." Call gephi_run_layout with algorithm "ForceAtlas 2", 1000 iterations.

  8. Report: Present a ranked table of key nodes with their centrality scores. Highlight:

    • Hubs: High degree nodes
    • Bridges: High betweenness, low degree (connecting different communities)
    • Authorities: High PageRank / eigenvector centrality
    • Vulnerabilities: Nodes whose removal would fragment the network
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 43 lines · 10 tokens per session scan A f04f5ef28535

Subscribe to this mod's changes

centrality is a command published in the GitHub repository MattArtzAnthro/gephi-ai (21 stars, last pushed 4d ago), licensed Apache-2.0. It adds 10 tokens to every session and 526 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.