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.
npx skills add jimmc414/claude-code-plugin-marketplace --skill generate-tree-structuregit clone --depth 1 https://github.com/jimmc414/claude-code-plugin-marketplaceWrote 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.
[](https://agentmods.dev/skills/jimmc414/claude-code-plugin-marketplace/generate-tree-structure)<a href="https://agentmods.dev/skills/jimmc414/claude-code-plugin-marketplace/generate-tree-structure"><img src="https://agentmods.dev/badge/skills/jimmc414/claude-code-plugin-marketplace/generate-tree-structure/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.
<a href="https://agentmods.dev/skills/jimmc414/claude-code-plugin-marketplace/generate-tree-structure"><img src="https://agentmods.dev/badge/skills/jimmc414/claude-code-plugin-marketplace/generate-tree-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00030 | $0.00707 |
| Opus 5.5 | $0.00012 | $0.00283 |
| Sonnet 5.5 | $0.00006 | $0.00141 |
| Haiku 4.5 | $0.00003 | $0.00071 |
Grade A, and why
generate-tree-structure scanned grade A with 0 findings 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 3mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
generate-tree-structure
When to Use
- Generating random mazes
- Building spanning trees
- Covering all nodes exactly once
- Procedural generation of connected structures
- When you need different tree "styles" (twisted vs. branchy)
When NOT to Use
- When you need a specific tree structure (build directly)
- Shortest path trees (use BFS/Dijkstra)
- When cycles are needed (not a tree)
The Pattern
Use frontier-based exploration where the pop strategy determines tree shape.
from collections import deque
import random
def random_tree(nodes, neighbors, pop=deque.pop):
"""Build spanning tree by frontier exploration.
pop strategy determines tree shape:
- deque.pop (DFS): long winding paths
- deque.popleft (BFS): short bushy branches
- random.choice: random structure
"""
tree = set()
nodes = set(nodes)
root = nodes.pop()
frontier = deque([root])
while nodes:
# Pop from frontier according to strategy
current = pop(frontier)
# Find unvisited neighbors
unvisited = [n for n in neighbors(current) if n in nodes]
if unvisited:
# Pick random neighbor, add edge
chosen = random.choice(unvisited)
tree.add((current, chosen))
nodes.remove(chosen)
# Add both back to frontier
frontier.append(current)
frontier.append(chosen)
return tree
Example (from pytudes Maze.ipynb)
from collections import deque
import random
def make_maze(width, height):
"""Generate a random maze using DFS-based tree generation."""
def neighbors(cell):
x, y = cell
candidates = [(x+1, y), (x-1, y), (x, y+1), (x, y-1)]
return [(nx, ny) for nx, ny in candidates
if 0 <= nx < width and 0 <= ny < height]
all_cells = {(x, y) for x in range(width) for y in range(height)}
# DFS creates long winding passages
edges = random_tree(all_cells, neighbors, pop=deque.pop)
return Maze(width, height, edges)
def solve_maze(maze, start, goal):
"""BFS to find shortest path through maze."""
frontier = deque([(start, [start])])
visited = {start}
while frontier:
current, path = frontier.popleft()
if current == goal:
return path
for neighbor in maze.neighbors(current):
if neighbor not in visited:
visited.add(neighbor)
frontier.append((neighbor, path + [neighbor]))
return None
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.
- 3mo ago First seen · 107 lines · 30 tokens per session scan A 411bfa2d5a56
generate-tree-structure is a skill published in the GitHub repository jimmc414/claude-code-plugin-marketplace (4 stars, last pushed yesterday), licensed MIT. It adds 30 tokens to every session and 707 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
generate-tree-structure compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| generate-tree-structurejimmc414/claude-code-plugin-marketplace | Skill | 4 | yesterday | MIT | A | 30 | Claude Code |
| write-for-agentsmelodic-software/claude-code-plugins | Skill | 33 | today | MIT | A | 130 | Claude Code |
| formal-ci-lanes-carry-forwardmelodic-software/claude-code-plugins | Skill | 33 | today | MIT | A | 138 | Claude Code |
| eli5melodic-software/claude-code-plugins | Skill | 33 | today | MIT | A | 155 | Claude Code |
| usemelodic-software/claude-code-plugins | Skill | 33 | today | MIT | A | 183 | Claude Code |
| routemelodic-software/claude-code-plugins | Skill | 33 | today | MIT | A | 89 | Claude Code |
| unhobblemelodic-software/claude-code-plugins | Skill | 33 | today | MIT | A | 75 | Claude Code |