Skip to main content
skill CX Codex

graph-algorithms — Claude Code skill: what it does, how to install

graph-algorithms — a Claude Code skill with a decision tree for graph algorithm problems: traversals, shortest paths, spanning trees, network flow, and spectral analysis. Runs Z3 and SymPy via uv run from inside the agent.

MIT ★ 3,951 updated 2026-01-26

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add parcadei/Continuous-Claude-v3 --skill graph-algorithms -a claude-code
Open on GitHub

What graph-algorithms does

The skill brings a structured algorithm-selection strategy into Claude Code for graph number theory problems. The decision tree covers BFS and DFS traversal, four shortest-path algorithms with a complexity table, minimum spanning tree construction via Prim's and Kruskal's, network flow with the max-flow / min-cut theorem, and spectral graph properties through eigenvalues of the adjacency matrix.

Two Bash tools handle computation: uv run python -m runtime.harness scripts/z3_solve.py sends graph properties to the Z3 SMT solver for formal proof, and uv run python -m runtime.harness scripts/sympy_compute.py computes adjacency matrix eigenvalues and solves flow conservation equations through SymPy. Both scripts must exist at scripts/z3_solve.py and scripts/sympy_compute.py in your project — the commands will fail without them.

The theoretical examples come from Graduate Texts in Mathematics (173), covering graph colouring, χ-bounded graph classes, and extremal graph theory. Full cognitive tool documentation lives at .claude/skills/math-mode/SKILL.md.

What it helps with

  • pick the right shortest-path algorithm given edge weight constraints
  • prove a graph property with Z3 (e.g. the Dijkstra relaxation inequality)
  • compute eigenvalues of an adjacency matrix via SymPy
  • decide between Prim's and Kruskal's for a given graph density
  • reduce a graph colouring problem to SAT

Example prompts for the agent

  • Prove via Z3 that d[v] >= d[u] + w(u,v) holds for all edges in this graph
  • Compute the eigenvalues of this adjacency matrix using sympy_compute.py
  • Solve the flow conservation equations for this network

How to install graph-algorithms

1Skills CLI (Vercel)

npx skills add parcadei/Continuous-Claude-v3 --skill graph-algorithms -a claude-code

2Manually: put the files in place

~/.claude/skills/graph-algorithms/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/graph-algorithms/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about graph-algorithms

How do I install graph-algorithms in Claude Code?

Run npx skills add parcadei/Continuous-Claude-v3 --skill graph-algorithms -a claude-code. The skill will be available at ~/.claude/skills/graph-algorithms/SKILL.md.

What does the graph-algorithms skill do?

It adds a decision tree for graph algorithm selection to Claude Code and lets you run Z3 and SymPy for formal proofs and spectral computations without leaving the agent.

What does the project need for the Z3 and SymPy tools to work?

scripts/z3_solve.py and scripts/sympy_compute.py must exist in the project, and uv run python -m runtime.harness must be functional — the skill's Bash commands depend on both.

Source text

SKILL.md · MIT
---
name: graph-algorithms
description: "Problem-solving strategies for graph algorithms in graph number theory"
allowed-tools: [Bash, Read]
---

# Graph Algorithms

## When to Use

Use this skill when working on graph-algorithms problems in graph number theory.

## Decision Tree


1. **Traversal selection**
   - BFS: shortest paths (unweighted), level structure
   - DFS: cycle detection, topological sort, SCC

2. **Shortest path algorithms**
   | Algorithm | Use Case | Complexity |
   |-----------|----------|------------|
   | Dijkstra | Non-negative weights | O((V+E) log V) |
   | Bellman-Ford | Negative weights | O(VE) |
   | Floyd-Warshall | All pairs | O(V^3) |

3. **Minimum Spanning Tree**
   - Prim's: dense graphs, greedy from vertex
   - Kruskal's: sparse graphs, union-find
   - `z3_solve.py prove "cut_property"`

4. **Network Flow**
   - Max-flow = min-cut (Ford-Fulkerson)
   - Matching via flow network
   - `sympy_compute.py linsolve "flow_conservation"`

5. **Graph properties**
   - Spectral: eigenvalues of adjacency matrix
   - Connectivity: via DFS/BFS
   - Coloring: greedy or SAT reduction


## Tool Commands

### Sympy_Adjacency
```bash
uv run python -m runtime.harness scripts/sympy_compute.py eigenvalues "adjacency_matrix"
```

### Z3_Dijkstra
```bash
uv run python -m runtime.harness scripts/z3_solve.py prove "d[v] >= d[u] + w(u,v) for all edges"
```

### Z3_Mst_Cut
```bash
uv run python -m runtime.harness scripts/z3_solve.py prove "min_edge_crossing_cut_in_mst"
```

### Sympy_Flow
```bash
uv run python -m runtime.harness scripts/sympy_compute.py linsolve "flow_conservation_equations"
```

## Key Techniques

*From indexed textbooks:*

