Educational assistant for EEG connectivity metrics and hyperscanning analysis. Enforces project structure, typed Python standards, and notebook formatting conventions for workshop tutorials.
An educational coding assistant for creating and maintaining workshop materials on EEG hyperscanning and connectivity metrics analysis.
This skill helps maintain consistency across a series of educational Jupyter notebooks focused on hyperscanning (simultaneous EEG recording from multiple people) and connectivity metrics. It enforces strict formatting conventions, project structure, and coding standards for an academic workshop setting.
The workshop is organized into modules:
1. **Notebooks location:**
- Foundations: `01_foundations/` directory
- Connectivity metrics: `02_connectivity_metrics/` directory
- Organized by category (A, B, C, etc.)
2. **Naming convention:**
- Use prefixes: `A01_`, `A02_`, `B01_`, `B02_`, etc.
- Example: `A01_signal_generation.ipynb`
3. **Code organization:**
- Reusable functions go in `src/` directory
- Quick notebooks (`*_quick.ipynb`) import from `src/` instead of defining inline
4. **Templates:**
- Full notebooks follow `docs/NOTEBOOK_TEMPLATE.md`
- Quick notebooks follow `docs/NOTEBOOK_QUICK_TEMPLATE.md`
ALL Python code must be fully typed:
```python
from typing import Optional, Union, Tuple, Callable
import numpy as np
from numpy.typing import NDArray
def example_function(
data: NDArray[np.float64],
sampling_rate: int,
window_size: Optional[int] = None
) -> Tuple[NDArray[np.float64], NDArray[np.float64]]:
"""
Example function with complete type hints.
Parameters
----------
data : NDArray[np.float64]
Input signal data
sampling_rate : int
Sampling rate in Hz
window_size : Optional[int], default=None
Window size for analysis
Returns
-------
Tuple[NDArray[np.float64], NDArray[np.float64]]
Processed data and timestamps
"""
# Implementation
pass
```
**Type hint requirements:**
1. **PEP 8 compliance:**
- 4 spaces for indentation
- Maximum line length: 88 characters (Black formatter standard)
- Two blank lines between top-level definitions
2. **Documentation:**
- Use NumPy-style docstrings for all functions
- Include Parameters, Returns, and Examples sections
- Document exceptions with Raises section
3. **Code organization:**
- Functions longer than 20 lines should go in `src/` directory
- No hardcoded magic numbers — use named constants
- Extract reusable logic into helper functions
**Cell order must be EXACTLY:**
1. **Cell 1 — Header:**
```markdown
Duration: X min | Prerequisites: Y | Learning Objectives: Z
```
2. **Cell 2 — Table of Contents:**
```markdown
1. [Section Name](#section-1-section-name)
2. [Another Section](#section-2-another-section)
```
3. **Cell 3 — Imports (code cell):**
```python
import numpy as np
from colors import COLORS
```
4. **Cells 4+ — Content sections**
5. **Last 3 cells — Summary, Resources, Discussion:**
- Summary section
- External Resources section
- Discussion Questions section
**Always** import colors from the colors module:
```python
from colors import COLORS
```
**Valid color keys for signals:**
**Valid color keys for EEG frequency bands:**
**NEVER use these keys** (they don't exist):
**Example usage:**
```python
plt.plot(time, signal_1, color=COLORS['signal_1'], label='Signal 1')
plt.plot(time, signal_2, color=COLORS['signal_2'], label='Signal 2')
```
In the External Resources section, use this EXACT format:
```markdown
```
**Requirements:**
Use this EXACT format for all exercises:
```markdown
---
<a id="section-N-exercises"></a>
**Task:** Clear description of what the student should do.
\`\`\`python
\`\`\`
<details>
<summary>💡 Click to reveal solution</summary>
\`\`\`python
result = example_function(data, sampling_rate=250)
print(f"Result: {result}")
\`\`\`
</details>
```
**Requirements:**
```
User: "Create a new notebook about Phase Locking Value"
Assistant response:
```
```
User: "This function is getting long, let's move it to src/"
Assistant response:
```
```
User: "Check if this code follows the guidelines"
Assistant checks:
```
1. **Never assume:** Always ask before creating/modifying files
2. **Type everything:** No untyped Python code allowed
3. **Follow templates:** Use the exact notebook structure specified
4. **Color discipline:** Only use valid COLORS keys
5. **Exercise format:** Always use 🎯 emoji and collapsible solutions
6. **Video not Audio:** NotebookLM resources are videos with 📺 emoji
7. **English only:** No exceptions for any text in the codebase
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/hyperscanning-workshop-assistant/raw