Skip to content
Back to skills

Graph Nets

ASecurity

"Use DeepMind Graph Nets for GraphsTuple data, TensorFlow graph

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
datapythongobashnodeapi

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill graph-nets --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Graph Nets?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Graph Nets
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-graph-nets/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-graph-nets)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: graph-nets
description: "Use DeepMind Graph Nets for GraphsTuple data, TensorFlow graph
  utilities, and Sonnet graph-network modules."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Graph Nets

Use this repo skill when a task uses DeepMind Graph Nets (`graph_nets`) to build graph neural networks in TensorFlow/Sonnet, manipulate `GraphsTuple` graph batches, convert NetworkX or NumPy graph data, or debug Graph Nets module and utility errors.

## Read first

- [Repository provenance](references/repo-provenance.md): read before deciding whether this skill is current for a checkout or package version.
- [Compatibility](references/compatibility.md): choose TensorFlow 1/Sonnet 1 versus TensorFlow 2/Sonnet 2, and avoid incompatible NetworkX/TensorFlow stacks.
- [Troubleshooting](references/troubleshooting.md): cross-cutting install/import, dependency, GPU, and version symptoms.
- [Demo recipes](references/demo-recipes.md): distilled guidance from the tutorial, sorting, shortest-path, and physics notebooks without depending on the original notebooks.
- [Install check](scripts/check_graph_nets_install.py): safe JSON diagnostic for an installed `graph_nets` runtime.

## Install and import check

Graph Nets does not declare TensorFlow as a package requirement, so choose a TensorFlow/Sonnet pair explicitly:

```bash
# TF2/Sonnet2-style workflows verified for this skill.
python -m pip install "graph_nets" "tensorflow>=2.2,<2.3" "dm-sonnet>=2,<3" "networkx<3" "protobuf<3.20" "numpy<1.20"

# Legacy TF1/Sonnet1-style workflows verified for this skill.
python -m pip install "graph_nets" "tensorflow>=1.15,<2" "dm-sonnet<2" "tensorflow_probability<0.9" "networkx<2.7" "protobuf<3.20" "numpy<1.20"
```

Then check:

```bash
python - <<'PY'
import graph_nets as gn
from graph_nets import graphs, utils_np, utils_tf, blocks, modules
print("graph_nets import ok")
PY
```

Use the bundled diagnostic when a user reports a version or import problem:

```bash
python path/to/graph-nets/scripts/check_graph_nets_install.py --pretty
```

## Sub-skill routing

| Task signal | Read |
| --- | --- |
| Create, validate, batch, slice, or round-trip `GraphsTuple` data from dictionaries, NumPy arrays, or NetworkX graphs | [graph-data](sub-skills/graph-data/SKILL.md) |
| Use `utils_tf` for tensor `GraphsTuple`s, placeholders/feed dicts, `concat`, `repeat`, fully-connected graphs, padding/masks, `tf.function` signatures, or TF1/TF2 execution choices | [tensorflow-ops](sub-skills/tensorflow-ops/SKILL.md) |
| Build or debug `EdgeBlock`, `NodeBlock`, `GlobalBlock`, `GraphNetwork`, `GraphIndependent`, `InteractionNetwork`, `RelationNetwork`, `DeepSets`, `CommNet`, `SelfAttention`, or demo model factories | [graph-models](sub-skills/graph-models/SKILL.md) |

## Operating checklist

1. **Choose the runtime stack first.** The TF1 stack exposes `tf.Session` and top-level `tf.placeholder`; the verified TF2 stack uses eager tensors and `tf.function` signatures and does not expose those top-level TF1 symbols.
2. **Normalize graph data before modeling.** Use the graph-data sub-skill to enforce `GraphsTuple` field invariants, data dictionary key consistency, and NetworkX feature conventions.
3. **Move into TensorFlow utilities only after data is valid.** Use the TensorFlow ops sub-skill for tensor conversion, padding, masks, session fetchability, or `tf.function` input signatures.
4. **Assemble modules with explicit field assumptions.** Use graph-models when choosing `use_*` flags, reducers, Sonnet factories, or high-level message-passing architecture.
5. **Validate with tiny smoke checks before long demos.** Full notebooks are interactive/training-scale; prefer the bundled scripts and selected native unit tests before attempting notebook reproduction.

## Avoid this skill when

- The task is about JAX graph networks; prefer Jraph or other JAX-specific guidance.
- The task is about PyTorch Geometric, DGL, or generic NetworkX algorithms rather than Graph Nets `GraphsTuple`/TensorFlow/Sonnet APIs.
- The task only edits this repository's packaging or contribution process and does not use Graph Nets as a library; use general Python repository maintenance guidance.
- The task needs a modern TensorFlow/Keras GNN library with maintained TF 2.x APIs; Graph Nets is legacy and may require pinned dependencies.

Files in this skill

  • SKILL.md4.3 KB
  • references/compatibility.md3.5 KB
  • references/demo-recipes.md3.3 KB
  • references/repo-provenance.md2.4 KB
  • references/repo-routing-metadata.json325 B
  • references/troubleshooting.md3.3 KB
  • scripts/check_graph_nets_install.py7.4 KB
  • sub-skills/graph-data/SKILL.md3.3 KB
  • sub-skills/graph-data/references/api-reference.md7.2 KB
  • sub-skills/graph-data/references/data-formats.md6.9 KB
  • sub-skills/graph-data/references/troubleshooting.md7.3 KB
  • sub-skills/graph-data/scripts/graph_data_smoke.py5.7 KB
  • sub-skills/graph-models/SKILL.md3.1 KB
  • sub-skills/graph-models/references/api-reference.md14.4 KB
  • sub-skills/graph-models/references/troubleshooting.md9.7 KB
  • sub-skills/graph-models/references/workflows.md11.7 KB
  • sub-skills/graph-models/scripts/demo_models_tf1.py7.1 KB
  • sub-skills/graph-models/scripts/demo_models_tf2.py6.6 KB
  • sub-skills/graph-models/scripts/graph_model_smoke.py6.2 KB
  • sub-skills/tensorflow-ops/SKILL.md3.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.