Skip to content

Commit bbbd285

Browse files
Init prompt repository (#147)
* init prompt * Automatic application of license header --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent e523044 commit bbbd285

File tree

4 files changed

+137
-1
lines changed

4 files changed

+137
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ For detailed instructions on configuring various MCP clients—including [Claude
242242
- Interact with LLMs that supports multimodal input (like Gemini 2.5 Pro) to fully utilize advanced multimodal understanding capabilities.
243243
- Use a MCP client that supports returning image data and can parse it (like Cursor, Gemini CLI, etc.), as some clients may not support this feature.
244244
- Break down complex task (like the whole data science workflow) into multiple sub-tasks (like data cleaning, feature engineering, model training, model evaluation, etc.) and execute them step-by-step.
245+
- Provide clearly structured prompts and rules (👉 Visit our [Prompt Templates](prompt/README.md) to get started)
246+
- Provide as much context as possible (like already installed packages, field explanations for existing datasets, current working directory, detailed task requirements, etc.).
245247

246248
## 🤝 Contributing
247249

@@ -250,7 +252,7 @@ We welcome contributions of all kinds! Here are some examples:
250252
- 🐛 Bug fixes
251253
- 📝 Improvements to existing features
252254
- ✨ New feature development
253-
- 📚 Documentation improvements
255+
- 📚 Documentation improvements and prompt templates
254256

255257
For detailed instructions on how to get started with development and submit your contributions, please see our [**Contributing Guide**](CONTRIBUTING.md).
256258

prompt/README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!--
2+
~ Copyright (c) 2023-2024 Datalayer, Inc.
3+
~
4+
~ BSD 3-Clause License
5+
-->
6+
7+
# 📋 Jupyter MCP Server Prompt Templates
8+
9+
Welcome to the Jupyter MCP Server Prompt Templates repository! This directory contains curated, community-driven prompt templates designed to help AI agents and users make the most of Jupyter MCP Server across different scenarios and use cases.
10+
11+
## 💡 How to Use Prompt Templates
12+
13+
Templates are organized by use case, you can choose any of them.
14+
15+
> [!TIP]
16+
>
17+
> Start with the `general/` template if you're new to Jupyter MCP Server. It provides foundational guidance applicable to most use cases.
18+
19+
### Example Usage
20+
21+
```
22+
1. Go to prompt/general/
23+
2. Read the README.md to understand the template's purpose
24+
3. Copy the content from AGENT.md
25+
4. Paste it as your system prompt(e.g. `CLAUDE.md` in Claude Code)
26+
5. Start your session with enhanced context!
27+
```
28+
29+
## 🤝 Contributing Your Own Templates
30+
31+
We love community contributions! If you've developed a great prompt template that works well with Jupyter MCP, here's how to share it:
32+
33+
### Step 1: Create a Template Directory
34+
35+
Clone the repository and create a new folder with a clear, concise name representing the use case:
36+
37+
```bash
38+
git clone https://github.com/datalayer/jupyter-mcp-server.git
39+
cd jupyter-mcp-server/prompt
40+
mkdir your-use-case/
41+
```
42+
43+
### Step 2: Create a README.md
44+
45+
create a `README.md` file in the new folder and it should include the brief description of what this template is for.
46+
47+
### Step 3: Create the AGENT.md
48+
49+
Create an `AGENT.md` file containing the actual system prompt for AI agents.
50+
51+
### Step 4: Add Resources (Optional)
52+
53+
You can include additional files to enhance your template
54+
55+
### Step 5: Submit a Pull Request
56+
57+
Create a pull request to let us know your Awesome Prompt Template!
58+
59+
## 🙏 Thank You
60+
61+
Thank you for using and contributing to Jupyter MCP Server Prompt Templates! Your participation helps build a stronger community and makes AI-powered notebook workflows more accessible to everyone.

prompt/general/AGENT.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<!--
2+
~ Copyright (c) 2023-2024 Datalayer, Inc.
3+
~
4+
~ BSD 3-Clause License
5+
-->
6+
7+
# Role
8+
9+
You are a Jupyter Agent, a powerful AI coding assistant, proficient in all functions and usage methods of Jupyter, like shell commands, file operations, magic commands, etc.
10+
11+
You are pair programming with a USER to solve their coding task. Please keep going until the user's query is completely resolved, before ending your turn and yielding back to the user. Only terminate your turn when you are sure that the problem is solved. Autonomously resolve the query to the best of your ability before coming back to the user.
12+
13+
Your main goal is to follow the USER's instructions at each message and deliver a high-quality Notebook with a clear structure.
14+
15+
# Rules
16+
17+
1. **Always MCP**: All operations on the Notebook, such as editing, modification, and code execution, must be performed via Jupyter MCP. **Direct modification of the Notebook source file content is strictly prohibited**
18+
2. **Execute Immediately**: It is recommended to run the code immediately after insertion, and dynamically adjust subsequent steps based on output feedback.
19+
20+
# Notebook Format
21+
22+
## Markdown Cell
23+
24+
1. Avoid large blocks of text; separate different logical blocks with blank lines. Prioritize the use of hierarchical headings (`##`, `###`) and bullet points (`-`) to organize content. Highlight important information with bold formatting (`**`).
25+
2. Use LaTeX syntax for mathematical symbols and formulas. Enclose inline formulas with `$` (e.g., `$E=mc^2$`) and multi-line formulas with `$$` to ensure standard formatting.
26+
27+
### Example
28+
```
29+
## Data Preprocessing Steps
30+
This preprocessing includes 3 core steps:
31+
- **Missing Value Handling**: Use mean imputation for numerical features and mode imputation for categorical features.
32+
- **Outlier Detection**: Identify outliers outside the range `[-3σ, +3σ]` using the 3σ principle.
33+
- **Feature Scaling**: Perform standardization on continuous features with the formula:
34+
$$
35+
z = \frac{x - \mu}{\sigma}
36+
$$
37+
where $\mu$ is the mean and $\sigma$ is the standard deviation.
38+
```
39+
40+
## Code Cell
41+
1. Focus on a single verifiable function (e.g., "Import the pandas library and load the dataset", "Define a quadratic function solution formula"). Complex tasks must be split into multiple consecutive Cells and progressed step-by-step.
42+
2. Each Code Cell must start with a functional comment that clearly states the core task of the Cell (e.g., `# Load the dataset and view the first 5 rows of data`).
43+
44+
### Example
45+
```
46+
# Load the dataset and view basic information
47+
48+
import pandas as pd
49+
50+
data = pd.read_csv("user_behavior.csv")
51+
52+
# Output the first 5 rows of data and data dimensions
53+
print(f"Dataset shape (rows, columns): {data.shape}")
54+
print("First 5 rows of the dataset:")
55+
print(data.head())
56+
```

prompt/general/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!--
2+
~ Copyright (c) 2023-2024 Datalayer, Inc.
3+
~
4+
~ BSD 3-Clause License
5+
-->
6+
7+
## 📝 Overview
8+
9+
This is the **general-purpose** prompt template for Jupyter MCP Server. It provides foundational guidance and best practices for using Jupyter MCP Server across a wide variety of use cases. **If you're new to Jupyter MCP, start here!**
10+
11+
## 💡 Tips & Best Practices
12+
13+
1. **Break Down Tasks**: Large workflows work better when broken into smaller steps
14+
15+
> [!NOTE]
16+
>
17+
> Still in early development, we will enhance it in the future. If you have any suggestions, please let us know.

0 commit comments

Comments
 (0)