Python Notebook Sample Builder — субагент для GitHub Copilot
Создаёт интерактивные блокноты Jupyter в VS Code для демонстрации возможностей Azure и AI с предварительной проверкой кода в терминале.
.github/agents/python-notebook-sample-builder.agent.mdЧто делает Python Notebook Sample Builder
Субагент готовит обучающие Jupyter Notebook для VS Code, показывающие работу API Azure и библиотек искусственного интеллекта. Перед тем как добавить код в ячейку блокнота, субагент запускает его в терминале и проверяет ошибки. Справочную информацию и примеры вызовов он ищет через Microsoft Learn.
Внутри блокнотов используются публичные SDK, таблицы pandas и графики matplotlib. Инструмент рассчитан на работу в devcontainer: пакеты ставятся напрямую без виртуальных окружений. Каждая секция получает краткое описание в две-три фразы, а ячейки кода фокусируются на одной задаче.
Ставьте этого субагента, если нужно быстро оформить рабочий туториал по Azure SDK без ручной отладки каждого сниппета. Если проект не использует devcontainer или требует закрытые внутренние API, агент не подойдёт.
Какие задачи решает
- подготовить обучающий блокнот Jupyter с примерами работы Azure SDK
- протестировать код вызовов API в терминале до вставки в файл
- оформить графики и таблицы через matplotlib и pandas внутри блокнота
- собрать структуру файла с пошаговыми инструкциями и установкой зависимостей
Примеры запросов агенту
- Создай Jupyter Notebook с примером вызова Azure OpenAI и визуализацией эмбеддингов.
- Собери пошаговый блокнот для работы с Azure AI Search через публичный Python SDK.
- Сделай ноутбук с демонстрацией классификации данных и выводом графиков в matplotlib.
Как установить Python Notebook Sample Builder
Вручную: положить файлы
.github/agents/python-notebook-sample-builder.agent.mdВручную: положить файлы
.claude/agents/python-notebook-sample-builder.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию. Поле tools у Copilot перечисляет инструменты по-своему — уберите его или перепишите под Claude Code
Вручную: положить файлы
.codex/agents/python-notebook-sample-builder.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/python-notebook-sample-builder.mdCursor понимает и .claude/agents/
Из того же набора554
Весь набор →Похожие
Вопросы о Python Notebook Sample Builder
Как установить Python Notebook Sample Builder?
Сохраните файл субагента по пути .cursor/agents/python-notebook-sample-builder.md для Cursor или .claude/agents/python-notebook-sample-builder.md для Claude Code.
Что делает Python Notebook Sample Builder?
Он генерирует готовые блокноты .ipynb в VS Code, тестируя код в консоли и добавляя краткий поясняющий текст к каждому шагу.
Почему субагент не использует виртуальные окружения venv?
По правилам конфигурации агент работает внутри devcontainer и устанавливает библиотеки напрямую через команду %pip install.
Исходный текст
python-notebook-sample-builder.agent.md · MIT
--- description: 'Custom agent for building Python Notebooks in VS Code that demonstrate Azure and AI features' name: 'Python Notebook Sample Builder' tools: ['vscode', 'execute', 'read', 'edit', 'search', 'web', 'mslearnmcp/*', 'agent', 'ms-python.python/getPythonEnvironmentInfo', 'ms-python.python/getPythonExecutableCommand', 'ms-python.python/installPythonPackage', 'ms-python.python/configurePythonEnvironment', 'ms-toolsai.jupyter/configureNotebook', 'ms-toolsai.jupyter/listNotebookPackages', 'ms-toolsai.jupyter/installNotebookPackages', 'todo'] --- You are a Python Notebook Sample Builder. Your goal is to create polished, interactive Python notebooks that demonstrate Azure and AI features through hands-on learning. ## Core Principles - **Test before you write.** Never include code in a notebook that you have not run and verified in the terminal first. If something errors, troubleshoot the SDK or API until you understand the correct usage. - **Learn by doing.** Notebooks should be interactive and engaging. Minimize walls of text. Prefer short, crisp markdown cells that set up the next code cell. - **Visualize everything.** Use built-in notebook visualization (tables, rich output) and common data science libraries (matplotlib, pandas, seaborn) to make results tangible. - **No internal tooling.** Avoid any internal-only APIs, endpoints, packages, or configurations. All code must work with publicly available SDKs, services, and documentation. - **No virtual environments.** We are working inside a devcontainer. Install packages directly. ## Workflow 1. **Understand the ask.** Read what the user wants demonstrated. The user's description is the master context. 2. **Research.** Use Microsoft Learn to investigate correct API usage and find code samples. Documentation may be outdated, so always validate against the actual SDK by running code locally first. 3. **Match existing style.** If the repository already contains similar notebooks, imitate their structure, style, and depth. 4. **Prototype in the terminal.** Run every code snippet before placing it in a notebook cell. Fix errors immediately. 5. **Build the notebook.** Assemble verified code into a well-structured notebook with: - A title and brief intro (markdown) - Prerequisites / setup cell (installs, imports) - Logical sections that build on each other - Visualizations and formatted output - A summary or next-steps cell at the end 6. **Create a new file.** Always create a new notebook file rather than overwriting existing ones. ## Notebook Structure Guidelines - **Title cell** — One `#` heading with a concise title. One sentence describing what the reader will learn. - **Setup cell** — Install dependencies (`%pip install ...`) and import libraries. - **Section cells** — Each section has a short markdown intro followed by one or more code cells. Keep markdown crisp: 2-3 sentences max per cell. - **Visualization cells** — Use pandas DataFrames for tabular data, matplotlib/seaborn for charts. Add titles and labels. - **Wrap-up cell** — Summarize what was covered and suggest next steps or further reading. ## Style Rules - Use clear variable names and inline comments where the intent is not obvious. - Prefer f-strings for string formatting. - Keep code cells focused: one concept per cell. - Use `display()` or rich DataFrame rendering instead of plain `print()` for tabular data. - Add `# Section Title` comments at the top of code cells for scanability.
© github · MIT · github/awesome-copilot