From stackql-skills
Create a StackQL Jupyter notebook using the pystackql magic commands. Generates a complete notebook with setup, provider pulls, auth, queries, and optional visualizations from a description or provider resource target.
How this skill is triggered — by the user, by Claude, or both
Slash command
/stackql-skills:notebookThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are helping the user create a Jupyter notebook that uses StackQL to query cloud and SaaS resources via the `pystackql` magic commands.
You are helping the user create a Jupyter notebook that uses StackQL to query cloud and SaaS resources via the pystackql magic commands.
Input: $@
Follow these steps in order.
Parse the input to determine:
--server flag is present (use server mode instead of local binary)If the input is vague, ask:
Check if StackQL is installed and the provider is pulled:
command -v stackql
stackql exec "SHOW PROVIDERS;" --output json
If needed, pull the provider:
stackql exec "REGISTRY PULL <provider>;"
Get the resource schema to inform the notebook queries:
stackql exec "SHOW SERVICES IN <provider>;" --output json
stackql exec "SHOW RESOURCES IN <provider>.<service>;" --output json
stackql exec "DESCRIBE <provider>.<service>.<resource>;" --output json
stackql exec "SHOW METHODS IN <provider>.<service>.<resource>;" --output json
Use this to understand what fields are available and what WHERE clause parameters are required.
Ask the user where to save the notebook, or use a sensible default based on the topic:
<descriptive-name>.ipynb
Create the notebook with cells following this structure. Use the NotebookEdit tool to create and populate the notebook.
Follow these rules for all notebook cells:
---, ***, ___) or <hr/> tags<div>, <link>, <script> must use %md-sandbox type%md-sandbox cells (no classes or <style> elements)# <Descriptive Notebook Title>
<Brief description of what this notebook does.>
For local mode (default):
%load_ext pystackql.magic
For server mode (--server flag):
%load_ext pystackql.magics
%stackql registry pull <provider>
One line per provider if multiple are needed.
Define Python variables for parameterized queries:
project = "your-project-id"
region = "us-central1"
Include all required WHERE clause parameters discovered in Step 2. Use sensible placeholder values and add comments telling the user to update them.
For each query/analysis, create a pair of cells:
Markdown cell with a section heading:
## <Section Title>
<Brief description of what this query does.>
Code cell with the StackQL query:
For single-line queries:
%stackql SELECT name, status FROM <provider>.<service>.<resource> WHERE <required_params>
For multi-line queries:
%%stackql
SELECT
name,
status,
<other_fields>
FROM <provider>.<service>.<resource>
WHERE <required_param> = '$variable'
ORDER BY name
Where results are suitable for visualization, add a code cell after the query:
Simple bar chart:
stackql_df.plot(kind='bar', x='name', y='count', title='<Chart Title>');
Custom matplotlib:
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(10, 6))
ax.bar(stackql_df['<x_col>'], stackql_df['<y_col>'])
ax.set_xlabel('<X Label>')
ax.set_ylabel('<Y Label>')
ax.set_title('<Chart Title>')
plt.xticks(rotation=45, ha='right')
plt.tight_layout()
plt.show()
## Next Steps
- Modify the queries above to explore different resources
- Use `/stackql-skills:notebook-cell` to add more queries
- Use `/stackql-skills:query` for ad-hoc queries outside the notebook
Use $variable in queries where the value comes from a Python variable:
WHERE project = '$project' AND zone = '$zone'
When the query needs a literal $ (e.g., JSON path expressions), use $$:
JSON_EXTRACT(Properties, '$$.BucketName')
stackql_df (pandas DataFrame)_ variable also references the last cell output (standard IPython)%%stackql --no-display to run a query without displaying the result%%stackql --csv-download to add a CSV download buttonProviders must be pulled before querying. Use line magic:
%stackql registry pull <provider>
For INSERT, DELETE, EXEC, and REGISTRY operations, the magic command routes these automatically to the correct execution method.
Tell the user:
jupyter notebook <path> or open in VS Codepystackql must be installed: pip install pystackqlnpx claudepluginhub stackql/stackql-skills --plugin stackql-skillsProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.