graph-algorithms — скилл для Claude Code: что делает и как установить
Скилл graph-algorithms для Claude Code с деревом решений по алгоритмам на графах: обходы, кратчайшие пути, остовные деревья, потоки и спектральный анализ. Запускает Z3 и SymPy через uv run прямо из агента.
MIT ★ 3 951 обновлён 2026-01-26
npx skills add parcadei/Continuous-Claude-v3 --skill graph-algorithms -a claude-codeЧто делает graph-algorithms
Скилл подключает к Claude Code готовую стратегию выбора алгоритма для задач на графах из теории чисел на графах. Дерево решений охватывает обходы BFS и DFS, четыре алгоритма кратчайших путей с таблицей сложностей, построение минимального остовного дерева алгоритмами Прима и Крускала, сетевые потоки по теореме max-flow / min-cut и работу со спектральными свойствами графов через собственные значения матрицы смежности.
Инструменты вызываются командами Bash: uv run python -m runtime.harness scripts/z3_solve.py доказывает свойства графа через SMT-решатель Z3, а uv run python -m runtime.harness scripts/sympy_compute.py считает собственные значения матрицы смежности и решает уравнения сохранения потока через SymPy. Оба скрипта (z3_solve.py, sympy_compute.py) должны лежать в scripts/ проекта — без них команды не выполнятся.
Текстовые примеры взяты из Graduate Texts in Mathematics (173), поэтому скилл ориентирован на академические задачи: раскраска графов, экстремальная теория графов, χ-ограниченные классы. Полная документация когнитивных инструментов — в .claude/skills/math-mode/SKILL.md.
Какие задачи решает
- выбрать алгоритм кратчайшего пути под конкретные ограничения по весам рёбер
- доказать свойство графа через Z3 (например, неравенство Дейкстры)
- вычислить собственные значения матрицы смежности через SymPy
- определить, строить MST алгоритмом Прима или Крускала
- решить задачу раскраски графа через SAT-редукцию
Примеры запросов агенту
- Докажи через Z3, что
d[v] >= d[u] + w(u,v)для всех рёбер графа - Вычисли собственные значения матрицы смежности этого графа
- Реши уравнения сохранения потока для сети с помощью
sympy_compute.py
Как установить graph-algorithms
1Через Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill graph-algorithms -a claude-code2Вручную: положить файлы
~/.claude/skills/graph-algorithms/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/graph-algorithms/
1Через Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill graph-algorithms -a codex2Вручную: положить файлы
.agents/skills/graph-algorithms/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill graph-algorithms -a cursor2Вручную: положить файлы
.cursor/skills/graph-algorithms/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install parcadei/Continuous-Claude-v3 .claude/skills/math/graph-number-theory/graph-algorithms2Вручную: положить файлы
.github/skills/graph-algorithms/SKILL.md1Через Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill graph-algorithms -a gemini-cli2Командой платформы
gemini skills install https://github.com/parcadei/Continuous-Claude-v3 --path .claude/skills/math/graph-number-theory/graph-algorithmsВручную: положить файлы
.devin/skills/graph-algorithms/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о graph-algorithms
Как установить graph-algorithms в Claude Code?
Выполни npx skills add parcadei/Continuous-Claude-v3 --skill graph-algorithms -a claude-code — скилл появится по пути ~/.claude/skills/graph-algorithms/SKILL.md.
Что делает скилл graph-algorithms?
Он добавляет в Claude Code дерево решений по алгоритмам на графах и позволяет запускать Z3 и SymPy для доказательства свойств графов и вычисления спектральных характеристик прямо из агента.
Что нужно, чтобы инструменты Z3 и SymPy заработали?
В проекте должны быть файлы scripts/z3_solve.py и scripts/sympy_compute.py, а также настроен uv run python -m runtime.harness — без этого команды скилла не выполнятся.
Исходный текст
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