/micromegas:micromegas-notebooksfrom micromegas
Creates and edits micromegas notebook screens with cells (table, chart, log, markdown, variable, flamegraph), SQL macros, and variables. Use when finding, reusing, or modifying saved notebooks.
Ships in micromegas. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A notebook is a screen of type notebook. Its config is a JSON object holding an ordered list of
cells that run top to bottom, plus a default time range:
{
"timeRangeFrom": "now-1h",
"timeRangeTo": "now",
"cells": [ ... ]
}
Start from get_screen_type_default("notebook"), and look at a curated notebook with list_screens
and get_screen before inventing a layout. Reuse its queries rather than rewriting them.
list_screens (optionally with folder_path) to find an existing notebook close to the request.get_screen to read its config. Large configs are truncated, in which case reuse only the
cells you can see.prepare_query then execute_query, following the
micromegas-query rules (bounded time range, LIMIT, per-view description). Notebook macros
such as $from are not understood by the query tools: substitute concrete values while testing.create_screen (new) or update_screen (existing). Pass expected_updated_at from list_screens (or from get_screen
when the config was not truncated, since truncation drops updated_at) so a concurrent edit is not overwritten. Writes may be disabled on the server.Every cell has a unique name, a type, and layout: { "height": <px>, "collapsed": false }.
type | Purpose | Main fields |
|---|---|---|
table | sortable table | sql, options.pageSize, options.selectionMode (none / single) |
chart | time series (line or bar) | queries: [{ sql, name, unit, label, color }], options.chart_type, options.scale_mode |
log | log viewer with level colors | sql returning time, level, target, msg |
markdown | text or a headline value | content, optional sql (row 0 binds $column) |
variable | user input feeding $name | variableType: text, combobox, expression, datasource; defaultValue; sql (combobox) |
flamegraph | span visualization | sql returning id, parent, name, begin, end, depth (optional lane) |
hg | horizontal group | children: [cells]; groups cannot nest |
piechart, stackedbar, swimlane, propertytimeline, transposed, map, image, referencetable, perfettoexport | see the web app documentation |
Query-backed cells also accept dataSource (data source name, or $variable of a datasource
variable) and timeRange: { "from": "...", "to": "..." } to override the notebook range.
Chart SQL returns the X column first, the Y column second, and optionally a color column.
Macros are substituted into SQL and markdown before the query is sent. Substituted values have single quotes escaped.
| Macro | Meaning |
|---|---|
$from, $to | current time range (ISO 8601) |
$name | value of variable cell name |
$name.column | a column of a multi-column combobox value |
$cell[N].column | row N of an upstream cell's result |
$cell.selected.column | selected row of an upstream table, chart, or bar chart (stackedbar) with selectionMode: "single" (map cells also publish a selection) |
$order_by | sort column of a table cell |
$me.email, $me.name, $me.sub | the viewer (not an authorization mechanism) |
Cells run in order and stop at the first error, so put variable cells above the cells that use them. Results of each cell are available to later cells under the cell name.
managed_by on an existing screen: the tools leave it untouched.create_folder first when needed).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub madesroches/micromegas --plugin micromegas2 skills in this plugin
Other plugins' skills for the same job