algo-net-centrality

Solid

"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'.".

AI & Automation 22 stars 8 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
45
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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(...

Details

Author
charlieviettq
Repository
charlieviettq/awesome-agent-skill
Created
2 months ago
Last Updated
6 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

networkx

Build, analyze, and visualize networks and graphs using NetworkX (Python). Use this skill whenever the user wants to: create graphs or networks, analyze graph properties, compute centrality measures, find shortest paths, detect communities, run graph algorithms, convert graphs to/from matrices or dataframes, visualize networks with matplotlib, import/export graph files (GML, GraphML, GEXF, edgelist, etc.), work with directed or undirected graphs, weighted or multigraphs, perform social network analysis, or do any graph theory computation. Trigger on keywords: networkx, graph, network, nodes, edges, adjacency, shortest path, centrality, community detection, spanning tree, flow, clique, PageRank, bipartite, DAG, topology, graph analysis, social network.

58 Updated 2 days ago
SenolIsci
AI & Automation Solid

algo-net-community

"Implement Louvain community detection to discover densely connected groups in networks. Use this skill when the user needs to find communities or clusters in social/organizational networks, segment customers by interaction patterns, or analyze network modular structure — even if they say 'find groups in this network', 'community detection', or 'network clustering'.".

22 Updated 6 days ago
charlieviettq
AI & Automation Solid

algo-net-influence

"Solve the influence maximization problem to select optimal seed nodes for maximum information spread. Use this skill when the user needs to choose seed users for viral campaigns, maximize network reach under a budget constraint, or compare seeding strategies — even if they say 'who should we seed first', 'maximize viral reach', or 'optimal influencer selection'.".

22 Updated 6 days ago
charlieviettq