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 agentmods add commands/ch-bas/kibana-plugin-helper/expressiongit clone --depth 1 https://github.com/ch-bas/kibana-plugin-helperWrote 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/commands/ch-bas/kibana-plugin-helper/expression)<a href="https://agentmods.dev/commands/ch-bas/kibana-plugin-helper/expression"><img src="https://agentmods.dev/badge/commands/ch-bas/kibana-plugin-helper/expression.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 | $0.00020 | $0.01052 |
| Opus 5 | $0.00010 | $0.00526 |
| Sonnet 5 | $0.00004 | $0.00210 |
| Haiku 4.5 | $0.00002 | $0.00105 |
Grade A, and why
expression 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 3d 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 — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Generate Kibana Expression
Create custom Expression Functions and/or Renderers that integrate with Kibana's expression pipeline (Canvas, Lens, Dashboard). Ask the user for:
- Function or Renderer? Are they creating an expression function, a renderer, or both?
- Function name (snake_case, e.g.
my_metric_calc) - What it does (description of the transformation or computation)
- Input type — what data does it receive from the previous function in the pipeline? (
datatable,number,string,null,kibana_context) - Arguments — named parameters with types and defaults
- Output type — what data does it produce? (
datatable,number,string,render, custom type) - For renderers: What does it visually display? (chart, metric, table, custom visualization)
- Server or browser? Does the function need server-side access (ES queries) or is it browser-only?
Generation Steps
-
Create the expression files:
common/expressions/ # Functions that work on both server and browser ├── index.ts ├── my_function.ts # Expression function definition └── types.ts # Custom expression types public/expression_renderers/ # Renderers (browser-only) ├── index.ts └── my_renderer.tsx # Expression renderer -
For an Expression Function:
- Define the function using
ExpressionFunctionDefinition - Specify
name,help,args,inputTypes,type(output) - Implement
fn(input, args, context)— the transformation logic - Register in
setup()viaexpressions.registerFunction(myFunction)
- Define the function using
-
For an Expression Renderer:
- Define the renderer using
ExpressionRenderDefinition - Specify
name,displayName,help,reuseDomNode - Implement
render(domNode, config, handlers)— mounts the visualization - Call
handlers.done()when rendering is complete - Register in
setup()viaexpressions.registerRenderer(myRenderer)
- Define the renderer using
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.
- 3d ago First seen · 97 lines · 20 tokens per session scan A 17d7fb94b7de
expression is a command published in the GitHub repository ch-bas/kibana-plugin-helper (3 stars, last pushed 6mo ago), licensed MIT. It adds 20 tokens to every session and 1,052 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 commands, from other repositories
dead-code-scan
Scan for dead code, unused imports, duplicates, and zombie code across the project.
esp-teach
One-time project setup -- discover hardware, find datasheets, persist context to CLAUDE.md.
dead-code-clean
Actively find and remove dead code, unused imports, duplicates, and zombie code.
swift-critique
Critique SwiftUI code for patterns, design, clean code, accessibility, and performance.
dotnet-harden
Scan and harden .NET backend code against high-impact anti-patterns such as sync-over-async, lifetime bugs, fat endpoints, and fragile SignalR state.
rust-critique
Deep code critique — read the target Rust code and apply the full review process. Evaluates soundness, ownership, error handling, type design, async correctness, performance, and architecture. Think like a senior Rust engineer giving honest feedback.