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.
npx agentmods add skills/senolisci/mykg/networkxnpx skills add SenolIsci/mykg --skill networkxgit clone --depth 1 https://github.com/SenolIsci/mykgWrote 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.
[](https://agentmods.dev/skills/senolisci/mykg/networkx)<a href="https://agentmods.dev/skills/senolisci/mykg/networkx"><img src="https://agentmods.dev/badge/skills/senolisci/mykg/networkx.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00163 | $0.06243 |
| Opus 5 | $0.00081 | $0.03121 |
| Sonnet 5 | $0.00033 | $0.01249 |
| Haiku 4.5 | $0.00016 | $0.00624 |
Grade A, and why
networkx 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.
How it starts
The opening of the file, as written. The whole thing — 777 lines — stays where its author put it; the contents beside it link to each section on GitHub.
NetworkX Skill — Create and Manipulate Networks
NetworkX (v3.6+) is the standard Python library for graph analysis. This skill covers everything from basic graph creation to advanced algorithms. When in doubt, prefer simple explicit code over clever one-liners — graphs are complex enough on their own.
References:
- algorithms.md — Algorithm reference by category (centrality, community, flow, etc.)
- io.md — File I/O and format conversion reference
1. Choosing a Graph Class
Pick the right class first — it cannot easily be changed after construction.
import networkx as nx
G = nx.Graph() # undirected, no parallel edges
DG = nx.DiGraph() # directed, no parallel edges
MG = nx.MultiGraph() # undirected + parallel edges allowed
MD = nx.MultiDiGraph() # directed + parallel edges allowed
| Need | Class |
|---|---|
| Social networks, protein interactions | Graph |
| Web graphs, citation networks, DAGs | DiGraph |
| Transport networks (multiple routes) | MultiGraph |
| Dependency graphs with typed edges | MultiDiGraph |
Convert between types:
DG = G.to_directed() # Graph → DiGraph (each edge becomes two arcs)
G2 = DG.to_undirected() # DiGraph → Graph
2. Building Graphs
Add Nodes
Any hashable Python object is a valid node: int, str, tuple, frozenset.
G.add_node(1)
G.add_node("Alice", age=30, role="engineer") # node with attributes
G.add_nodes_from([2, 3, 4])
G.add_nodes_from([
("Bob", {"age": 25, "role": "designer"}),
("Carol", {"age": 35, "role": "manager"}),
])
Add Edges
G.add_edge(1, 2)
G.add_edge("Alice", "Bob", weight=0.9, relation="colleague")
G.add_edges_from([(1, 2), (2, 3), (3, 4)])
G.add_edges_from([
(1, 2, {"weight": 1.5}),
(2, 3, {"weight": 0.8}),
])
G.add_weighted_edges_from([(1, 2, 1.5), (2, 3, 0.8)]) # shorthand
For MultiGraph, add_edge returns the edge key (int):
k = MG.add_edge(1, 2, weight=0.5) # k=0
k = MG.add_edge(1, 2, weight=0.75) # k=1 (parallel edge)
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago First seen · 777 lines · 163 tokens per session scan A 3c814bfcde44
networkx is a skill published in the GitHub repository SenolIsci/mykg (69 stars, last pushed 3d ago), licensed MIT. It adds 163 tokens to every session and 6,243 once invoked, about $0.0008 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.
Other skills, from other repositories
ontology-build-team
Turn research outputs into a domain ontology draft using layered modeling, SKOS-first conceptualization, selective OWL formalization, and explicit modeling decisions tied back to evidence.
ontology-shacl-validator
Validate ontology outputs through SHACL-oriented checks, structural issue reporting, and release-readiness notes tied to competency questions, evidence quality, and unresolved modeling risks.
ontology-technical-plan-writer
Draft or refine a technical planning document template for an ontology project. Use when the user wants a technical proposal, planning brief, or reusable template that connects scope, competency questions, standards reuse, modeling approach, validation, governance, and execution phases without drifting into a…
ontology-validation-team
Validate a domain ontology draft using competency-question checks, SHACL-oriented structural validation, review gates, and release-readiness criteria before the ontology is treated as stable.
ontology-domain-intake
Clarify the target domain for ontology work by defining scope, users, constraints, out-of-scope areas, and approval points before modeling starts.
ontology-evidence-curator
Curate ontology-ready evidence from collected sources by capturing concept definitions, relation clues, constraints, reuse notes, data collection feasibility, and source-grounded synthesis in the exe folder.