Notebook cell
Generate and insert StackQL query cells into an existing Jupyter notebook. Creates a markdown heading cell and a %%stackql query cell, with optional visualization. Works with the pystackql magic extension.From its SKILL.md
npx -y skills add stackql/stackql-skills --skill notebook-cellAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.7 KB, 869 tokens by cl100k_base, as published. Nobody here has run it
You are helping the user add StackQL query cells to an existing Jupyter notebook that uses the pystackql magic extension.
Input: $@
Follow these steps in order.
Step 1 - Find the target notebook
Look for open or recently modified .ipynb files:
find . -name "*.ipynb" -not -path '*/.git/*' -not -path '*/.ipynb_checkpoints/*' 2>/dev/null
If multiple notebooks exist, check which ones already use pystackql:
grep -l "pystackql" *.ipynb 2>/dev/null
If there are multiple candidates, ask the user which notebook to add cells to.
If no notebook exists, suggest using /stackql-skills:notebook to create one first.
Step 2 - Read the existing notebook
Read the notebook to understand:
- Which magic extension is loaded (
pystackql.magicorpystackql.magics) - What providers have been pulled
- What Python variables are defined (these can be used in queries via
$variable) - How many cells exist (to determine insert position)
- What queries already exist (to avoid duplication)
Step 3 - Parse the request
Determine what the user wants:
- Raw SQL: the user provided a StackQL query directly
- Natural language: the user described what they want to query - generate the SQL
--vizflag: what visualization to add (bar,line,table, or auto-detect)--no-display: suppress query output display
If the input is natural language, use the existing notebook context (pulled providers, variables) to generate the appropriate query. If needed, discover the schema:
stackql exec "DESCRIBE <provider>.<service>.<resource>;" --output json
Step 4 - Generate the cells
Cell conventions
Follow these rules for all notebook cells:
- One heading per cell, placed at the top
- No horizontal rules (
---,***,___) or<hr/>tags - Use spacing and headings to separate sections, not horizontal rules
Create 2-3 cells to insert:
Markdown cell
## <Section Title>
<Brief description of what this query does.>
Query cell
For single-line queries:
%stackql <QUERY>
For multi-line queries:
%%stackql
SELECT
<fields>
FROM <provider>.<service>.<resource>
WHERE <params>
Options:
- Add
--no-displayto the%%stackqlline if the flag was passed - Add
--csv-downloadif the user wants export capability
Use $variable substitution for any values that match Python variables already defined in the notebook.
Use $$ to escape literal dollar signs in JSON path expressions.
Visualization cell (if --viz or auto-detected)
Bar chart (--viz bar):
stackql_df.plot(kind='bar', x='<x_col>', y='<y_col>', title='<Title>');
Line chart (--viz line):
stackql_df.plot(kind='line', x='<x_col>', y='<y_col>', title='<Title>');
Table (--viz table):
stackql_df
Auto-detect: If the result likely has a categorical column and a numeric column, suggest a bar chart. If it has a date/time column and a numeric column, suggest a line chart. Otherwise, just display as a table.
Step 5 - Insert the cells
Use the NotebookEdit tool to insert the cells at the end of the notebook (or at a user-specified position).
Step 6 - Report
Briefly confirm what was added:
- The query that was inserted
- The visualization type (if any)
- Remind the user to run the cells in order
- Note that
stackql_dfwill contain the query results as a pandas DataFrame
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most data analysis skills give in 869 tokens
Counted across 230 of the 242 authors here whose files we hold, read 2026-09-06
- Propose a regression test for each fixed bugin 16 of 230, across 12 files
- Name tests after the bug they preventin 14 of 230, across 10 files
- Test the API response shape, not the implementationin 14 of 230, across 10 files
- Run the test suite before any code reviewin 14 of 230, across 10 files
- Force sandbox mode in the test setupin 14 of 230, across 10 files
- Write regression tests only for bugs already foundin 14 of 230, across 10 files
- Assert sandbox and production paths return the same shapein 14 of 230, across 10 files
- Clear stale state when setting an errorin 13 of 230, across 9 files
- Keep the whole test suite under one secondin 10 of 230, across 6 files
- Run the build type check before code reviewin 10 of 230, across 6 files
- Use vectorized operations instead of row iterationin 9 of 230, across 6 files
- Start bar chart Y-axes at zeroin 8 of 230, across 7 files
Said here and by no other author read
- Find the target notebook among .ipynb files
- Ask the user which notebook when multiple candidates
- Read the notebook for providers, variables, and existing queries
- Generate SQL from natural language using notebook context
- Discover schema with stackql DESCRIBE if needed
- Create a markdown heading cell and a query cell
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.