r-network

r-network is a skill for Claude Code, Codex from LeoLin990405/r-analytics-skill. It costs 24 tokens per session (1,123 once invoked), scanned A, original, MIT.

An R toolkit for studying networks, where items such as people or websites are connected by relationships. It covers graph analysis, social networks, community detection, and network visualisation.

In plain words
What is it for?
Use it to analyse relationship data, measure centrality and communities, model or compare networks, and create static, interactive, or time-based network charts.
Why use it?
It provides common methods for finding important nodes, groups, connections, and changes over time without building those calculations from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to analyse relationship data, measure centrality and communities, model or compare networks, and create static, interactive, or time-based network charts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leolin990405/r-analytics-skill/r-network
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.

Any agent
npx skills add LeoLin990405/r-analytics-skill --skill r-network
Clone the repo
git clone --depth 1 https://github.com/LeoLin990405/r-analytics-skill

Made for: Claude Code, Codex.

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 r-network

README.md
[![agentmods](https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/r-network.svg)](https://agentmods.dev/skills/leolin990405/r-analytics-skill/r-network)
Your own site
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/r-network"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/r-network.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,123 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00024 $0.01123
Opus 5 $0.00012 $0.00562
Sonnet 5 $0.00005 $0.00225
Haiku 4.5 $0.00002 $0.00112

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

Security

Grade A, and why

r-network 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 4d 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.

sub-skills/r-network/SKILL.md · 175 lines

How it starts

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

R Network Analysis Skill

Sub-skills

Sub-skill Description
r-network-analysis igraph, tidygraph, centrality, communities
r-network-viz ggraph, visNetwork, networkD3
r-network-dynamic networkDynamic, ndtv, temporal networks

Network and graph analysis in R.

Core Packages

Package Description
igraph Comprehensive network analysis
tidygraph Tidy API for graphs
network Basic relational data tools
sna Social network analysis

Network Modeling

Package Description
ergm Exponential random graph models
latentnet Latent position/cluster models
manynet Many network types

Dynamic Networks

Package Description
networkDynamic Dynamic/temporal networks
ndtv Animated network visualization
netdiffuseR Network diffusion analysis

Visualization

Package Description
ggraph Grammar of graphics for graphs
visNetwork Interactive visualization (vis.js)
networkD3 D3 network graphs
autograph Automagic network plotting

Metrics & Analysis

Package Description
tnet Weighted/two-mode networks
rgexf Export to GEXF (Gephi)

Quick Examples

# igraph basics
library(igraph)

# Create graph
g <- graph_from_data_frame(edges, directed = TRUE, vertices = nodes)
# Or from adjacency matrix
g <- graph_from_adjacency_matrix(adj_matrix)

# Basic metrics
vcount(g)  # Number of vertices
ecount(g)  # Number of edges
degree(g)  # Degree centrality
betweenness(g)  # Betweenness centrality
closeness(g)  # Closeness centrality
page_rank(g)$vector  # PageRank

# Community detection
communities <- cluster_louvain(g)
membership(communities)
modularity(communities)

# Shortest paths
shortest_paths(g, from = "A", to = "B")
distances(g)

# Plot
plot(g,
     vertex.size = degree(g) * 2,
     vertex.color = membership(communities),
     edge.arrow.size = 0.5)

# tidygraph + ggraph
library(tidygraph)
library(ggraph)

tg <- as_tbl_graph(g) %>%
  activate(nodes) %>%
  mutate(
    centrality = centrality_degree(),
    community = group_louvain()
  )

ggraph(tg, layout = "fr") +
  geom_edge_link(alpha = 0.5) +
  geom_node_point(aes(size = centrality, color = factor(community))) +
  geom_node_text(aes(label = name), repel = TRUE) +
  theme_graph()

# Interactive visualization
library(visNetwork)
visNetwork(nodes, edges) %>%
  visOptions(highlightNearest = TRUE) %>%
  visLayout(randomSeed = 123)

# Network statistics
transitivity(g)  # Clustering coefficient
diameter(g)  # Network diameter
graph.density(g)  # Density
assortativity_degree(g)  # Degree assortativity

Read the full file on GitHub · 175 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. 4d ago First seen · 175 lines · 24 tokens per session scan A de1886aef2c4

Subscribe to this mod's changes

r-network is a skill published in the GitHub repository LeoLin990405/r-analytics-skill (5 stars, last pushed 5mo ago), licensed MIT. It adds 24 tokens to every session and 1,123 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-09-03.

Related

Other skills, from other repositories

bio-applied-bio-data-formats

Parse/write FASTA, FASTQ, SAM/BAM, VCF, BED, GFF/GTF with pysam and pure Python; decode SAM FLAG/CIGAR; reconcile 0-based vs 1-based coordinates. Use for custom format parsers or off-by-one coordinate bugs.

Pavel-Kravchenko/Bioinformatics · 67 tokens

bio-applied-mageck-gene-essentiality

Run MAGeCK count/test on pooled CRISPR sgRNA screens, scoring gene essentiality via RRA, FDR, and log2 fold-change. Use when analyzing CRISPR screen FASTQ/count data, calling essential or drug-resistance genes, or benchmarking vs DepMap.

Pavel-Kravchenko/Bioinformatics · 69 tokens

bio-applied-molecular-evolution

Test Hardy-Weinberg equilibrium, simulate Wright-Fisher drift/selection, and compute dN/dS, Tajima's D, and Fst with NumPy/SciPy. Use for neutral theory, molecular clock divergence time, selection scans, or effective population size (Ne) questions.

Pavel-Kravchenko/Bioinformatics · 67 tokens

bio-applied-network-modules

Detect PPI/co-expression modules with NetworkX/python-louvain/leidenalg (Louvain, Leiden, modularity Q) and WGCNA eigengenes. Use when clustering a gene network, computing WGCNA modules, or testing DEG/pathway enrichment on network communities.

Pavel-Kravchenko/Bioinformatics · 65 tokens

bio-applied-ribo-seq

Ribo-seq: cutadapt/bowtie2 adapter+rRNA removal, plastid P-site calibration, 3-nt periodicity QC, RiboCode/ribotricer ORF calling, translation efficiency. Use when user has ribosome profiling or footprint data.

Pavel-Kravchenko/Bioinformatics · 64 tokens

bio-core-computational-genetics

Translate DNA per-frame, score codon usage bias (RSCU/CAI), simulate restriction digests/ORFs, and test three-point-cross mapping and Hardy-Weinberg equilibrium. Use for CAI, virtual digests, crossover mapping, or HWE tests.

Pavel-Kravchenko/Bioinformatics · 64 tokens