소스 정보
- 저장소
- diegosouzapw/awesome-omni-skill
- 최근 소스 활동
- 2026년 3월 1일 00:35
- 감지된 SKILL.md 언어
- 영어
- 스타
- 50
- 포크
- 19
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/diegosouzapw/awesome-omni-skill --skill notebook-writer명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | notebook-writer |
| description | Create and document Jupyter notebooks for reproducible analyses |
| success_criteria | ["Notebook structured with clear sections and narrative","Code cells properly documented with explanatory markdown","Reproducibility ensured (can run end-to-end)","Environment requirements documented","Outputs properly displayed and interpreted","Git-friendly format (Jupytext markdown)"] |
You are a specialist in creating well-structured Jupyter notebooks for scientific analyses and documentation.
Use this skill when:
We use Jupytext-compatible Markdown for notebooks to enable git-friendly version control.
# %% on its own line---
jupyter:
kernelspec:
display_name: Python 3
language: python
name: python3
---
# Analysis Title
Brief description of what this notebook does.
## Section 1: Data Loading
# %%
import pandas as pd
import numpy as np
# %%
data = pd.read_csv('data.csv')
data.head()
## Section 2: Analysis
Explanation of the analysis approach.
# %%
# Perform calculation
result = np.mean(data['value'])
print(f"Mean: {result:.2f}")
Many projects provide src/utils/notebook_builder.py with helper functions for programmatic notebook creation.
create_notebook_markdown(
title: str,
cells: List[Dict[str, str]],
output_path: Path,
kernelspec: Optional[Dict] = None
) -> Path
Parameters:
title: Notebook title (becomes H1 header)cells: List of dicts with 'type' ('code' or 'markdown') and 'content'output_path: Where to save .md filekernelspec: Optional kernel specification (defaults to Python 3)Example:
from pathlib import Path
from src.utils.notebook_builder import create_notebook_markdown
cells = [
{'type': 'markdown', 'content': '## Introduction\n\nThis analysis...'},
{'type': 'code', 'content': 'import numpy as np'},
{'type': 'code', 'content': 'x = np.linspace(0, 10)\nprint(x)'}
]
create_notebook_markdown(
title="My Analysis",
cells=cells,
output_path=Path('docs/analysis/my_analysis.md')
)
create_parameter_sweep_notebook(
param_name: str,
param_range: str,
calculation_code: str,
output_path: Path
) -> Path
Creates a notebook with:
Example:
from pathlib import Path
from src.utils.notebook_builder import create_parameter_sweep_notebook
create_parameter_sweep_notebook(
param_name='temperature',
param_range='np.linspace(20, 40, 20)',
calculation_code='''
# Reaction rate calculation
results = []
for T in temperature_values:
rate = arrhenius_equation(T, activation_energy)
results.append(rate)
''',
output_path=Path('analysis/temperature_sweep.md')
)
create_analysis_report_notebook(
analysis_title: str,
sections: List[Dict[str, str]],
output_path: Path
) -> Path
Section dict keys:
title: Section heading (required)description: Explanatory text (optional)code: Code to execute (optional)interpretation: Results interpretation (optional)Example:
from src.utils.notebook_builder import create_analysis_report_notebook
sections = [
{
'title': 'Model Setup',
'description': 'Define parameters',
'code': 'diffusion_coeff = 2.1e-5 # cm²/s'
},
{
'title': 'Calculation',
'code': 'result = compute_model(diffusion_coeff)',
'interpretation': 'Result shows X is dominated by Y'
}
]
create_analysis_report_notebook(
'Transport Analysis',
sections,
Path('analysis/transport.md')
)
validate_notebook(notebook_path: Path) -> bool
Validates .ipynb structure using nbformat. Returns True if valid, raises exception if invalid.
Example:
from pathlib import Path
from src.utils.notebook_builder import validate_notebook
validate_notebook(Path('analysis/notebook.ipynb'))
# Returns True or raises ValidationError
.md file directly (agents write Markdown well).ipynb: python3 -m jupytext --to ipynb notebook.mdjupyter notebook notebook.ipynbpython3 -m jupytext --sync notebook.ipynb (bidirectional)Modern Jupyter environments (JupyterLab 4.0+, JetBrains IDEs) provide AI-powered assistance to enhance productivity and reduce errors.
The %%ai cell magic enables AI-powered code generation and analysis directly in notebooks:
# %%
# %load_ext jupyter_ai_magics
# %%
%%ai chatgpt
Generate a function to calculate the Pearson correlation coefficient between two arrays
Key use cases:
AI assistants work best when given relevant context. Always provide:
API documentation: For specialized libraries (scanpy, pydeseq2, biopython)
# Include relevant API documentation in a markdown cell
# Example: scanpy.pp.filter_cells(data, min_genes=200)
Dataset descriptions: Shape, columns, data types
# Document your data structure:
# RNA-seq counts matrix: 20,000 genes × 5,000 cells
# AnnData object: .X (sparse CSR matrix), .obs (cell metadata), .var (gene metadata)
Domain context: Biological meaning, expected ranges, units
# Oxygen consumption rate: 10-20 pmol/s/million cells
# Temperature: 37°C, pH: 7.4
JupyterLab's chat interface provides conversational help:
Best practices:
Use AI assistance for:
Write code manually for:
Warning: Always verify AI-generated code. Check for:
For notebooks in PyCharm/DataSpell:
Features:
Access: Right-click cell → "AI Assistant" or use AI chat sidebar
Projects should include .jupytext.toml in repository root:
# Jupytext configuration
# Enables git-friendly notebook version control
# Pair markdown and ipynb files
# Use myst format which supports # %% cell markers
formats = "md:myst,ipynb"
This tells Jupytext to:
.md files as notebooks# %% markers).ipynb when either is modifiedRecommended .gitignore configuration:
# Track .md notebooks (Jupytext source), ignore generated .ipynb files
*.ipynb
.ipynb_checkpoints/
What's tracked:
.md notebook files (human-readable source).ipynb files (generated, binary JSON).ipynb_checkpoints/ (Jupyter temp files)Rationale: .md files produce readable git diffs. .ipynb files are JSON with embedded outputs and can be regenerated from .md.
# %% markerspython3 -m jupytext --to ipynb file.mdpython3 -m jupytext --to md:myst notebook.ipynb
Option 1: Edit .md file directly (recommended for agents)
# Edit notebook.md in text editor
# Then convert:
python3 -m jupytext --to ipynb notebook.md
Option 2: Edit in Jupyter, sync back
jupyter notebook notebook.ipynb
# Make changes in Jupyter
# Sync back to .md:
python3 -m jupytext --sync notebook.ipynb
python3 -c "
from pathlib import Path
from src.utils.notebook_builder import validate_notebook
validate_notebook(Path('notebook.ipynb'))
print('✓ Valid')
"
# Convert all .md notebooks in a directory
python3 -m jupytext --to ipynb analysis/*.md
# Or sync all paired notebooks
python3 -m jupytext --sync analysis/*.ipynb
Scientific notebooks must be fully reproducible. Every notebook should enable another researcher to:
Every notebook must include an environment documentation cell:
# %%
# Environment Information
# Run: pip freeze > requirements.txt
# Or: conda env export > environment.yml
import sys
import numpy as np
import pandas as pd
import scanpy as sc # Example for single-cell analysis
print(f"Python: {sys.version}")
print(f"NumPy: {np.__version__}")
print(f"Pandas: {pd.__version__}")
print(f"Scanpy: {sc.__version__}")
# Include this output in your notebook for documentation
Create environment files:
# For pip users:
pip freeze > requirements.txt
# For conda users:
conda env export > environment.yml
# Include these files in your repository
Document kernel selection:
## Computational Environment
- **Kernel**: Python 3.11 (project-env)
- **Dependencies**: See `requirements.txt` for full package list
- **Critical packages**: scanpy==1.10.0, numpy==1.26.3, pandas==2.2.0
For any stochastic process, set random seeds:
# %%
# Set random seeds for reproducibility
import numpy as np
import random
RANDOM_SEED = 42 # Document why this value was chosen (convention, previous analysis, etc.)
np.random.seed(RANDOM_SEED)
random.seed(RANDOM_SEED)
# For machine learning:
import torch
torch.manual_seed(RANDOM_SEED)
# For scanpy:
import scanpy as sc
sc.settings.seed = RANDOM_SEED
print(f"Random seed set to {RANDOM_SEED}")
Stochastic processes requiring seeds:
End every notebook with a session info cell:
# %%
# Session Information (for reproducibility)
import session_info
session_info.show(
dependencies=True,
html=False
)
# Alternative for single-cell analysis:
# import scanpy as sc
# sc.logging.print_versions()
This captures:
Use relative paths and variables:
# %%
from pathlib import Path
# Define paths at the top of the notebook
DATA_DIR = Path("data/raw")
RESULTS_DIR = Path("results/analysis_2025-01-29")
# Ensure output directories exist
RESULTS_DIR.mkdir(parents=True, exist_ok=True)
# Use variables throughout
input_file = DATA_DIR / "counts.csv"
output_file = RESULTS_DIR / "normalized_counts.csv"
Never use hardcoded absolute paths:
# BAD:
data = pd.read_csv("/Users/yourname/project/data.csv")
# GOOD:
data = pd.read_csv(DATA_DIR / "data.csv")
Before sharing or archiving a notebook:
requirements.txt or environment.yml exists and is currentIntegration with other skills:
Many projects have a docs/NOTEBOOK-WORKFLOW.md or similar document with project-specific examples and patterns. Check your project's documentation for:
Error: Format 'percent' is not associated to extension '.md'
Fix: Use md:myst format in .jupytext.toml (not md:percent). MyST Markdown supports # %% markers.
formats = "md:myst,ipynb" # Correct
Symptom: Changes to .ipynb don't appear in .md
Solution:
.jupytext.toml exists and has correct formatpython3 -m jupytext --sync notebook.ipynb.md first if needed)Error: nbformat.ValidationError
Causes:
Solution: Use notebook_builder.py utility functions which handle validation automatically.
Symptom: .ipynb files appearing in git status
Fix: Ensure .gitignore contains *.ipynb. Check with:
git check-ignore -v notebook.ipynb
# %%: Code cells must start with this markerPath objects, ensure directories existnotebook_builder.validate_notebook() after creationBefore finalizing a notebook:
# %% markerRequired packages:
pip3 install jupytext nbformat
Check installation:
pip3 list | grep -E "(jupytext|nbformat)"
Tested versions:
Common patterns for skill integration:
Remember: Notebooks are for interactive exploration and reproducible documentation. For production code, use Python modules in src/.
For project-specific examples and patterns, see your project's documentation (often docs/NOTEBOOK-WORKFLOW.md or similar).