malloy-notebook-chat
Skill116 starsChanged 2 months agoMITView on GitHub
Steps to follow when the chat is bound to a notebook or saved report. The notebook's cells are the agent's primary context, answer from it, run its queries, and only reach for get_context when the user asks about something outside it.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- fix-scan-findingSkill
- publisher-releaseSkill
- eval-answerSkill
- eval-diagnoseSkill
- eval-importSkill
- eval-improveSkill
- eval-judgeSkill
- eval-loopSkill
- eval-reportSkill
- malloy-analysis-pitfallsSkill
- malloy-analysis-reportSkill
- malloy-analysisSkill
- malloy-analyzeSkill
- malloy-chartsSkill
- malloy-dashboardsSkill
- malloy-data-app-designSkill
- malloy-debugSkill
- malloy-defineSkill
- malloy-discoverSkill
- malloy-documentSkill
- malloy-getting-startedSkill
- malloy-gotchas-modelingSkill
- malloy-gotchas-queriesSkill
- malloy-gotchas-renderingSkill
- malloy-html-data-app-embeddingSkill
- malloy-html-data-app-runtimeSkill
- malloy-html-data-appsSkill
- malloy-lookml-reviewSkill
- malloy-materializationSkill
- malloy-materialization-tuningSkill
- malloy-model-as-you-goSkill
- malloy-modelingSkill
- malloy-modelSkill
- malloy-notebooksSkill
- malloy-patternsSkill
- malloy-phrase-detectionSkill
- malloy-powerbi-reviewSkill
- malloy-publishSkill
- malloy-queriesSkill
- malloy-reviewSkill
- malloy-scopeSkill
- malloySkill
- malloy-source-unreachableSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Start with a brief, natural acknowledgment that references the specific question: one sentence, varied wording.
- Very specific: line 20
If the question can be answered by a query already in the notebook, run that cell's query via execute_query (exact code, or a minor …
- Very specific: line 21
If the question asks for an analysis that is clearly NOT in the notebook (new source, different package, different domain), then, and only …
- Very specific: line 22
Do NOT call get_context as a default first step.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
Copyright (c) Credible Data Inc.
SPDX-License-Identifier: MIT
-->Notebook/Report Chat Workflow
Steps to follow when the user asks a question:
Tool names are written bare here -
get_context,execute_query,search_malloy_docs. The exact prefixed name depends on the host surface; match each against the tools you actually have.
- Interpret the user's question as being about the bound notebook/report unless they explicitly ask about something else. Pronouns and shorthand ("this", "it", "the notebook", "the report", "the data", "what's here", "summarize", "key insights", "findings", "anything interesting") all refer to the notebook above. Never respond with a clarifying question about what the user means when the referent is clearly this notebook.
- Start with a brief, natural acknowledgment that references the specific question: one sentence, varied wording.
- The notebook above IS your context. Its code cells define the queries the user cares about (for a notebook written as a tile layout, the cells are its tiles: each query tile is one code cell and each text tile one markdown cell). For any question:
- For broad requests like "summarize", "what are the key insights", or "tell me about this notebook", run the notebook's queries via
execute_queryand synthesize the findings across them. Do NOT ask the user to be more specific. - If the question can be answered by a query already in the notebook, run that cell's query via
execute_query(exact code, or a minor variation like adding a filter or changing a group_by). - If the question asks for an analysis that is clearly NOT in the notebook (new source, different package, different domain), then, and only then, call
get_contextto explore. - Do NOT call
get_contextas a default first step. The notebook already tells you what's available.
- Before writing or modifying a query, read the
malloy-queriesskill for syntax patterns. When you tweak a query (add awhere:clause, change agroup_by, etc.), do NOT add#(filter)annotations orgiven:declarations: both live on the source's model file and are inherited by this notebook automatically. Query-levelwhere:filtering inside a cell is fine; declaring a new runtime parameter is a model change, not a chat-time change. - Summarize insights from query results. Do not echo raw rows: the user sees them rendered.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

