Claude Code NetworkX Skill for Weighted Walking Routes
Represent places and links as a Python graph, then compute and explain a shortest path using edge weights. Useful for route analysis or a classroom exercise.
中文Install in Claude Code
Use Claude Code with the complete pinned skill and a Python environment containing NetworkX. The exercise uses hand-entered edges and needs no map service.
- Get the complete `cli-tool/components/skills/scientific/networkx` directory from the pinned GitHub checkout.
- Copy it under the target project's `.claude/skills/`. Confirm `.claude/skills/networkx/SKILL.md`, open Claude Code at the project root, and call `/networkx`.
Example task
Build a fictional walking graph. Entry to Gallery is nine minutes directly. Via Garden the two legs take three and four minutes. Find the weighted shortest path and rerun after removing one leg.What to check
The first path goes through Garden in seven minutes. Removing the Entry-to-Garden edge should leave the nine-minute direct route.
Original SKILL.md on GitHub · Updated
Frequently asked question
Why could the shortest path take longer in minutes?
Check whether the algorithm uses the travel-time attribute. Minimizing edge count can select a slower route.