- [Graph Theory (Graduate Texts in Mathematics (173))] Given two numerical graph invariants i1 and i2, write i1 i2 if we can force i2 to be arbitrarily high on some subgraph of G by assuming that i1(G) is large enough. Formally: write i1 i2 if there exists a function f : N → N such that, given any k ∈ N, every graph G with i1(G) f (k) has a subgraph H with i2(H) k. If i1 i2 as well as i1 i2, write i1 ∼ i2.
- [Graph Theory (Graduate Texts in Mathematics (173))] Find the smallest integer b = b(k) such that every graph of order n with more than kn + b edges has a (k + 1)-edge- connected subgraph, for every k ∈ N. Show that every tree T has at least Δ(T ) leaves. Show that a tree without a vertex of degree 2 has more leaves than other vertices.
- [Graph Theory (Graduate Texts in Mathematics (173))] For every n > 1, nd a bipartite graph on 2n vertices, ordered in such a way that the greedy algorithm uses n rather than 2 colours. Exercises Consider the following approach to vertex colouring. First, nd a max- imal independent set of vertices and colour these with colour 1; then nd a maximal independent set of vertices in the remaining graph and colour those 2, and so on.
- [Graph Theory (Graduate Texts in Mathematics (173))] Show that, for every r ∈ N, every innite graph of upper density s subgraph for every s ∈ N. Deduce that the upper density of innite graphs can only take r−1 has a K r the countably many values of 0, 1, 1 2 , 2 3 , 3 4 Extremal Graph Theory Given a tree T , nd an upper bound for ex(n, T ) that is linear in n and independent of the structure of T , i. Prove the Erd˝os-S´os conjecture for the case when the tree considered is a star.
- [Graph Theory (Graduate Texts in Mathematics (173))] Colouring Slightly more generally, a class G of graphs is called χ-bounded if there exists a function f : N → N such that χ(G) f (r) for every graph G ⊇ Kr in G. In such graphs, then, we can force a Kr subgraph by making χ larger than f (r). Show that the four colour theorem does indeed solve the map colouring problem stated in the rst sentence of the chapter.

## Cognitive Tools Reference

See `.claude/skills/math-mode/SKILL.md` for full tool documentation.

© parcadei · MIT · parcadei/Continuous-Claude-v3

Similar skills

All skills for AI and ML →
codebase-comprehension-algorithms pproenca codebase-comprehension-algorithms maps an unfamiliar repository into feature domains: which files back a feature, where the architecture actually sits. CX Codex +1 148installs neo4j-snowflake-graph-analytics-skill neo4j-contrib neo4j-snowflake-graph-analytics-skill — a skill for Claude Code that executes Neo4j Graph Analytics algorithms in Snowflake. Formats projection views with required casting and builds SQL CALL statements without data movement. CX Codex +1 797installs infranodus-mcp-server-infranodus infranodus infranodus-mcp-server-infranodus converts text into knowledge graphs, pinpoints discourse gaps, and extracts topical clusters using graph science. Helps map research themes and structure content. CX Codex +1 ★ 105repo stars hr-network-analyst curiositech hr-network-analyst applies graph theory to map professional networks and identify influence brokers. Pinpoints Gladwellian superconnectors and structural holes across industry communities. CX Codex +1 184installs fintech-algorithms IslamBaraka90 The fintech-algorithms skill wires a 717-function TypeScript library into your agent: indicators, statistics, portfolio and risk maths. Useful when a number has to be computed, not approximated. CX Codex +1 2,600installs paper-graph EvoScientist The paper-graph Claude Code skill maps the development of a research topic or paper across related works. It creates a Markdown report with Mermaid diagrams when asked to trace predecessors, follow-ups, or a field’s history. CX Codex +1 111installs

From the same set161

The whole set →
critic critic reviews features and implementations for logic issues, test gaps, and mismatches with repository patterns, then saves its findings to a Markdown file. CX Codex ★ 3,951repo stars numerical-integration A skill for numerical integration in mathematical analysis tasks. Guides you through selecting a quadrature method, setting tolerances, and computing integrals via scipy and sympy. CX Codex +1 ★ 3,951repo stars groups Structures problem-solving in group theory. Activates when the agent needs to verify group axioms, test subgroups, or prove homomorphisms. CX Codex +1 ★ 3,951repo stars agentic-workflow The agentic-workflow skill organizes implementation work into research, planning, validation, coding, and review. Separate agents handle each stage in the background. CX Codex +1 ★ 3,951repo stars residues A Claude Code skill for solving residue problems in complex analysis. Computes residues at poles, identifies pole order, and applies the residue theorem through SymPy and Z3. CX Codex +1 ★ 3,951repo stars hilbert-spaces Solves functional analysis problems involving Hilbert spaces. Use it for orthogonal decomposition, projection theorems, Riesz representation, and computations on orthonormal bases. CX Codex +1 ★ 3,951repo stars debug-agent debug-agent — a subagent that investigates root causes by exploring the codebase, analyzing logs, finding patterns, and writing a detailed report with fix recommendations. CX Codex ★ 3,951repo stars interpolation Guides Claude Code through selecting and running numerical interpolation workflows, from Lagrange polynomials to SciPy splines. CX Codex +1 ★ 3,951repo stars

Project sponsors

Companies that keep this analytics open