ultra-graph-theory

ultra-graph-theory is a skill for Claude Code from 8b-is/smart-tree. It costs 107 tokens per session (5,347 once invoked), scanned A, original, MIT.

A code-structure analysis method that represents files and symbols as connected graphs and applies ideas from graph theory. Graph theory is the study of objects and the connections between them.

In plain words
What is it for?
It is for exploring code structure, grouping related parts, and examining dependencies or other relationships across a repository.
Why use it?
It aims to replace large, hard-to-read directory listings with summaries of important relationships in a codebase. The description does not provide enough detail to confirm which practical findings are exposed to users.

Skill for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths; mentions subagents; positional $N argument.

Good fit It is for exploring code structure, grouping related parts, and examining dependencies or other relationships across a repository.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/8b-is/smart-tree/ultra-graph-theory
Install

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.

Any agent
npx skills add 8b-is/smart-tree --skill ultra-graph-theory
Clone the repo
git clone --depth 1 https://github.com/8b-is/smart-tree

Made for: Claude Code.

Wrote 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.

agentmods badge for ultra-graph-theory

README.md
[![agentmods](https://agentmods.dev/badge/skills/8b-is/smart-tree/ultra-graph-theory/github.svg)](https://agentmods.dev/skills/8b-is/smart-tree/ultra-graph-theory)
Your own site
<a href="https://agentmods.dev/skills/8b-is/smart-tree/ultra-graph-theory"><img src="https://agentmods.dev/badge/skills/8b-is/smart-tree/ultra-graph-theory/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ultra-graph-theory

Your own site · 80×15
<a href="https://agentmods.dev/skills/8b-is/smart-tree/ultra-graph-theory"><img src="https://agentmods.dev/badge/skills/8b-is/smart-tree/ultra-graph-theory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,347 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00107 $0.05347
Opus 5.5 $0.00043 $0.02139
Sonnet 5.5 $0.00021 $0.01069
Haiku 4.5 $0.00011 $0.00535

Measured 2d ago against content hash 85281923f957, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ultra-graph-theory scanned grade A with 1 finding 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 2d 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.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

| **Antigravity** | `agy` | `~/.gemini/config/mcp_config.json` & `.agents/hooks.json` | Native `--agy-hook` lifecycle (`session-start`, `pre-invocation`, `pre-tool-use`, `post-tool-use`, `stop`) + subagent spawning per `

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/ultra-graph-theory/SKILL.md · 151 lines

How it starts

The opening of the file, as written. The whole thing — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ultra Graph Theory — "Straight from The Book" (smart-tree v10.9.0+)

"Another roof, another proof. In God's Book are the most elegant proofs — and the cleanest architectures." — Paul Erdős (1913–1996), The Magician from Budapest

ultra-graph-theory is a 100% model-agnostic and harness-agnostic architectural intelligence skill powered by smart-tree (st --mode the-book / src/mem8/regularity/). It replaces naive $O(V + E)$ directory dumps with five rigorous theorems from extremal, probabilistic, and structural graph theory.


1. First-Class Citizens: Models & Agent Harnesses

This skill treats all four frontier model families and all four terminal/IDE agent harnesses as first-class citizens without vendor lock-in.

A. First-Class Frontier Models

Model Family Optimal st Invocation Context & Reasoning Calibration
Gemini (gemini-2.5-pro, gemini-3) st -m the-book . + ZeroCopyMem8Book::top_k_super_nodes Pair Gemini's deep multimodal/long-context window with Szemerédi super-node maps (K <= 256) as a global structural index, expanding Erdős Number 0..=2 shells (max_erdos_radius = 2).
ChatGPT / Codex (gpt-4o, o3, o4-mini, codex) st -m the-book --compact . Feed the deterministic ERDOS-THE-BOOK-v1.0 JSON schema directly into structured tool outputs; use worktree_buckets for parallel function calls and token_budget = 8000 for tight latency.
DeepSeek (deepseek-r1, deepseek-v3) st -m the-book . + st --security-scan . Inject the 4 Erdős–Rényi invariants ($\kappa, s(C), \Lambda(C), \lambda_1$), Kohayakawa–Rödl energy $q_p(\mathcal{P})$, and Moser Witness Trees into <think> verification blocks before generating patches.
Claude (claude-4-opus, claude-4-sonnet) st -m the-book . + st --mcp Combine ZeroCopyMem8Book (.m8b mmap) + T8R LEB128 exception streams with MCP tool calls so Claude expands only Erdős Number 0 terminals and 1 Steiner bridges.

Read the full file on GitHub · 151 lines

Files

What ships with it

1 file 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.

Changes

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.

  1. 2d ago First seen · 151 lines · 107 tokens per session scan A 85281923f957

Subscribe to this mod's changes

ultra-graph-theory is a skill published in the GitHub repository 8b-is/smart-tree (272 stars, last pushed yesterday), licensed MIT. It adds 107 tokens to every session and 5,347 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-04.

Related

ultra-graph-theory compared with skills from other repositories

ultra-graph-theory next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ultra-graph-theory8b-is/smart-treeSkill272yesterdayMITA107Claude Code
clawhub-pr-maintaineropenclaw/clawhubSkill9.5ktodayMITA50Claude Code, Codex
autoreviewopenclaw/clawhubSkill9.5ktodayMITA17Claude Code, Codex
convex-revieweropenclaw/clawhubSkill9.5ktodayMITA40Claude Code, Codex
mindosGeminiLight/MindOSSkill70414d agoMITA136Claude Code
laravel-auditMrPunyapal/laravel-auditorSkill607d agoMITA46Claude Code, Codex
handoffPVRLabs/aibadgerSkill797d agoMITA35Claude Code, Codex