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
View on GitHubSelect agents to install to:
npx add-skill https://github.com/dakesan/marimo-cc/blob/main/skills/marimo-editor/SKILL.md -a claude-code --skill marimo-editorInstallation paths:
.claude/skills/marimo-editor/# 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