# Graph Analysis

> Analyze follower/following network graphs — find clusters, influencers, bridges, and audience segments using graph algorithms. Use when users want to understand the network structure of their X audience or competitor's audience.

- Skill: `nirholas/graph-analysis` (Agent Skill)
- Install (CLI): `npx skillmds@latest add nirholas/graph-analysis`
- Raw SKILL.md: https://api.skillmd.com/api/skills/nirholas/graph-analysis/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: Apache-2.0
- Author: nirholas (https://skillmd.com/u/nirholas)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/nirholas/graph-analysis

---


# 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

```bash
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

```bash
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

## Related Skills

- **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

