marimo-development
Expert guidance for creating and working with marimo notebooks - reactive Python notebooks that can be executed as scripts and deployed as apps. Use when the user asks to create marimo notebooks, convert Jupyter notebooks to marimo, build interactive dashboards or data apps with marimo, work with marimo's reactive programming model, debug marimo notebooks, or needs help with marimo-specific features (cells, UI elements, reactivity, SQL integration, deploying apps, etc.).
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o marimo-development.zip https://jpskill.com/download/17990.zip && unzip -o marimo-development.zip && rm marimo-development.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17990.zip -OutFile "$d\marimo-development.zip"; Expand-Archive "$d\marimo-development.zip" -DestinationPath $d -Force; ri "$d\marimo-development.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
marimo-development.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
marimo-developmentフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 85
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Marimo の開発
marimo のインタラクティブなプログラミング環境で、リアクティブな Python ノートブックを作成します。
コアワークフロー
- 基本から始める:
references/core-concepts.mdを読んでください - marimo のセル構造、リアクティビティモデル、UI 要素、および重要な例が含まれています - 一般的なタスクのレシピを使用する: コードスニペットについては
references/recipes.mdを確認してください - API ドキュメントを参照する: 特定の関数の詳細については
references/api/を参照してください - 問題をトラブルシューティングする:
references/faq.mdおよびreferences/troubleshooting.mdを参照してください
Marimo の主要な概念
セル構造
すべての marimo セルは、次の構造に従います。
@app.cell
def _():
# ここにコードを記述します
return
セルを編集するときは、関数内のコードのみを変更してください。marimo はパラメータと戻り値を自動的に処理します。
リアクティビティのルール
- 自動実行: 変数が変更されると、それを使用するセルは自動的に再実行されます
- 再宣言の禁止: 変数はセル間で再宣言できません
- DAG 構造: セルは有向非巡回グラフ (循環依存関係なし) を形成します
- 最後の式を表示: セル内の最後の式が自動的に表示されます
- UI のリアクティビティ:
.valueを介してアクセスされる UI 要素の値は、自動更新をトリガーします - ローカル変数:
_で始まる変数 (例:_temp) は、セルに対してローカルです
インポートパターン
常に最初のセルで marimo をインポートします。
@app.cell
def _():
import marimo as mo
# その他のインポート
return
一般的なタスク
インタラクティブな UI の作成
# 1つのセルで UI 要素を作成する
@app.cell
def _():
slider = mo.ui.slider(0, 100, value=50, label="Value")
slider
return
# 別のセルでその値を使用する
@app.cell
def _():
result = slider.value * 2
mo.md(f"Double the value: {result}")
return
データの操作
# データをロードして表示する
@app.cell
def _():
import polars as pl
df = pl.read_csv("data.csv")
df # 自動的にテーブルとして表示されます
return
# インタラクティブなデータ探索
@app.cell
def _():
mo.ui.data_explorer(df)
return
DuckDB を使用した SQL
@app.cell
def _():
# marimo には DuckDB のサポートが組み込まれています
result = mo.sql(f"""
SELECT * FROM df WHERE column > 100
""")
return
レイアウト
@app.cell
def _():
# 水平スタック
mo.hstack([element1, element2, element3])
# 垂直スタック
mo.vstack([top, middle, bottom])
# タブ
mo.tabs({"Tab 1": content1, "Tab 2": content2})
return
可視化のベストプラクティス
- matplotlib: 最後の式として
plt.gca()を使用します (plt.show()ではありません) - plotly: 図オブジェクトを直接返します
- altair: チャートオブジェクトを返します。ツールチップを追加します。polars のデータフレームを直接受け入れます
リファレンスドキュメント
references/NAVIGATION.md を使用して、完全なドキュメント構造を理解してください。主要なリファレンス:
必須の読み物
- core-concepts.md - 基本と例については、ここから始めてください
- recipes.md - 一般的なタスクのコードスニペット
詳細なガイド
- reactivity.md - リアクティブな実行の詳細
- interactivity.md - インタラクティブな UI の構築
- best_practices.md - marimo のコーディング標準
データの操作
- working_with_data/sql.md - SQL と DuckDB の統合
- working_with_data/dataframes.md - pandas、polars など
- working_with_data/plotting.md - 可視化ライブラリ
デプロイメント
- apps.md - インタラクティブな Web アプリとしてデプロイする
- scripts.md - CLI 引数を使用して Python スクリプトとして実行する
API リファレンス
- api/inputs/ - すべての UI 要素 (slider、dropdown、button、table など)
- api/layouts/ - レイアウトコンポーネント (tabs、accordion、sidebar など)
- api/control_flow.md - セルの実行制御
- api/state.md - 状態管理
- api/caching.md - パフォーマンスの最適化
トラブルシューティング
- faq.md - よくある質問と解決策
- troubleshooting.md - エラーの修正
- debugging.md - デバッグ手法
よくある落とし穴
- 循環依存関係: サイクルを削除するようにコードを再編成します
- UI 値へのアクセス: UI 要素が定義されている同じセル内で
.valueにアクセスできません - 変数の再宣言: 各変数は、すべてのセルで 1 回だけ定義できます
- 可視化が表示されない: 可視化オブジェクトが最後の式であることを確認してください
- Global キーワード:
globalは絶対に使用しないでください - marimo の実行モデルに違反します
ノートブックを作成した後
marimo check --fix を実行して、一般的なフォーマットの問題を自動的にキャッチして修正し、落とし穴を検出します。
クイックリファレンス: 最もよく使用される UI 要素
mo.ui.slider(start, stop, value=None, label=None)
mo.ui.dropdown(options, value=None, label=None)
mo.ui.text(value='', label=None)
mo.ui.button(value=None, kind='primary')
mo.ui.checkbox(label='', value=False)
mo.ui.table(data, sortable=True, filterable=True)
mo.ui.data_explorer(df) # インタラクティブなデータフレームエクスプローラ
mo.ui.dataframe(df) # 編集可能なデータフレーム
mo.ui.form(element, label='') # 要素をフォームでラップする
mo.ui.array(elements) # UI 要素の配列
完全なリストについては、references/api/inputs/index.md を参照してください。
クイックリファレンス: レイアウト関数
mo.md(text) # Markdown を表示する
mo.hstack(elements) # 水平レイアウト
mo.vstack(elements) # 垂直レイアウト
mo.tabs(dict) # タブ付きインターフェース
mo.stop(predicate, output=None) # 条件付き実行
mo.output.append(value) # 出力に追加する
mo.output.replace(value) # 出力を置き換える
すべてのレイアウトオプションについては、references/api/layouts/index.md を参照してください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Marimo Development
Create reactive Python notebooks with marimo's interactive programming environment.
Core Workflow
- Start with fundamentals: Read
references/core-concepts.md- contains marimo's cell structure, reactivity model, UI elements, and essential examples - Use recipes for common tasks: Check
references/recipes.mdfor code snippets - Refer to API docs: Navigate
references/api/for specific function details - Troubleshoot issues: See
references/faq.mdandreferences/troubleshooting.md
Key Marimo Concepts
Cell Structure
Every marimo cell follows this structure:
@app.cell
def _():
# Your code here
return
When editing cells, only modify the code inside the function - marimo handles parameters and returns automatically.
Reactivity Rules
- Automatic execution: When a variable changes, cells using it automatically re-run
- No redeclaration: Variables cannot be redeclared across cells
- DAG structure: Cells form a directed acyclic graph (no circular dependencies)
- Last expression displays: The final expression in a cell is automatically shown
- UI reactivity: UI element values accessed via
.valuetrigger automatic updates - Local variables: Variables prefixed with
_(e.g.,_temp) are local to the cell
Import Pattern
Always import marimo in the first cell:
@app.cell
def _():
import marimo as mo
# other imports
return
Common Tasks
Creating Interactive UIs
# Create UI element in one cell
@app.cell
def _():
slider = mo.ui.slider(0, 100, value=50, label="Value")
slider
return
# Use its value in another cell
@app.cell
def _():
result = slider.value * 2
mo.md(f"Double the value: {result}")
return
Working with Data
# Load and display data
@app.cell
def _():
import polars as pl
df = pl.read_csv("data.csv")
df # Automatically displays as table
return
# Interactive data exploration
@app.cell
def _():
mo.ui.data_explorer(df)
return
SQL with DuckDB
@app.cell
def _():
# marimo has built-in DuckDB support
result = mo.sql(f"""
SELECT * FROM df WHERE column > 100
""")
return
Layouts
@app.cell
def _():
# Horizontal stack
mo.hstack([element1, element2, element3])
# Vertical stack
mo.vstack([top, middle, bottom])
# Tabs
mo.tabs({"Tab 1": content1, "Tab 2": content2})
return
Visualization Best Practices
- matplotlib: Use
plt.gca()as last expression (notplt.show()) - plotly: Return the figure object directly
- altair: Return the chart object; add tooltips; accepts polars dataframes directly
Reference Documentation
Use references/NAVIGATION.md to understand the complete documentation structure. Key references:
Essential Reading
- core-concepts.md - Start here for fundamentals and examples
- recipes.md - Code snippets for common tasks
Detailed Guides
- reactivity.md - Deep dive into reactive execution
- interactivity.md - Building interactive UIs
- best_practices.md - Coding standards for marimo
Working with Data
- working_with_data/sql.md - SQL and DuckDB integration
- working_with_data/dataframes.md - pandas, polars, etc.
- working_with_data/plotting.md - Visualization libraries
Deployment
- apps.md - Deploy as interactive web apps
- scripts.md - Run as Python scripts with CLI args
API Reference
- api/inputs/ - All UI elements (slider, dropdown, button, table, etc.)
- api/layouts/ - Layout components (tabs, accordion, sidebar, etc.)
- api/control_flow.md - Cell execution control
- api/state.md - State management
- api/caching.md - Performance optimization
Troubleshooting
- faq.md - Common questions and solutions
- troubleshooting.md - Error fixes
- debugging.md - Debugging techniques
Common Pitfalls
- Circular dependencies: Reorganize code to remove cycles
- UI value access: Can't access
.valuein the same cell where UI element is defined - Variable redeclaration: Each variable can only be defined once across all cells
- Visualization not showing: Ensure visualization object is the last expression
- Global keyword: Never use
global- violates marimo's execution model
After Creating a Notebook
Run marimo check --fix to automatically catch and fix common formatting issues and detect pitfalls.
Quick Reference: Most Used UI Elements
mo.ui.slider(start, stop, value=None, label=None)
mo.ui.dropdown(options, value=None, label=None)
mo.ui.text(value='', label=None)
mo.ui.button(value=None, kind='primary')
mo.ui.checkbox(label='', value=False)
mo.ui.table(data, sortable=True, filterable=True)
mo.ui.data_explorer(df) # Interactive dataframe explorer
mo.ui.dataframe(df) # Editable dataframe
mo.ui.form(element, label='') # Wrap elements in a form
mo.ui.array(elements) # Array of UI elements
See references/api/inputs/index.md for the complete list.
Quick Reference: Layout Functions
mo.md(text) # Display markdown
mo.hstack(elements) # Horizontal layout
mo.vstack(elements) # Vertical layout
mo.tabs(dict) # Tabbed interface
mo.stop(predicate, output=None) # Conditional execution
mo.output.append(value) # Append to output
mo.output.replace(value) # Replace output
See references/api/layouts/index.md for all layout options.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (6,068 bytes)
- 📎 references/api/app.md (133 bytes)
- 📎 references/api/caching.md (11,808 bytes)
- 📎 references/api/cell.md (24 bytes)
- 📎 references/api/cli_args.md (1,899 bytes)
- 📎 references/api/control_flow.md (636 bytes)
- 📎 references/api/diagrams.md (307 bytes)
- 📎 references/api/html.md (115 bytes)
- 📎 references/api/index.md (2,132 bytes)
- 📎 references/api/inputs/anywidget.md (3,470 bytes)
- 📎 references/api/inputs/array.md (294 bytes)
- 📎 references/api/inputs/batch.md (334 bytes)
- 📎 references/api/inputs/button.md (269 bytes)
- 📎 references/api/inputs/chat.md (9,006 bytes)
- 📎 references/api/inputs/checkbox.md (249 bytes)
- 📎 references/api/inputs/code_editor.md (109 bytes)
- 📎 references/api/inputs/data_editor.md (126 bytes)
- 📎 references/api/inputs/data_explorer.md (1,518 bytes)
- 📎 references/api/inputs/dataframe.md (1,511 bytes)
- 📎 references/api/inputs/dates.md (877 bytes)
- 📎 references/api/inputs/dictionary.md (556 bytes)
- 📎 references/api/inputs/dropdown.md (655 bytes)
- 📎 references/api/inputs/file_browser.md (166 bytes)
- 📎 references/api/inputs/file.md (583 bytes)
- 📎 references/api/inputs/form.md (255 bytes)
- 📎 references/api/inputs/index.md (2,741 bytes)
- 📎 references/api/inputs/microphone.md (252 bytes)
- 📎 references/api/inputs/multiselect.md (311 bytes)
- 📎 references/api/inputs/nav_menu.md (1,148 bytes)
- 📎 references/api/inputs/number.md (253 bytes)
- 📎 references/api/inputs/radio.md (275 bytes)
- 📎 references/api/inputs/range_slider.md (312 bytes)
- 📎 references/api/inputs/refresh.md (273 bytes)
- 📎 references/api/inputs/run_button.md (106 bytes)
- 📎 references/api/inputs/slider.md (614 bytes)
- 📎 references/api/inputs/switch.md (243 bytes)
- 📎 references/api/inputs/table.md (1,575 bytes)
- 📎 references/api/inputs/tabs.md (119 bytes)
- 📎 references/api/inputs/text_area.md (103 bytes)
- 📎 references/api/inputs/text.md (248 bytes)
- 📎 references/api/layouts/accordion.md (137 bytes)
- 📎 references/api/layouts/callout.md (452 bytes)
- 📎 references/api/layouts/carousel.md (350 bytes)
- 📎 references/api/layouts/index.md (1,783 bytes)
- 📎 references/api/layouts/json.md (204 bytes)
- 📎 references/api/layouts/justify.md (64 bytes)
- 📎 references/api/layouts/lazy.md (366 bytes)
- 📎 references/api/layouts/outline.md (253 bytes)
- 📎 references/api/layouts/plain.md (26 bytes)
- 📎 references/api/layouts/routes.md (950 bytes)
- 📎 references/api/layouts/sidebar.md (704 bytes)
- 📎 references/api/layouts/stacks.md (1,396 bytes)
- 📎 references/api/layouts/stat.md (648 bytes)
- 📎 references/api/layouts/tree.md (232 bytes)
- 📎 references/api/markdown.md (1,597 bytes)
- 📎 references/api/media/audio.md (232 bytes)
- 📎 references/api/media/download.md (103 bytes)
- 📎 references/api/media/image_compare.md (387 bytes)
- 📎 references/api/media/image.md (266 bytes)
- 📎 references/api/media/index.md (607 bytes)
- 📎 references/api/media/pdf.md (22 bytes)
- 📎 references/api/media/plain_text.md (36 bytes)
- 📎 references/api/media/video.md (261 bytes)
- 📎 references/api/miscellaneous.md (547 bytes)
- 📎 references/api/outputs.md (1,936 bytes)
- 📎 references/api/plotting.md (4,198 bytes)
- 📎 references/api/query_params.md (2,037 bytes)
- 📎 references/api/state.md (1,798 bytes)
- 📎 references/api/status.md (535 bytes)
- 📎 references/api/watch.md (61 bytes)
- 📎 references/apps.md (3,117 bytes)
- 📎 references/best_practices.md (2,658 bytes)
- 📎 references/core-concepts.md (9,981 bytes)
- 📎 references/debugging.md (6,639 bytes)
- 📎 references/faq.md (17,161 bytes)
- 📎 references/interactivity.md (3,744 bytes)
- 📎 references/NAVIGATION.md (3,011 bytes)
- 📎 references/reactivity.md (8,110 bytes)
- 📎 references/recipes.md (15,344 bytes)
- 📎 references/scripts.md (2,012 bytes)
- 📎 references/troubleshooting.md (8,046 bytes)
- 📎 references/working_with_data/dataframes.md (10,372 bytes)
- 📎 references/working_with_data/index.md (488 bytes)
- 📎 references/working_with_data/plotting.md (10,167 bytes)
- 📎 references/working_with_data/sql.md (15,201 bytes)