graph-analysis

A tool for mapping relationships between X/Twitter accounts as a network graph. It can reveal clusters, influential accounts, and bridge accounts that connect otherwise separate groups.

In plain words
What is it for?
Use it to build a graph from an account's followers or followers of followers, rank influential accounts, find connecting accounts, detect communities, visualize the network, and export the results.
Why use it?
Follower lists are difficult to understand as a whole. A graph makes audience structure and connections easier to inspect and compare.

Skill for Claude CodeCodex

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 skills/nirholas/xactions/graph-analysis
Any agent
npx skills add nirholas/XActions --skill graph-analysis
Clone the repo
git clone --depth 1 https://github.com/nirholas/XActions

Made for: Claude Code, Codex.

Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 619 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 $0.00043 $0.00619
Opus 5 $0.00022 $0.00309
Sonnet 5 $0.00009 $0.00124
Haiku 4.5 $0.00004 $0.00062

Measured 2d ago against content hash bb4001f55f35, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

graph-analysis 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 2d 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.

skills/graph-analysis/SKILL.md · 83 lines

How it starts

The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Graph Analysis

API-powered network graph analysis for X/Twitter follower relationships.

Entry Points

Goal Route Method
Build a network graph POST /api/graph/build REST API
Get graph data GET /api/graph/:id REST API
Run graph algorithms POST /api/graph/:id/analyze REST API
Export graph GET /api/graph/:id/export REST API
Visualize graph GET /api/graph/:id/visualize REST API

API Usage

Build a network graph

POST /api/graph/build
Authorization: Bearer <token>
Content-Type: application/json

{
  "username": "nichxbt",
  "depth": 1,          // 1 = direct followers, 2 = followers of followers
  "maxNodes": 500      // Limit graph size
}

Run graph algorithms

POST /api/graph/:id/analyze
Authorization: Bearer <token>
Content-Type: application/json

{
  "algorithm": "pagerank"  // "pagerank" | "betweenness" | "community" | "influencers"
}

Available Algorithms

Algorithm Description
pagerank Rank nodes by influence (like Google's PageRank)
betweenness Find bridge accounts connecting different clusters
community Detect communities/clusters within the network
influencers Identify top influencers by degree centrality

Use Cases

Goal Approach
Find bridge accounts for cross-audience reach algorithm: "betweenness"
Identify communities in your follower base algorithm: "community"
Find most influential followers algorithm: "influencers"
Rank followers by network influence algorithm: "pagerank"

Notes

  • Graph building is async and may take several minutes for large networks
  • depth: 2 creates much larger graphs — use maxNodes to limit
  • Export formats: JSON (node/edge list), GraphML, CSV
  • Visualization returns an interactive D3.js-powered HTML page
  • analytics-insights — Analyze your own engagement metrics
  • audience-demographics — Understand follower demographics
  • competitor-intelligence — Analyze competitor audiences
  • crm-management — Manage individual relationships within the graph

Read the full file on GitHub · 83 lines

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. 2d ago First seen · 83 lines · 43 tokens per session scan A bb4001f55f35

Subscribe to this mod's changes

graph-analysis is a skill published in the GitHub repository nirholas/XActions (496 stars, last pushed 5d ago), licensed Apache-2.0. It adds 43 tokens to every session and 619 once invoked, about $0.0002 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.