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.svg" alt="Measured on agentmods" 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 | $0.00012 | $0.00432 |
| Sonnet 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 7d 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.
- 7d 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. 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.
Other skills, from other repositories
batch-simplify
Batch-run simplification across changed files, or across an entire repository, grouped by ecosystem and dependency order. Use when: 'batch simplify', 'simplify recent changes', 'forgot to run simplify', 'catch up on simplify', sweeping a named scope such as a branch, a whole repository, or one directory, or after a…
audit-progressive-disclosure
Read-only progressive-disclosure audit for agent-facing instruction markdown. Grades every target against a three-tier load-cost model (always-loaded / invocation-loaded / on-demand) and classifies seven finding shapes in two lanes: split opportunities (oversize vs tier-calibrated Anthropic-prescribed caps…
quiz-me
Post-work comprehension check: after a change is complete, generate a self-contained HTML report of what was done (context, intuition, decisions) with a quiz at the bottom that you answer. Verifying the HUMAN absorbed the work, not the artifact. Non-gating by default; the quizpolicy userConfig tunes offer cadence.…
generate
Build a source-backed AI industry briefing from official vendor publications, configured RSS feeds, GitHub releases, reputable secondary reporting, and user-supplied URLs. Use when: 'ai briefing', 'ai news', 'what's new in AI', 'catch me up on AI', 'prep for AI meeting', 'AI roundup', or 'generate AI slides'.
changelog
Ingest Claude Code changelog entries and integrate them into the current repo. Fetch (read-only display), diff (impact analysis, no edits), status (applied versions), and apply (full integrate pipeline, explicit user intent only). Use when: 'new cc version', 'what changed in claude code', 'apply changelog', a new CC…
eli5
Dead-simple VISUAL explainer. Produces a visual HTML explainer that assumes zero prior knowledge: one idea per diagram, minimal text. Works on a codebase object (a module, a tradeoff, an incident) or a general concept, and grounds in the real artifact before drawing anything. Use when: 'ELI5', 'explain like I'm five'…