marimo-editor
This skill should be used when working with marimo reactive notebooks for data science and analytics. Triggers include: - Creating new marimo notebooks - Converting Jupyter notebooks to marimo - Editing existing marimo notebooks - Implementing reactive patterns and UI components - Building interactive data visualizations with marimo
What this skill does
# Marimo Notebook Assistant
This skill provides specialized guidance for creating data science notebooks using marimo's reactive programming model. Focus on creating clear, efficient, and reproducible data analysis workflows.
## Core Capabilities
- Data science and analytics using marimo notebooks
- Complete, runnable code that follows best practices
- Reproducibility and clear documentation
- Interactive data visualizations and analysis
- Understanding of marimo's reactive programming model
## Marimo Fundamentals
Marimo is a reactive notebook that differs from traditional notebooks in key ways:
- Cells execute automatically when their dependencies change
- Variables cannot be redeclared across cells
- The notebook forms a directed acyclic graph (DAG)
- The last expression in a cell is automatically displayed
- UI elements are reactive and update the notebook automatically
## Code Requirements
1. All code must be complete and runnable
2. Follow consistent coding style throughout
3. Include descriptive variable names and helpful comments
4. Import all modules in the first cell, always including `import marimo as mo`
5. Never redeclare variables across cells
6. Ensure no cycles in notebook dependency graph
7. The last expression in a cell is automatically displayed, just like in Jupyter notebooks
8. Don't include comments in markdown cells
9. Don't include comments in SQL cells
## Reactivity
Marimo's reactivity means:
- When a variable changes, all cells that use that variable automatically re-execute
- UI elements trigger updates when their values change without explicit callbacks
- UI element values are accessed through `.value` attribute
- Cannot access a UI element's value in the same cell where it's defined
## Best Practices
### Data Handling
- Use pandas for data manipulation
- Implement proper data validation
- Handle missing values appropriately
- Use efficient data structures
- A variable in the last expression of a cell is automatically displayed as a table
### Visualization
- For matplotlib: use `plt.gca()` as the last expression instead of `plt.show()`
- For plotly: return the figure object directly
- For altair: return the chart object directly
- Include proper labels, titles, and color schemes
- Make visualizations interactive where appropriate
### UI Elements
- Access UI element values with `.value` attribute (e.g., `slider.value`)
- Create UI elements in one cell and reference them in later cells
- Create intuitive layouts with `mo.hstack()`, `mo.vstack()`, and `mo.tabs()`
- Prefer reactive updates over callbacks (marimo handles reactivity automatically)
- Group related UI elements for better organization
### Data Sources
- Prefer GitHub-hosted datasets (e.g., raw.githubusercontent.com)
- Use CORS proxy for external URLs: https://corsproxy.marimo.app/<url>
- Implement proper error handling for data loading
- Consider using `vega_datasets` for common example datasets
### SQL
- When writing duckdb, prefer using marimo's SQL cells, which start with `_df = mo.sql(query)`
- See the SQL with duckdb example for an example on how to do this
- Don't add comments in cells that use `mo.sql()`
- Consider using `vega_datasets` for common example datasets
## Troubleshooting
Common issues and solutions:
- Circular dependencies: Reorganize code to remove cycles in the dependency graph
- UI element value access: Move access to a separate cell from definition
- Visualization not showing: Ensure the visualization object is the last expression
## Available UI Elements
* `mo.ui.altair_chart(altair_chart)`
* `mo.ui.button(value=None, kind='primary')`
* `mo.ui.run_button(label=None, tooltip=None, kind='primary')`
* `mo.ui.checkbox(label='', value=False)`
* `mo.ui.date(value=None, label=None, full_width=False)`
* `mo.ui.dropdown(options, value=None, label=None, full_width=False)`
* `mo.ui.file(label='', multiple=False, full_width=False)`
* `mo.ui.number(value=None, label=None, full_width=False)`
* `mo.ui.radio(options, value=None, label=None, full_width=False)`
* `mo.ui.refresh(options: List[str], default_interval: str)`
* `mo.ui.slider(start, stop, value=None, label=None, full_width=False, step=None)`
* `mo.ui.range_slider(start, stop, value=None, label=None, full_width=False, step=None)`
* `mo.ui.table(data, columns=None, on_select=None, sortable=True, filterable=True)`
* `mo.ui.text(value='', label=None, full_width=False)`
* `mo.ui.text_area(value='', label=None, full_width=False)`
* `mo.ui.data_explorer(df)`
* `mo.ui.dataframe(df)`
* `mo.ui.plotly(plotly_figure)`
* `mo.ui.tabs(elements: dict[str, mo.ui.Element])`
* `mo.ui.array(elements: list[mo.ui.Element])`
* `mo.ui.form(element: mo.ui.Element, label='', bordered=True)`
## Layout and Utility Functions
* `mo.md(text)` - display markdown
* `mo.stop(predicate, output=None)` - stop execution conditionally
* `mo.Html(html)` - display HTML
* `mo.image(image)` - display an image
* `mo.hstack(elements)` - stack elements horizontally
* `mo.vstack(elements)` - stack elements vertically
* `mo.tabs(elements)` - create a tabbed interface
## Examples
### Basic UI with Reactivity
```python
# Cell 1
import marimo as mo
import matplotlib.pyplot as plt
import numpy as np
# Cell 2
# Create a slider and display it
n_points = mo.ui.slider(10, 100, value=50, label="Number of points")
n_points # Display the slider
# Cell 3
# Generate random data based on slider value
# This cell automatically re-executes when n_points.value changes
x = np.random.rand(n_points.value)
y = np.random.rand(n_points.value)
plt.figure(figsize=(8, 6))
plt.scatter(x, y, alpha=0.7)
plt.title(f"Scatter plot with {n_points.value} points")
plt.xlabel("X axis")
plt.ylabel("Y axis")
plt.gca() # Return the current axes to display the plot
```
### Data Explorer
```python
# Cell 1
import marimo as mo
import pandas as pd
from vega_datasets import data
# Cell 2
# Load and display dataset with interactive explorer
cars_df = data.cars()
mo.ui.data_explorer(cars_df)
```
### Multiple UI Elements
```python
# Cell 1
import marimo as mo
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# Cell 2
# Load dataset
iris = sns.load_dataset('iris')
# Cell 3
# Create UI elements
species_selector = mo.ui.dropdown(
options=["All"] + iris["species"].unique().tolist(),
value="All",
label="Species"
)
x_feature = mo.ui.dropdown(
options=iris.select_dtypes('number').columns.tolist(),
value="sepal_length",
label="X Feature"
)
y_feature = mo.ui.dropdown(
options=iris.select_dtypes('number').columns.tolist(),
value="sepal_width",
label="Y Feature"
)
# Display UI elements in a horizontal stack
mo.hstack([species_selector, x_feature, y_feature])
# Cell 4
# Filter data based on selection
filtered_data = iris if species_selector.value == "All" else iris[iris["species"] == species_selector.value]
# Create visualization based on UI selections
plt.figure(figsize=(10, 6))
sns.scatterplot(
data=filtered_data,
x=x_feature.value,
y=y_feature.value,
hue="species"
)
plt.title(f"{y_feature.value} vs {x_feature.value}")
plt.gca()
```
### Interactive Chart with Altair
```python
# Cell 1
import marimo as mo
import altair as alt
import pandas as pd
# Cell 2
# Load dataset
cars_df = pd.read_csv('https://raw.githubusercontent.com/vega/vega-datasets/master/data/cars.json')
_chart = alt.Chart(cars_df).mark_point().encode(
x='Horsepower',
y='Miles_per_Gallon',
color='Origin',
)
chart = mo.ui.altair_chart(_chart)
chart
# Cell 3
# Display the selection
chart.value
```
### Run Button Example
```python
# Cell 1
import marimo as mo
# Cell 2
first_button = mo.ui.run_button(label="Option 1")
second_button = mo.ui.run_button(label="Option 2")
[first_button, second_button]
# Cell 3
if first_button.value:
print("You chose option 1!")
elif second_button.value:
print("You chose option 2!")
else:
print("Click a button!")
```
### SQL with DuckDB
```python
# Cell 1
imporRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.