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 build-expression-treegit 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/build-expression-tree)<a href="https://agentmods.dev/skills/jimmc414/claude-code-plugin-marketplace/build-expression-tree"><img src="https://agentmods.dev/badge/skills/jimmc414/claude-code-plugin-marketplace/build-expression-tree/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/build-expression-tree"><img src="https://agentmods.dev/badge/skills/jimmc414/claude-code-plugin-marketplace/build-expression-tree.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.00024 | $0.00863 |
| Opus 5.5 | $0.00010 | $0.00345 |
| Sonnet 5.5 | $0.00005 | $0.00173 |
| Haiku 4.5 | $0.00002 | $0.00086 |
Grade A, and why
build-expression-tree 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 2mo 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 — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
build-expression-tree
When to Use
- Symbolic math (differentiation, simplification)
- Building ASTs for interpreters
- Query builders (SQL, API)
- Code generation
- Expression pattern matching
When NOT to Use
- Just need to evaluate once (use direct computation)
- No transformation needed
- Structure too complex (use existing parser)
The Pattern
Represent expressions as nested data structures (tuples, classes, or trees).
# Tuple representation
expr = ('+', ('*', 'x', 2), 1) # (x * 2) + 1
# Class representation
class Expr:
def __init__(self, op, *args):
self.op, self.args = op, args
def __add__(self, other):
return Expr('+', self, other)
def __mul__(self, other):
return Expr('*', self, other)
x = Expr('x')
expr = x * 2 + 1 # Builds expression tree
# Recursive evaluation
def evaluate(expr, env):
if isinstance(expr, str):
return env[expr] # Variable lookup
if isinstance(expr, (int, float)):
return expr
op, *args = expr if isinstance(expr, tuple) else (expr.op, *expr.args)
values = [evaluate(a, env) for a in args]
return {'+': lambda a,b: a+b, '*': lambda a,b: a*b}[op](*values)
Example (from pytudes Differentiation.ipynb)
class Expression:
"""A symbolic mathematical expression."""
def __init__(self, op, *args):
self.op, self.args = op, args
def __add__(self, other): return Expression('+', self, other)
def __radd__(self, other): return Expression('+', other, self)
def __mul__(self, other): return Expression('*', self, other)
def __rmul__(self, other): return Expression('*', other, self)
def __neg__(self): return Expression('-', self)
def __repr__(self):
if len(self.args) == 1:
return f"({self.op}{self.args[0]})"
return f"({self.args[0]} {self.op} {self.args[1]})"
class Function(Expression):
"""A function like sin or cos."""
def __call__(self, x):
return Expression(self, x)
# Create symbols and functions
x = Expression('x')
sin, cos = Function('sin'), Function('cos')
# Build expressions naturally
expr = sin(x) + cos(x) * 2
# Expression tree: (+ (sin x) (* (cos x) 2))
# Symbolic differentiation
def D(y, x=x):
"""Differentiate y with respect to x."""
if y == x: return 1
if not isinstance(y, Expression): return 0
op, args = y.op, y.args
if op == '+': return D(args[0], x) + D(args[1], x)
if op == '*': return D(args[0], x) * args[1] + args[0] * D(args[1], x)
if op == sin: return cos(args[0]) * D(args[0], x)
# ... more rules
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.
- 2mo ago First seen · 103 lines · 24 tokens per session scan A c1d74d4e9d9d
build-expression-tree is a skill published in the GitHub repository jimmc414/claude-code-plugin-marketplace (4 stars, last pushed yesterday), licensed MIT. It adds 24 tokens to every session and 863 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.
build-expression-tree compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| build-expression-treejimmc414/claude-code-plugin-marketplace | Skill | 4 | yesterday | MIT | A | 24 | Claude Code |
| extract-ssotmelodic-software/claude-code-plugins | Skill | 29 | yesterday | MIT | A | 99 | Claude Code |
| audit-encapsulationmelodic-software/claude-code-plugins | Skill | 29 | yesterday | MIT | A | 98 | Claude Code |
| audit-progressive-disclosuremelodic-software/claude-code-plugins | Skill | 29 | yesterday | MIT | A | 113 | Claude Code |
| write-for-agentsmelodic-software/claude-code-plugins | Skill | 29 | yesterday | MIT | A | 155 | Claude Code |
| quiz-memelodic-software/claude-code-plugins | Skill | 29 | yesterday | MIT | A | 152 | Claude Code |
| firecrawlmelodic-software/claude-code-plugins | Skill | 29 | yesterday | MIT | A | 166 | Claude Code |